Repository navigation
fix(generate): fail fast on excess progression, keep tracebacks off the streams - #192
Merged
Merged
Conversation
…he streams Fill.py: raise FillError before any placement when progression items outnumber priority and default locations, naming the players over their count. Generate.py: report main() failures through _report_generation_failure so the traceback stays in the log file. test/general/test_fill.py: cover the early failure and the start_inventory exemption. test/programs/test_generate.py: run Generate on a broken player file and check stderr carries no traceback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Generation failures: an impossible fill fails immediately, and Generate no longer writes tracebacks to its output streams.
Description
distribute_items_restrictiveraisesFillErrorbefore any placement when progression items outnumber priority + default locations (except with thestart_inventorypanic method), naming each player over their count. A Manual world with 1000 progression items and 1 location previously left the swap search running indefinitely after the "Could not remove enough non-progression items" warning.Generate.pyreportsmain()failures (e.g. invalid player YAMLs) through_report_generation_failure: the traceback goes to the log file and the stream gets oneGeneration failed: ...line, instead of an uncaught traceback on stderr that the launcher showed verbatim in its dialog.