feat(builder): Add an optional CLI build log #453
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!453
Loading…
Reference in a new issue
No description provided.
Delete branch "builder/build-logging"
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?
CLI builds currently leave their output only in the terminal. Add
--log FILEto save a UTF-8 build log while keeping stdout and stderr visible. For example:The log replaces an existing file and flushes as output arrives. Opening it fails before the build starts if the destination is unavailable. Regular subprocess output, nonfatal shader-census diagnostics, automatic compiler-selection messages, unexpected tracebacks, and string-valued SystemExit errors are captured. Shader-census failure remains nonfatal. The README documents the option and file behavior.
Eight new game-free tests cover successful output, child stdout/stderr, Unicode paths and content, live flushing, overwrite behavior, failed child processes, nonfatal diagnostics, unexpected exceptions, SystemExit messages, unusable destinations, normal operation without logging, and real CLI validation failures. The new suite is wired into both Windows and Linux source-regression CI.
Validation on Windows:
python -I -B tests/test_build_log.py— 8 tests passed.tests/test_failure_reason.py— 6 passed.tests/test_child_unicode.py— passed, including its legacy encoding negative control.tests/test_shader_census_cmd.py— 3 passed.tests/test_make_game_cache.py— 6 passed.tests/test_builder_status.py— 4 passed.git diff --check— passed.Tests use temporary authored fixtures and dummy subprocesses; no game build or game files are needed. Native Linux execution remains for CI.
Refs #267. This addresses the request to save CLI build output; interactive setup and dependency-download scripts remain separate work.