fix(builder): the Linux builder gives this build's reason for stopping, not the last one's #2159
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!2159
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/linux-builder-stop-reason"
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?
After a build that was cancelled or stopped with a reason, a later build that ends without a reason of its own shows the earlier one. For example: cancel a build, go Back, build again, and have make_game.py killed from outside (the system's low-memory killer does this). The page then says "The build stopped: Build cancelled. You can start again from the same folder." for a build nobody cancelled.
The reason is
self.error, set by make_game.py's@@errorline or by Cancel, and nothing cleared it between builds.self.built(the folder from@@done) was kept the same way.show_progressnow clears both with the rest of a run's state, and a build with no reason says "see the lines above", as a first build already did.Testing (Linux, Tk 8.6)
tests/test_linux_builder_stop_reason.py(new) runs the builder's ownon_line,cancelandon_exit, and whatshow_progresssets before it draws, on a stand-in window without Tk. 3 of its 4 tests fail on main.Looks good to me.
show_progressis the one place both a build (build,builder/linux/hookshot_builder.py:1049) and an update (begin_update,:944) go through beforemake_game.pystarts, so clearingself.builtandself.errorthere (:1069) resets them for every run, and nothing sets either of them before that point.on_exitkeeps the "see the lines above" fallback now thaterrorcan beNone(:1237). The stalebuiltwas harmless in practice becauseon_exitalso needs exit code 0 andgame_ready(folder), but it's right to clear it with the rest.The new test runs the real
on_line,cancelandon_exitrather than copies of them, and it cutsshow_progressatpx =. If someone later moves the reset below that line, the test fails instead of passing on a stub, which is the behaviour we want. It merges cleanly with main, and CI passes on Ubuntu and Windows.github-sync referenced this pull request2026-11-12 06:22:54 +00:00