fix(builder): a game folder inside the tools folder is allowed again, so dev.py game builds into build-linux/game #2570

Merged
HumanBean merged 1 commit from HumanBean/Longshot:push-txrnouwkspmu into main 2026-11-26 02:29:48 +00:00
Owner

Summary

Since #2286, python -I scripts/dev.py game fails on every checkout:

error: The game folder …/build-linux/game and the builder's tools folder … are one inside the other. Choose another game folder.

The builder's place check refused a game folder and the tools folder when either one is inside the other. For a source checkout, the tools folder is the checkout itself, so dev.py game's build-linux/game was always refused. Only one direction is dangerous: a game folder that holds the tools, since clearing that game folder would take the tools with it. That's still refused. A game folder inside the tools folder is allowed again.

Read builder/crates/build-driver/src/folder.rs (check_places, TOOLS, within) and its use in build.rs.

Testing

Tested: Linux (CachyOS, RTX 3090).

  • Builder tests: cargo test -p build-driver --lib folder:: passes, 17 tests, including the new cases: a game folder inside the tools folder is allowed, and a game folder holding the tools is refused. The allowed case fails without the fix.
  • In the game: in the #2286 A/B, dev.py game on main with this fix built build-linux/game in 33 s (before the fix: refused at once). Then dev.py ab played that game folder six times in Hyrule Field, about 120 fps, reported on #2286.

Still to test: None.

Measurements

Nothing to measure: a check on folders.

Risks

None for players: the launcher's game folders are never inside the builder's own folder. Revert to undo.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named). (this PR's CI runs it)
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vw8e1RP1VgcWpgA7Kq6ec

## Summary Since #2286, `python -I scripts/dev.py game` fails on every checkout: ``` error: The game folder …/build-linux/game and the builder's tools folder … are one inside the other. Choose another game folder. ``` The builder's place check refused a game folder and the tools folder when either one is inside the other. For a source checkout, the tools folder is the checkout itself, so `dev.py game`'s `build-linux/game` was always refused. Only one direction is dangerous: a game folder that holds the tools, since clearing that game folder would take the tools with it. That's still refused. A game folder inside the tools folder is allowed again. Read `builder/crates/build-driver/src/folder.rs` (`check_places`, `TOOLS`, `within`) and its use in `build.rs`. ## Testing **Tested:** Linux (CachyOS, RTX 3090). - **Builder tests:** `cargo test -p build-driver --lib folder::` passes, 17 tests, including the new cases: a game folder inside the tools folder is allowed, and a game folder holding the tools is refused. The allowed case fails without the fix. - **In the game:** in the #2286 A/B, `dev.py game` on `main` with this fix built `build-linux/game` in 33 s (before the fix: refused at once). Then `dev.py ab` played that game folder six times in Hyrule Field, about 120 fps, reported on #2286. **Still to test:** None. ## Measurements Nothing to measure: a check on folders. ## Risks None for players: the launcher's game folders are never inside the builder's own folder. Revert to undo. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). (this PR's CI runs it) - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vw8e1RP1VgcWpgA7Kq6ec
fix(builder): a game folder inside the tools folder is allowed again, so dev.py game builds into build-linux/game
Some checks failed
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 25s
PR description / Title and description (pull_request_target) Successful in 33s
CI / Workflow lint (actionlint) (pull_request) Successful in 42s
Guide screenshots / Guide images and local UI source review (pull_request) Successful in 44s
Third-party parts / As their notes say (pull_request) Successful in 53s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
c1c88aba86
The places check refused a game folder and the builder's tools folder one inside the other either way round. A
source tree is its own tools folder, so dev.py game's build-linux/game was refused on every checkout. Only a game
folder holding the tools is a danger (its clean-up would take them); that is still refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

Tested in game: Linux (CachyOS), RTX 3090: dev.py game on main with this fix built build-linux/game in 33 s (refused before), then dev.py ab played it six times in Hyrule Field at about 120 fps (#2286's A/B).

Tested in game: Linux (CachyOS), RTX 3090: dev.py game on main with this fix built build-linux/game in 33 s (refused before), then dev.py ab played it six times in Hyrule Field at about 120 fps (#2286's A/B).
HumanBean force-pushed push-txrnouwkspmu from c1c88aba86
Some checks failed
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 25s
PR description / Title and description (pull_request_target) Successful in 33s
CI / Workflow lint (actionlint) (pull_request) Successful in 42s
Guide screenshots / Guide images and local UI source review (pull_request) Successful in 44s
Third-party parts / As their notes say (pull_request) Successful in 53s
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Has been cancelled
CI / longshot-builder end to end (synthetic game) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to cc3ad05d3e
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
PR description / Title and description (pull_request_target) Successful in 29s
CI / What the change needs (pull_request) Successful in 36s
CI / Third-party parts and guide screenshots (pull_request) Successful in 52s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 1m4s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m53s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Successful in 5m9s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Successful in 6m38s
CI / Website build and checks (pull_request) Successful in 3m21s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 28m16s
2026-11-25 21:30:38 +00:00
Compare
HumanBean force-pushed push-txrnouwkspmu from cc3ad05d3e
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
PR description / Title and description (pull_request_target) Successful in 29s
CI / What the change needs (pull_request) Successful in 36s
CI / Third-party parts and guide screenshots (pull_request) Successful in 52s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 1m4s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m53s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Successful in 5m9s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Successful in 6m38s
CI / Website build and checks (pull_request) Successful in 3m21s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 28m16s
to 2b4ce4cf7e
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / What the change needs (pull_request) Successful in 23s
CI / Third-party parts and guide screenshots (pull_request) Successful in 28s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 2m32s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m48s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Successful in 3m14s
CI / Website build and checks (pull_request) Successful in 2m41s
PR description / Title and description (pull_request_target) Failing after 9s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 20m0s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Successful in 38m52s
2026-11-26 02:02:23 +00:00
Compare
HumanBean changed title from WIP: fix(builder): a game folder inside the tools folder is allowed again, so dev.py game builds into build-linux/game to fix(builder): a game folder inside the tools folder is allowed again, so dev.py game builds into build-linux/game 2026-11-26 02:29:26 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2570
No description provided.