WIP: test(builder): two builder checks that fail only on Windows pass there: their fixtures name Windows' programs and whole paths #2834

Closed
llun wants to merge 1 commit from fix/mod-api-win-builder-tests into mod-api
Member

Summary

For #2822 (into mod-api). Two of the builder's Rust checks fail on mod-api only on Windows (cargo test --target x86_64-pc-windows-gnullvm). Their fixtures assume Linux; the code they test is right on both systems. Tests only:

Check On mod-api, Windows Here
build-compile's toolchain::tests::the_builder_s_llvm_comes_before_emsdk_and_the_path the fake LONGSHOT_LLVM holds clang and ld.lld, which find() looks for as clang.exe and ld.lld.exe on Windows, so it found the PATH's clang (left: …\llvm-mingw\bin\clang.exe) the fixture's programs are named with std::env::consts::EXE_SUFFIX
build-core's driver_caches::tests::the_caches_are_longshots_own_unless_one_is_named plan() takes HOME and XDG_CACHE_HOME only when whole, and /h is not whole on Windows (left: []) the test's paths are rooted at C: on Windows, / on Linux as before

Read first: the two tests, in builder/crates/build-compile/src/toolchain.rs and builder/crates/build-core/src/driver_caches.rs.

Testing

Tested: Windows 11. cargo test -p build-core -p build-compile --target x86_64-pc-windows-gnullvm with llvm-mingw: both checks fail on mod-api @ eaf4a48b as the table says, and pass here. On Linux (WSL Ubuntu 24.04, Rust 1.99.1) both pass here, as before. Tests only, so there's no game run: the game runs none of it. cargo fmt --check on both crates and mise run lint pass.

Still failing on Windows on mod-api, unchanged by this PR:

  • build-core's files_windows::tests::the_cache_takes_files_folders_renames_and_removes: the broker's write-only open and made folder, #2726's bug, commented there.
  • build-compile's tests/compile_link.rs an_unchanged_rebuild_compiles_nothing_and_a_change_compiles_what_it_touches (and links nothing): an unchanged rebuild links again on Windows: its fixture's program and a bug in the link's key, fixed in #2835.

Still to test: None.

Measurements

Nothing to measure: two tests' fixtures.

Risks

The sandbox: not touched. These are two tests' fixtures, and the sandbox's checks are not weakened.

None for players: only #[cfg(test)] code changes, and neither check is weakened (Linux runs exactly what it ran). A revert is enough.

Checklist

Ready for review

  • One topic, on current mod-api (#2822's head); 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). (These two pass. The two named above still fail on Windows on mod-api. mod-api's whole suite has other failures on Windows that this PR doesn't change.)
  • 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 check under tests/ that reads changed source is updated, not weakened.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • 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

## Summary For [#2822](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2822) (into `mod-api`). Two of the builder's Rust checks fail on `mod-api` only on Windows (`cargo test --target x86_64-pc-windows-gnullvm`). Their fixtures assume Linux; the code they test is right on both systems. Tests only: | Check | On `mod-api`, Windows | Here | |---|---|---| | `build-compile`'s `toolchain::tests::the_builder_s_llvm_comes_before_emsdk_and_the_path` | the fake `LONGSHOT_LLVM` holds `clang` and `ld.lld`, which `find()` looks for as `clang.exe` and `ld.lld.exe` on Windows, so it found the `PATH`'s clang (`left: …\llvm-mingw\bin\clang.exe`) | the fixture's programs are named with `std::env::consts::EXE_SUFFIX` | | `build-core`'s `driver_caches::tests::the_caches_are_longshots_own_unless_one_is_named` | `plan()` takes `HOME` and `XDG_CACHE_HOME` only when whole, and `/h` is not whole on Windows (`left: []`) | the test's paths are rooted at `C:` on Windows, `/` on Linux as before | Read first: the two tests, in `builder/crates/build-compile/src/toolchain.rs` and `builder/crates/build-core/src/driver_caches.rs`. ## Testing **Tested:** Windows 11. `cargo test -p build-core -p build-compile --target x86_64-pc-windows-gnullvm` with llvm-mingw: both checks fail on `mod-api` @ eaf4a48b as the table says, and pass here. On Linux (WSL Ubuntu 24.04, Rust 1.99.1) both pass here, as before. Tests only, so there's no game run: the game runs none of it. `cargo fmt --check` on both crates and `mise run lint` pass. Still failing on Windows on `mod-api`, unchanged by this PR: - `build-core`'s `files_windows::tests::the_cache_takes_files_folders_renames_and_removes`: the broker's write-only open and made folder, [#2726](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2726)'s bug, [commented there](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2726#issuecomment-91738). - `build-compile`'s `tests/compile_link.rs` `an_unchanged_rebuild_compiles_nothing_and_a_change_compiles_what_it_touches` (`and links nothing`): an unchanged rebuild links again on Windows: its fixture's program and a bug in the link's key, fixed in [#2835](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2835). **Still to test:** None. ## Measurements Nothing to measure: two tests' fixtures. ## Risks **The sandbox:** not touched. These are two tests' fixtures, and the sandbox's checks are not weakened. None for players: only `#[cfg(test)]` code changes, and neither check is weakened (Linux runs exactly what it ran). A revert is enough. ## Checklist ### Ready for review - [x] One topic, on current `mod-api` (#2822's head); 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). (These two pass. The two named above still fail on Windows on `mod-api`. `mod-api`'s whole suite has other failures on Windows that this PR doesn't change.) - [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 check under `tests/` that reads changed source is updated, not weakened. - [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. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] 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)
test(builder): two builder checks that fail only on Windows pass there: their fixtures name Windows' programs and whole paths
All checks were successful
PR description / Title and description (pull_request_target) Successful in 13s
7d24c41c12
Each failed on mod-api on Windows (cargo test --target x86_64-pc-windows-gnullvm) and passes there now, and on Linux:
- build-compile's toolchain::tests::the_builder_s_llvm_comes_before_emsdk_and_the_path: the fake LONGSHOT_LLVM held
  `clang` and `ld.lld`, which find() looks for as `clang.exe` and `ld.lld.exe` on Windows, so it found the PATH's clang
  instead: the fixture's programs are named with std::env::consts::EXE_SUFFIX;
- build-core's driver_caches::tests::the_caches_are_longshots_own_unless_one_is_named: plan() takes HOME and
  XDG_CACHE_HOME only when whole, and `/h` is not on Windows (left: []): the test's paths are rooted at `C:` there.

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member

Possibly related, for context:

  • PR #2830 WIP: chore(lint): the workspace passes clippy for Windows' target, as mise.toml says the builder is checked for Windows — Same builder test suite on Windows; mentions these exact failing checks.
Possibly related, for context: - PR #2830 WIP: chore(lint): the workspace passes clippy for Windows' target, as mise.toml says the builder is checked for Windows — Same builder test suite on Windows; mentions these exact failing checks.
Author
Member

The compile_link failure named in Testing is explained and fixed in #2835: its fixture linked prog (Windows writes prog.exe), and link_inputs took a Windows path's drive colon for an option's separator, so a link's output went into its own key and every link ran again.

The compile_link failure named in Testing is explained and fixed in #2835: its fixture linked prog (Windows writes prog.exe), and link_inputs took a Windows path's drive colon for an option's separator, so a link's output went into its own key and every link ran again.
Author
Member

Risks now says how this change stands with the sandbox (what it touches, and why the confined game reaches nothing more).

Risks now says how this change stands with the sandbox (what it touches, and why the confined game reaches nothing more).
llun force-pushed fix/mod-api-win-builder-tests from 7d24c41c12
All checks were successful
PR description / Title and description (pull_request_target) Successful in 13s
to fc262bd7e8
All checks were successful
PR description / Title and description (pull_request_target) Successful in 14s
2026-11-29 23:27:45 +00:00
Compare
Author
Member

Rebased onto mod-api's newest (4cc50ca1: main's newest merged in), with no conflict; this PR's own checks were run again on the rebased head and pass as before. The merge touched none of this PR's files (#2827: only a comment in host/hos_main.c, far from its change), so the measurements and runs above hold; the After commit is the rebased head.

Rebased onto mod-api's newest (4cc50ca1: main's newest merged in), with no conflict; this PR's own checks were run again on the rebased head and pass as before. The merge touched none of this PR's files (#2827: only a comment in host/hos_main.c, far from its change), so the measurements and runs above hold; the After commit is the rebased head.
llun force-pushed fix/mod-api-win-builder-tests from fc262bd7e8
All checks were successful
PR description / Title and description (pull_request_target) Successful in 14s
to 11f066e714
All checks were successful
PR description / Title and description (pull_request_target) Successful in 11s
2026-11-29 23:58:24 +00:00
Compare
Author
Member

Rebased onto mod-api @ 816d2354 (#2837, headless shots of the mods' UI), now 11f066e7. No conflict, and the diff is the same as before (same git patch-id). #2837 touches none of this PR's files.

Rebased onto `mod-api` @ 816d2354 ([#2837](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2837), headless shots of the mods' UI), now 11f066e7. No conflict, and the diff is the same as before (same `git patch-id`). #2837 touches none of this PR's files.
llun force-pushed fix/mod-api-win-builder-tests from 11f066e714
All checks were successful
PR description / Title and description (pull_request_target) Successful in 11s
to 6c1035304a
All checks were successful
PR description / Title and description (pull_request_target) Successful in 17s
2026-11-30 00:38:41 +00:00
Compare
llun force-pushed fix/mod-api-win-builder-tests from 6c1035304a
All checks were successful
PR description / Title and description (pull_request_target) Successful in 17s
to 78e48176a8
All checks were successful
PR description / Title and description (pull_request_target) Successful in 15s
2026-11-30 00:43:14 +00:00
Compare
Author
Member

Rebased onto mod-api @ c5e5b676: it was re-squashed onto main @ 46291934 (#2833) twice today (cdbb8551, then c5e5b676), which made this PR show main's and the whole mod API's diff. Now 78e48176, the same diff as before (same git patch-id), no conflict. main's #2833 changed toolchain.rs, so I ran cargo test -p build-compile -p build-core again on the rebased head (Windows, llvm-mingw): the same as before, with only compile_link's an_unchanged_rebuild_compiles_nothing_and_a_change_compiles_what_it_touches failing, as on mod-api (#2835 fixes it).

Rebased onto `mod-api` @ c5e5b676: it was re-squashed onto main @ 46291934 (#2833) twice today (cdbb8551, then c5e5b676), which made this PR show main's and the whole mod API's diff. Now 78e48176, the same diff as before (same `git patch-id`), no conflict. main's #2833 changed `toolchain.rs`, so I ran `cargo test -p build-compile -p build-core` again on the rebased head (Windows, llvm-mingw): the same as before, with only `compile_link`'s `an_unchanged_rebuild_compiles_nothing_and_a_change_compiles_what_it_touches` failing, as on `mod-api` (#2835 fixes it).
llun force-pushed fix/mod-api-win-builder-tests from 78e48176a8
All checks were successful
PR description / Title and description (pull_request_target) Successful in 15s
to 7076f24001
All checks were successful
PR description / Title and description (pull_request_target) Successful in 16s
2026-11-30 01:32:46 +00:00
Compare
Author
Member

Rebased onto mod-api @ 537c2816 (#2848, game-free checks' fixtures only), now 7076f240: the same diff (same git patch-id), no conflict. #2848 touches none of this PR's files, so its checks still hold.

Rebased onto `mod-api` @ 537c2816 ([#2848](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2848), game-free checks' fixtures only), now 7076f240: the same diff (same `git patch-id`), no conflict. #2848 touches none of this PR's files, so its checks still hold.
llun force-pushed fix/mod-api-win-builder-tests from 7076f24001
All checks were successful
PR description / Title and description (pull_request_target) Successful in 16s
to d744973c96
All checks were successful
PR description / Title and description (pull_request_target) Successful in 16s
2026-11-30 02:14:17 +00:00
Compare
Author
Member

Rebased onto mod-api aea64d3a (#2745 nav.closest, one new commit): 7076f240 -> d744973c, the same diff (git patch-id unchanged), so the checks and runs above still hold; none of this PR's files changed on mod-api.

Rebased onto mod-api aea64d3a (#2745 nav.closest, one new commit): 7076f240 -> d744973c, the same diff (git patch-id unchanged), so the checks and runs above still hold; none of this PR's files changed on mod-api.
llun force-pushed fix/mod-api-win-builder-tests from d744973c96
All checks were successful
PR description / Title and description (pull_request_target) Successful in 16s
to 0c9dcd052e
All checks were successful
PR description / Title and description (pull_request_target) Successful in 15s
2026-11-30 03:14:19 +00:00
Compare
Author
Member

Rebased onto the new mod-api cb37f5ab (#2851 native mouse camera, #2852 modding docs), which touch none of this PR's files: the same patch (same patch-id), head 0c9dcd05.

Rebased onto the new `mod-api` cb37f5ab (#2851 native mouse camera, #2852 modding docs), which touch none of this PR's files: the same patch (same patch-id), head 0c9dcd05.
llun force-pushed fix/mod-api-win-builder-tests from 0c9dcd052e
All checks were successful
PR description / Title and description (pull_request_target) Successful in 15s
to dc64c6dd0e
All checks were successful
PR description / Title and description (pull_request_target) Successful in 9s
2026-11-30 04:14:24 +00:00
Compare
Author
Member

Rebased onto mod-api @ 12f42db5 (#2855 rustfmt of nav.closest, #2861 menu rows by place): head 0c9dcd052 -> dc64c6dd0, the same diff (patch-id unchanged); neither commit touches this PR's files.

Rebased onto mod-api @ 12f42db5 (#2855 rustfmt of nav.closest, #2861 menu rows by place): head 0c9dcd052 -> dc64c6dd0, the same diff (patch-id unchanged); neither commit touches this PR's files.
llun force-pushed fix/mod-api-win-builder-tests from dc64c6dd0e
All checks were successful
PR description / Title and description (pull_request_target) Successful in 9s
to 27c8062afa
All checks were successful
PR description / Title and description (pull_request_target) Successful in 7s
2026-11-30 18:12:01 +00:00
Compare
Author
Member

Rebased onto mod-api @ 75bcd270 (#2881 a mod adds a game language): head dc64c6dd0 -> 27c8062af, the same diff (patch-id unchanged); #2881 touches none of this PR's files.

Rebased onto mod-api @ 75bcd270 (#2881 a mod adds a game language): head dc64c6dd0 -> 27c8062af, the same diff (patch-id unchanged); #2881 touches none of this PR's files.
llun force-pushed fix/mod-api-win-builder-tests from 27c8062afa
All checks were successful
PR description / Title and description (pull_request_target) Successful in 7s
to dd2690f059
All checks were successful
PR description / Title and description (pull_request_target) Successful in 18s
2026-11-30 19:37:26 +00:00
Compare
Author
Member

Rebased onto mod-api af3e4d40 (5 new commits on 75bcd270): head dd2690f05, the same diff (patch-id unchanged). The new mod-api commits touch none of this PR's files.

Rebased onto mod-api af3e4d40 (5 new commits on 75bcd270): head dd2690f05, the same diff (patch-id unchanged). The new mod-api commits touch none of this PR's files.
llun force-pushed fix/mod-api-win-builder-tests from dd2690f059
All checks were successful
PR description / Title and description (pull_request_target) Successful in 18s
to 05f88331c8
All checks were successful
PR description / Title and description (pull_request_target) Successful in 7s
2026-11-30 22:35:43 +00:00
Compare
Author
Member

Rebased onto mod-api 716735d8 (6 new commits on top of af3e4d40): head dd2690f05 -> 05f88331c, the same diff (git patch-id unchanged). The new mod-api touches files near this PR; its checks are to be rerun on this head.

Rebased onto mod-api 716735d8 (6 new commits on top of af3e4d40): head dd2690f05 -> 05f88331c, the same diff (git patch-id unchanged). The new mod-api touches files near this PR; its checks are to be rerun on this head.
llun force-pushed fix/mod-api-win-builder-tests from 05f88331c8
All checks were successful
PR description / Title and description (pull_request_target) Successful in 7s
to 975a030945
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
2026-12-01 00:36:21 +00:00
Compare
Author
Member

Rebased onto mod-api 5780eeda (one new commit on 716735d8, the reverse-engineering tools for hook sites): head 05f88331c -> 975a03094, the same diff (git patch-id unchanged). The new mod-api commit touches files near this PR (the builder crates, Cargo, CI); its checks are to be rerun on this head before it leaves WIP.

Rebased onto mod-api 5780eeda (one new commit on 716735d8, the reverse-engineering tools for hook sites): head 05f88331c -> 975a03094, the same diff (git patch-id unchanged). The new mod-api commit touches files near this PR (the builder crates, Cargo, CI); its checks are to be rerun on this head before it leaves WIP.
llun force-pushed fix/mod-api-win-builder-tests from 975a030945
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
to 011afbf723
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
2026-12-01 01:13:57 +00:00
Compare
Author
Member

Rebased onto mod-api 65148a78 (one new commit, photo-mode and effects APIs), now at 011afbf72: the same diff (git patch-id unchanged). Checks not rerun on this PC.

Rebased onto mod-api 65148a78 (one new commit, photo-mode and effects APIs), now at 011afbf72: the same diff (git patch-id unchanged). Checks not rerun on this PC.
llun force-pushed fix/mod-api-win-builder-tests from 011afbf723
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
to 2c05344541
All checks were successful
PR description / Title and description (pull_request_target) Successful in 6s
2026-12-01 03:16:03 +00:00
Compare
Author
Member

Rebased onto the re-squashed mod-api 041890bb (it now carries main up to #2926 and #2884): only this PR's own commits moved with git rebase --onto, the diff unchanged (same git patch-id). Head 2c0534454 (was 011afbf72). Checks not rerun here: CI on the new head.

Rebased onto the re-squashed `mod-api` 041890bb (it now carries main up to #2926 and #2884): only this PR's own commits moved with `git rebase --onto`, the diff unchanged (same `git patch-id`). Head 2c0534454 (was 011afbf72). Checks not rerun here: CI on the new head.
llun force-pushed fix/mod-api-win-builder-tests from 2c05344541
All checks were successful
PR description / Title and description (pull_request_target) Successful in 6s
to 61eb17fedd
All checks were successful
PR description / Title and description (pull_request_target) Successful in 6s
2026-12-01 05:15:04 +00:00
Compare
Author
Member

Rebased onto mod-api 5740a5df (two new commits on 041890bb: actors.pose/freeze, and #2902's pool-flag sites in the owners table): head 2c0534454 -> 61eb17fed, the same diff (git patch-id unchanged). Checks not rerun on this PC: CI on the new head.

Rebased onto mod-api 5740a5df (two new commits on 041890bb: actors.pose/freeze, and #2902's pool-flag sites in the owners table): head 2c0534454 -> 61eb17fed, the same diff (git patch-id unchanged). Checks not rerun on this PC: CI on the new head.
Author
Member

Closing in favour of #2938: one pull request into mod-api with every fix a Windows test of it found, as asked. This PR's commits are there, rebased onto mod-api @ 5740a5df and checked again there on Windows (in the game, confined, and every game-free check) and Linux; its description lists this one.

Closing in favour of [#2938](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2938): one pull request into `mod-api` with every fix a Windows test of it found, as asked. This PR's commits are there, rebased onto `mod-api` @ 5740a5df and checked again there on Windows (in the game, confined, and every game-free check) and Linux; its description lists this one.
llun closed this pull request 2026-12-01 06:52:59 +00:00
All checks were successful
PR description / Title and description (pull_request_target) Successful in 6s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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!2834
No description provided.