mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #1857] [MERGED] make_game: report a stage that raises instead of failing silently (BUILD-STAGES-EXCEPTION-DIAG) #1869
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1869
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1857
Author: @thiefyzheng
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:fix/build-stages-exception-diag📝 Commits (1)
93a0f21BUILD-STAGES: report a stage that raises instead of failing silently📊 Changes
2 files changed (+68 additions, -3 deletions)
View changed files
📝
make_game.py(+21 -3)📝
tests/test_leonida_tui.py(+47 -0)📄 Description
BUILD-STAGES-EXCEPTION-DIAG
Claimed on #1608 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7163485212). Fixes @cheltyi's finding (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7163281819):
run_build_stages' series loop and both wait/final-future handlers catch everyExceptionassumingfail()already printed, so a stage raising anything else (e.g. aPermissionErrorfrom a permission/disk/copy failure) exits 1 with empty stderr — verified against the finding's synthetic repro in both overlap modes.What
report_unexpected(name, exc)helper insiderun_build_stages: skipsfail()'s ownRuntimeError("stage exited...")sys.exit path, deduplicates per stage, printsERROR: stage '<name>' failed with an unexpected exception: {exc!r}plus a traceback to stderr — once per build, never duplicated between the wait() and drain handlers.wait(), final drain).What was run (CPU-only, no game files)
python3 -m compileall -q make_game.py— OK.python3 tests/test_leonida_tui.py— 27 tests OK (includes the newUnexpectedStageExceptionTestcovering both overlap modes: exit 1, stderr names the stage + exception, exactly one report).python3 -m unittest discover -s tests -p "test_make_game_*.py"— 443 OK, 4 skipped;"test_*stage*"— 166 OK, 1 skipped.make_game.pymakes both new tests fail ('shaders' not found in ''); restored, they pass.Attribution
AI-assisted (GLM 5.3 Flash worker implementation, contributor verification and orchestration).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.