fix(builder): from-source passes rustc's flags whole, so a data folder with a space in its path builds #2731

Merged
HumanBean merged 2 commits from llun/Longshot:fix/from-source-path-with-space into main 2026-11-28 20:38:11 +00:00
Member

Summary

A player whose launcher data folder is in a path with a space (for example under C:\Portable Programs\…) can't build any pull request. The launcher stops at "The source's longshot-builder did not compile from this source (exit code: 101)", and cargo's output ends with rustc's error: --remap-path-prefix must contain '=' between FROM and TO.

How to see it on main: run the nightly's longshot-builder from-source --commit <a PR's head> --out <folder> --cache "<a folder with a space>", which is what the launcher runs for a pull request. Cargo's first rustc call fails with the error above.

The cause: from-source passed rustc's flags to cargo in RUSTFLAGS, and cargo splits that variable at every space. So --remap-path-prefix=C:\Portable Programs\…\src=longshot reached rustc as --remap-path-prefix=C:\Portable and Programs\…=longshot. Quoting can't help, because cargo doesn't read quotes in RUSTFLAGS.

The fix: the flags now go in CARGO_ENCODED_RUSTFLAGS, which keeps each flag whole (they are separated by \x1f, not spaces). release_flags returns a list, and Toolchain::command and cargo::build take one. RenHDrum's flags go the same way. The game's Rust archive already used CARGO_ENCODED_RUSTFLAGS for its one flag; it now goes through the same parameter and gets the same flag as before. RenHDrum's C flag -ffile-prefix-map=<work>=renhdrum had the same problem: the cc crate also splits CFLAGS at spaces. When its folder has a space, it is now shell-quoted and CC_SHELL_ESCAPED_FLAGS=1 is set. Otherwise it is passed as before, so a source whose cc is older than that switch still builds as it did. The cc crate takes CC_<target> and AR_<target> as they are when they name an existing file, so those were already fine.

Read first: release_flags, remap, target_flags, prefix_map_cflags and Toolchain::command in builder/crates/longshot-builder/src/from_source/cargo.rs, then the two call sites in from_source/mod.rs (renhdrum, build_game_rust).

The fix reaches players with the next nightly after merge: the launcher runs the newest nightly's builder for from-source. Until then, a player can choose a work folder in a path without spaces under Data and cache folders.

Testing

Tested: Windows 11, RTX 5080, NVIDIA 621.40. This changes how the builder compiles a pull request's builder from source, not the game. So the game run below is the launcher's whole path for a pull request in a folder with a space: from-source, then that builder builds the game, then the game plays.

  • the_release_s_flags_hold_in_a_folder_with_a_space_in_its_name (new, in from_source/cargo.rs). It runs a real cargo build of a library with no dependencies in a folder named Portable Programs & (Jane's) ünï, using release_flags and Toolchain::command and the cargo that runs the test. It also checks that the library names no path of that folder, which shows the remap held.
    • On main (the test commit alone), it fails with rustc's own --remap-path-prefix must contain '=' between FROM and TO, the player's error.
    • On this branch, it passes.
    • With remap broken on purpose, it fails with "the library names the folder", so both halves of the check work.
  • the_release_s_flags_name_no_path_of_this_pc now builds its expected paths the way this system joins them. On main it failed on Windows, because it expected /c/fs/src/builder where Windows joins /c/fs/src\builder.
  • The real thing: from-source --commit 0b701b22dcf0b1f963785f4068faf4c7b44a3ef2 (MagicBeanDev/Longshot#2728's head, the pull request the player was building), with --cache and --out in a folder named Portable Programs & (Jane) ünï, run through the job queue. That is what the launcher runs.
    • main's builder fails at "Compiling the builder": error: --remap-path-prefix must contain '=' between FROM and TO, the player's error.
    • This branch's builder (a dev build) gets through every stage: Rust, the tools, the crates, the game's Rust archive, the third-party objects and the pack. It then compiles #2728's longshot-builder in 89 s and writes the version folder, 119 s in all. Its Longshot.exe --version says longshot-builder pr-2728-0b701b22.
    • Then the whole path the launcher takes, in the same folder: the built pr-2728-0b701b22 builder ran build --profile <folder>\profile --game <the .nup> --upscaler none --no-prepare-shaders (with LONGSHOT_CACHE in that folder). It built the game in 3:04 into versions\pr-2728-0b701b22\builds\default. Then play --profile … through the job queue (Windows 11, RTX 5080, NVIDIA 621.40). The game prepared its 38,192 pipelines into that folder's shader store at first start, then booted, writing its saves into the profile. I stopped it there.
    • RenHDrum wasn't compiled in that run, on main or here: the pinned Windows llvm-mingw has no archiver (renhdrum_not_built, the usual case on Windows).
  • RenHDrum's C through the cc crate, for real (asked for in review): the same from-source of #2728, in a folder with a space in its path, with an llvm-ar from a full llvm-mingw (LLVM 23.1.5) on PATH, so from-source compiles RenHDrum.
    • This branch's builder compiles renhdrum.dll in 20 s with the quoted CFLAGS_x86_64_pc_windows_gnullvm and CC_SHELL_ESCAPED_FLAGS=1. It then packs it (31 members), compiles the pull request's builder and writes the version folder (245 s). That builder's --version reads its pack.
    • The same builder with only the quoting turned off (prefix_map_cflags always plain) fails in RenHDrum's build script. cc splits the flag, and clang reports no such file or directory: 'ünï\…\renhdrum\work=renhdrum'. So the quoting is what makes it compile.
  • Found on the way, not fixed here: the first run's folder also had an apostrophe ((Jane's)). That run got through everything up to the builder's compile, then a build script's link failed, because clang got the Rust library paths with the ' dropped. The likely cause is the argument file rustc writes for a GNU-style linker, which escapes spaces and backslashes but not '. That is in rustc and llvm-mingw's clang, not in these flags. A data folder under a Windows user name with an apostrophe would hit it.
  • cargo test --locked -p longshot-builder --bin longshot-builder: every from_source test passes. 7 other tests fail on this Windows PC, and the same 7 fail on main (steam_cmd, dev::site_hooks, doctor, play, and 3 in main.rs; none in files this touches). cargo clippy -p longshot-builder -- -D warnings has 2 errors, in after.rs:398 and play.rs:644 (unused ExitCode), which also fail on main with this PC's Rust 1.100. CI's pinned toolchain decides.
  • Rebased onto main at bd7bcb52, which includes #2724 and #2732. Main's commits since 22d0d200 change nothing under from_source/ or in build.md, so the runs above still hold. After the rebase, the test commit alone still fails with rustc's --remap-path-prefix must contain '=', and the 17 from_source tests pass on the head.
  • No check under tests/ reads the changed files. pr status's hint matches tests/test_dev_ab.py's test_wired_from_source, which tests dev.py ab's switch scan (ab.wired_switches()) and has "from_source" only in its name. So the box for it doesn't apply and is left out.
  • scripts/check_guide_screenshots.py --review-sources (CI's "Third-party parts and guide screenshots"): the 14 issues main had are gone with #2724. One remains on main at bd7bcb52 itself, byte-identical on this branch: settings-graphics.png: gpu/vk/device_policy.h changed since reviewed revision b31dccae, from #2730. This branch doesn't touch that file.
  • Linux: not run here (this PC's WSL has no Rust). CI's cargo test --workspace runs the new test on Linux.
  • mise run test: 169 passed, 672 failed, 47 skipped. The same 672 fail on main on this PC, which has no C/C++ compiler or glslang on PATH; the failing lists are identical.

Still to test:

  • Linux, where tools.lock's llvm has an archiver: from-source with --cache in a folder with a space compiles RenHDrum and then the builder, expecting no cc error (by hand). The same cc path was compiled for real on Windows (Tested).
  • A player's launcher with its data folder under a path with a space builds a pull request once a nightly carries this (by hand, after the next nightly).

Measurements

Nothing to measure: this changes how flags are passed to cargo and the cc crate, not what is compiled. The flags are the same.

Risks

  • A cargo older than CARGO_ENCODED_RUSTFLAGS (cargo 1.55) would ignore the flags. Every source pins a much newer Rust.
  • A source whose cc crate doesn't know CC_SHELL_ESCAPED_FLAGS, built in a folder with a space, would get RenHDrum's -ffile-prefix-map with literal quotes. Its C would then still compile, without that remap. On main that case fails outright.
  • No setting changes, and nothing changes for a player after updating. A revert is enough.

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).
  • 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.
  • Docs updated.
  • 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 A player whose launcher data folder is in a path with a space (for example under `C:\Portable Programs\…`) can't build any pull request. The launcher stops at "The source's longshot-builder did not compile from this source (exit code: 101)", and cargo's output ends with rustc's `error: --remap-path-prefix must contain '=' between FROM and TO`. **How to see it on main:** run the nightly's `longshot-builder from-source --commit <a PR's head> --out <folder> --cache "<a folder with a space>"`, which is what the launcher runs for a pull request. Cargo's first rustc call fails with the error above. **The cause:** `from-source` passed rustc's flags to cargo in `RUSTFLAGS`, and cargo splits that variable at every space. So `--remap-path-prefix=C:\Portable Programs\…\src=longshot` reached rustc as `--remap-path-prefix=C:\Portable` and `Programs\…=longshot`. Quoting can't help, because cargo doesn't read quotes in `RUSTFLAGS`. **The fix:** the flags now go in `CARGO_ENCODED_RUSTFLAGS`, which keeps each flag whole (they are separated by `\x1f`, not spaces). `release_flags` returns a list, and `Toolchain::command` and `cargo::build` take one. RenHDrum's flags go the same way. The game's Rust archive already used `CARGO_ENCODED_RUSTFLAGS` for its one flag; it now goes through the same parameter and gets the same flag as before. RenHDrum's C flag `-ffile-prefix-map=<work>=renhdrum` had the same problem: the cc crate also splits `CFLAGS` at spaces. When its folder has a space, it is now shell-quoted and `CC_SHELL_ESCAPED_FLAGS=1` is set. Otherwise it is passed as before, so a source whose cc is older than that switch still builds as it did. The cc crate takes `CC_<target>` and `AR_<target>` as they are when they name an existing file, so those were already fine. Read first: `release_flags`, `remap`, `target_flags`, `prefix_map_cflags` and `Toolchain::command` in `builder/crates/longshot-builder/src/from_source/cargo.rs`, then the two call sites in `from_source/mod.rs` (`renhdrum`, `build_game_rust`). The fix reaches players with the next nightly after merge: the launcher runs the newest nightly's builder for `from-source`. Until then, a player can choose a work folder in a path without spaces under **Data and cache folders**. ## Testing **Tested:** Windows 11, RTX 5080, NVIDIA 621.40. This changes how the builder compiles a pull request's builder from source, not the game. So the game run below is the launcher's whole path for a pull request in a folder with a space: from-source, then that builder builds the game, then the game plays. - `the_release_s_flags_hold_in_a_folder_with_a_space_in_its_name` (new, in `from_source/cargo.rs`). It runs a real `cargo build` of a library with no dependencies in a folder named `Portable Programs & (Jane's) ünï`, using `release_flags` and `Toolchain::command` and the cargo that runs the test. It also checks that the library names no path of that folder, which shows the remap held. - On main (the test commit alone), it fails with rustc's own `--remap-path-prefix must contain '=' between FROM and TO`, the player's error. - On this branch, it passes. - With `remap` broken on purpose, it fails with "the library names the folder", so both halves of the check work. - `the_release_s_flags_name_no_path_of_this_pc` now builds its expected paths the way this system joins them. On main it failed on Windows, because it expected `/c/fs/src/builder` where Windows joins `/c/fs/src\builder`. - The real thing: `from-source --commit 0b701b22dcf0b1f963785f4068faf4c7b44a3ef2` ([MagicBeanDev/Longshot#2728](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2728)'s head, the pull request the player was building), with `--cache` and `--out` in a folder named `Portable Programs & (Jane) ünï`, run through the job queue. That is what the launcher runs. - **main's builder** fails at "Compiling the builder": `error: --remap-path-prefix must contain '=' between FROM and TO`, the player's error. - **This branch's builder** (a dev build) gets through every stage: Rust, the tools, the crates, the game's Rust archive, the third-party objects and the pack. It then compiles #2728's `longshot-builder` in 89 s and writes the version folder, 119 s in all. Its `Longshot.exe --version` says `longshot-builder pr-2728-0b701b22`. - Then the whole path the launcher takes, in the same folder: the built `pr-2728-0b701b22` builder ran `build --profile <folder>\profile --game <the .nup> --upscaler none --no-prepare-shaders` (with `LONGSHOT_CACHE` in that folder). It built the game in 3:04 into `versions\pr-2728-0b701b22\builds\default`. Then `play --profile …` through the job queue (Windows 11, RTX 5080, NVIDIA 621.40). The game prepared its 38,192 pipelines into that folder's shader store at first start, then booted, writing its saves into the profile. I stopped it there. - RenHDrum wasn't compiled in that run, on main or here: the pinned Windows llvm-mingw has no archiver (`renhdrum_not_built`, the usual case on Windows). - RenHDrum's C through the cc crate, for real (asked for in review): the same `from-source` of #2728, in a folder with a space in its path, with an `llvm-ar` from a full llvm-mingw (LLVM 23.1.5) on PATH, so `from-source` compiles RenHDrum. - **This branch's builder** compiles `renhdrum.dll` in 20 s with the quoted `CFLAGS_x86_64_pc_windows_gnullvm` and `CC_SHELL_ESCAPED_FLAGS=1`. It then packs it (31 members), compiles the pull request's builder and writes the version folder (245 s). That builder's `--version` reads its pack. - **The same builder with only the quoting turned off** (`prefix_map_cflags` always plain) fails in RenHDrum's build script. cc splits the flag, and clang reports `no such file or directory: 'ünï\…\renhdrum\work=renhdrum'`. So the quoting is what makes it compile. - Found on the way, not fixed here: the first run's folder also had an apostrophe (`(Jane's)`). That run got through everything up to the builder's compile, then a build script's link failed, because clang got the Rust library paths with the `'` dropped. The likely cause is the argument file rustc writes for a GNU-style linker, which escapes spaces and backslashes but not `'`. That is in rustc and llvm-mingw's clang, not in these flags. A data folder under a Windows user name with an apostrophe would hit it. - `cargo test --locked -p longshot-builder --bin longshot-builder`: every `from_source` test passes. 7 other tests fail on this Windows PC, and the same 7 fail on main (`steam_cmd`, `dev::site_hooks`, `doctor`, `play`, and 3 in `main.rs`; none in files this touches). `cargo clippy -p longshot-builder -- -D warnings` has 2 errors, in `after.rs:398` and `play.rs:644` (`unused ExitCode`), which also fail on main with this PC's Rust 1.100. CI's pinned toolchain decides. - Rebased onto main at bd7bcb52, which includes #2724 and #2732. Main's commits since 22d0d200 change nothing under `from_source/` or in `build.md`, so the runs above still hold. After the rebase, the test commit alone still fails with rustc's `--remap-path-prefix must contain '='`, and the 17 `from_source` tests pass on the head. - No check under `tests/` reads the changed files. `pr status`'s hint matches `tests/test_dev_ab.py`'s `test_wired_from_source`, which tests `dev.py ab`'s switch scan (`ab.wired_switches()`) and has "from_source" only in its name. So the box for it doesn't apply and is left out. - `scripts/check_guide_screenshots.py --review-sources` (CI's "Third-party parts and guide screenshots"): the 14 issues main had are gone with #2724. One remains on main at bd7bcb52 itself, byte-identical on this branch: `settings-graphics.png: gpu/vk/device_policy.h changed since reviewed revision b31dccae`, from #2730. This branch doesn't touch that file. - Linux: not run here (this PC's WSL has no Rust). CI's `cargo test --workspace` runs the new test on Linux. - `mise run test`: 169 passed, 672 failed, 47 skipped. The same 672 fail on main on this PC, which has no C/C++ compiler or glslang on PATH; the failing lists are identical. **Still to test:** - Linux, where tools.lock's llvm has an archiver: `from-source` with `--cache` in a folder with a space compiles RenHDrum and then the builder, expecting no cc error (by hand). The same cc path was compiled for real on Windows (Tested). - A player's launcher with its data folder under a path with a space builds a pull request once a nightly carries this (by hand, after the next nightly). ## Measurements Nothing to measure: this changes how flags are passed to cargo and the cc crate, not what is compiled. The flags are the same. ## Risks - A cargo older than `CARGO_ENCODED_RUSTFLAGS` (cargo 1.55) would ignore the flags. Every source pins a much newer Rust. - A source whose cc crate doesn't know `CC_SHELL_ESCAPED_FLAGS`, built in a folder with a space, would get RenHDrum's `-ffile-prefix-map` with literal quotes. Its C would then still compile, without that remap. On main that case fails outright. - No setting changes, and nothing changes for a player after updating. A revert is enough. ## 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. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [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] Docs updated. - [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)
A launcher's data folder under "C:\Portable Programs\...": from-source's cargo
build of a pull request's longshot-builder stops at cargo's first rustc run,
"--remap-path-prefix must contain '=' between FROM and TO". This builds a tiny
library with the release's flags through Toolchain::command in such a folder,
with the cargo running the test, and checks the library names no path of the
folder (the remap held). Fails here: RUSTFLAGS is split at every space, each
path cut in pieces.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(builder): from-source passes rustc's flags whole, so a data folder with a space in its path builds
Some checks failed
CI / What the change needs (pull_request) Successful in 9s
CI / Third-party parts and guide screenshots (pull_request) Failing after 12s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 12s
PR description / Title and description (pull_request_target) Successful in 6s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m9s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m15s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m19s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m16s
CI / Website build and checks (pull_request) Failing after 35s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 27m41s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 41m19s
3838cf15ad
The flags of from-source's cargo runs went in RUSTFLAGS, which cargo splits at
every space: with the launcher's data folder in a path with a space, each
--remap-path-prefix=<path>=<name> was cut in pieces and rustc refused the first
("must contain '=' between FROM and TO"), so no pull request could be built.
They now go in CARGO_ENCODED_RUSTFLAGS, one flag apiece (release_flags and
RenHDrum's a list; the game's Rust archive the same flag as before, by the same
road). RenHDrum's C flag -ffile-prefix-map=<work>=renhdrum, which the cc crate
splits the same way, goes shell-quoted with CC_SHELL_ESCAPED_FLAGS=1 when its
path has a space, and as before otherwise. The release-flags check names its
paths as this system joins them, so it passes on Windows too.

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

Tested in game: Windows 11, RTX 5080, NVIDIA 621.40: the launcher's whole path for a pull request, all in a folder whose path has a space (and &, parentheses, non-ASCII). This branch's builder ran from-source on #2728's head (main's builder fails there with the player's --remap-path-prefix error); the pull request's builder it made then built the game (3:04); the game prepared its shaders into that folder's store and booted, writing its saves into the profile there.

Tested in game: Windows 11, RTX 5080, NVIDIA 621.40: the launcher's whole path for a pull request, all in a folder whose path has a space (and &, parentheses, non-ASCII). This branch's builder ran from-source on #2728's head (main's builder fails there with the player's --remap-path-prefix error); the pull request's builder it made then built the game (3:04); the game prepared its shaders into that folder's store and booted, writing its saves into the profile there.
Author
Member
@review
BeanBot left a comment

Recommendation: Request changes. The reported Windows run shows that the original Rust flag failure is fixed. RenHDrum’s separate C flag handling still needs a real build on a system that compiles it. (It stands on L2: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 12s.)

The builder passes Rust flags as separate arguments so source builds can work in cache paths containing spaces, and quotes RenHDrum’s C prefix-map flag for the same case. The change adds a small amount of argument-handling code without changing the intended compiler flags.

Blocking (1): must change before merging.

  1. L2: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 12s.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L1 builder/crates/longshot-builder/src/from_source/mod.rs:436: The new RenHDrum C flag quoting has not been exercised by a real cc compilation. (more on the line) Do: Run from-source on Linux with an archiver and a cache path containing a space, and confirm RenHDrum compiles and the resulting builder works. Also exercise the Windows archiver path when available.

@fix can do L2.

Checks: Still running: 7 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes for the reported Windows case: main failed with the remap-path-prefix error, while this branch built the pull request’s builder and then the game in the same spaced path. RenHDrum was skipped in that run, so its fix remains unproven.

Other systems: The Rust archive and builder compilation use the same encoded flag path; the reported Windows run exercised both. Linux and Windows installations with an archiver can also compile RenHDrum, whose cc flag parsing was not exercised by that run. GPU rendering and gameplay code are unchanged.

Switches: No Longshot player switch was added or changed. CC_SHELL_ESCAPED_FLAGS is set to 1 only for RenHDrum builds whose work path contains ASCII whitespace; otherwise it is unset.

Reviewed: 3838cf15ad against 22d0d20098: Read AGENTS.md, CONTRIBUTING.md, the pull request template, standards, both changed Rust files, the changed documentation passage, the diff, commits, relevant callers and reported runs. Skimmed the rest of build.md. docs/review-checklist.md and ../Tooling/AGENTS.md were absent; no generated files or translations changed.; nothing run (a code review).

Checked and fine:

  • Both commits record AI assistance.
  • The game Rust archive retains its previous remap flag.
  • No game-derived outputs, generated files, third-party files or renderer API definitions changed.
  • The reported game-free test fails on main for the original error and passes on this branch.

Testing: No commands from the project were run, as requested. The supplied CI has one head-only failure and several checks still running; the bot handles the failure.

Overlaps and merge order: Not checked; network access is unavailable.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The reported Windows run shows that the original Rust flag failure is fixed. RenHDrum’s separate C flag handling still needs a real build on a system that compiles it. (It stands on L2: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 12s.) The builder passes Rust flags as separate arguments so source builds can work in cache paths containing spaces, and quotes RenHDrum’s C prefix-map flag for the same case. The change adds a small amount of argument-handling code without changing the intended compiler flags. **Blocking (1)**: must change before merging. 1. **L2**: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 12s. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L1** `builder/crates/longshot-builder/src/from_source/mod.rs:436`: The new RenHDrum C flag quoting has not been exercised by a real cc compilation. (more on the line) **Do:** Run from-source on Linux with an archiver and a cache path containing a space, and confirm RenHDrum compiles and the resulting builder works. Also exercise the Windows archiver path when available. `@fix` can do L2. **Checks:** Still running: 7 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the reported Windows case: main failed with the remap-path-prefix error, while this branch built the pull request’s builder and then the game in the same spaced path. RenHDrum was skipped in that run, so its fix remains unproven. **Other systems:** The Rust archive and builder compilation use the same encoded flag path; the reported Windows run exercised both. Linux and Windows installations with an archiver can also compile RenHDrum, whose cc flag parsing was not exercised by that run. GPU rendering and gameplay code are unchanged. **Switches:** No Longshot player switch was added or changed. CC_SHELL_ESCAPED_FLAGS is set to 1 only for RenHDrum builds whose work path contains ASCII whitespace; otherwise it is unset. **Reviewed:** 3838cf15ad10 against 22d0d20098d6: Read AGENTS.md, CONTRIBUTING.md, the pull request template, standards, both changed Rust files, the changed documentation passage, the diff, commits, relevant callers and reported runs. Skimmed the rest of build.md. docs/review-checklist.md and ../Tooling/AGENTS.md were absent; no generated files or translations changed.; nothing run (a code review). **Checked and fine:** - Both commits record AI assistance. - The game Rust archive retains its previous remap flag. - No game-derived outputs, generated files, third-party files or renderer API definitions changed. - The reported game-free test fails on main for the original error and passes on this branch. **Testing:** No commands from the project were run, as requested. The supplied CI has one head-only failure and several checks still running; the bot handles the failure. **Overlaps and merge order:** Not checked; network access is unavailable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -437,3 +434,3 @@
(format!("CFLAGS_{under}"), format!("-ffile-prefix-map={}=renhdrum", work.display())),
];
env.extend(cargo::prefix_map_cflags(&under, &work, "renhdrum"));
let built = if cfg!(windows) { "renhdrum.dll" } else { "librenhdrum.so" };
Member

L1 (should fix): The new RenHDrum C flag quoting has not been exercised by a real cc compilation.

When: When an archiver is present and the cache path contains a space, from-source builds RenHDrum using this quoted CFLAGS value; the reported Windows run skipped that branch, and the unit test checks only the constructed strings.

Do: Run from-source on Linux with an archiver and a cache path containing a space, and confirm RenHDrum compiles and the resulting builder works. Also exercise the Windows archiver path when available.

**L1** (should fix): The new RenHDrum C flag quoting has not been exercised by a real cc compilation. *When:* When an archiver is present and the cache path contains a space, from-source builds RenHDrum using this quoted CFLAGS value; the reported Windows run skipped that branch, and the unit test checks only the constructed strings. **Do:** Run from-source on Linux with an archiver and a cache path containing a space, and confirm RenHDrum compiles and the resulting builder works. Also exercise the Windows archiver path when available.
Author
Member
@fix
Member

Nothing needed changing: the review's items are already done.

Not done

  • Guide screenshot source review: The checkout's docs/user/images/guide/source-review-2182-c25ecc4a.md records the same 14 mismatches on the base branch. The supplied log omits their filenames. The affected sources and guide need review before their hashes can be updated; no files were changed.

For the author (no edit does these)

  • L1 builder/crates/longshot-builder/src/from_source/mod.rs:436: The new RenHDrum C flag quoting has not been exercised by a real cc compilation. When: When an archiver is present and the cache path contains a space, from-source builds RenHDrum using this quoted CFLAGS value; the reported Windows run skipped that branch, and the unit test checks only the constructed strings. Do: Run from-source on Linux with an archiver and a cache path containing a space, and confirm RenHDrum compiles and the resulting builder works. Also exercise the Windows archiver path when available.

Nothing was pushed.


Automated fix by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

Nothing needed changing: the review's items are already done. **Not done** - **Guide screenshot source review**: The checkout's docs/user/images/guide/source-review-2182-c25ecc4a.md records the same 14 mismatches on the base branch. The supplied log omits their filenames. The affected sources and guide need review before their hashes can be updated; no files were changed. **For the author** (no edit does these) - **L1** `builder/crates/longshot-builder/src/from_source/mod.rs:436`: The new RenHDrum C flag quoting has not been exercised by a real cc compilation. *When:* When an archiver is present and the cache path contains a space, from-source builds RenHDrum using this quoted CFLAGS value; the reported Windows run skipped that branch, and the unit test checks only the constructed strings. **Do:** Run from-source on Linux with an archiver and a cache path containing a space, and confirm RenHDrum compiles and the resulting builder works. Also exercise the Windows archiver path when available. Nothing was pushed. --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
Author
Member

Answers to the review. No code changed and nothing was pushed: the head is still 3838cf15.

L2, CI / Third-party parts and guide screenshots: this branch didn't cause it.

  • python3 -I -B scripts/check_guide_screenshots.py --review-sources (the step that fails) gives the same 14 REVIEW REQUIRED issues on main at 22d0d200 as on this branch. The two outputs are byte-identical; for example, settings-graphics.png: gpu/vk/vk_menu.cpp changed since reviewed revision.
  • This branch touches only builder/crates/longshot-builder/src/from_source/ and one paragraph of docs/dev/reference/build.md, none of the screenshots' sources.
  • #2724 updates those reviewed sources. I'll rebase this branch onto main once it merges.

L1, a real RenHDrum compile through cc: done on Windows, in a folder with a space in its path. Both runs did from-source of #2728 with an llvm-ar (LLVM 23.1.5, from a full llvm-mingw) on PATH, so RenHDrum is compiled rather than skipped.

  • This branch: renhdrum: renhdrum.dll compiled in 20 s, with CFLAGS_x86_64_pc_windows_gnullvm quoted and CC_SHELL_ESCAPED_FLAGS=1. It's packed, then the pull request's builder compiles and its --version reads the pack (245 s in all).
  • The same builder with only the quoting turned off: RenHDrum's build script fails. cc splits the flag at the space, and clang says no such file or directory: 'ünï\…\renhdrum\work=renhdrum'.

Linux, with tools.lock's llvm, stays under Still to test (by hand). The description's Testing now has both runs.

Answers to the review. No code changed and nothing was pushed: the head is still 3838cf15. **L2, `CI / Third-party parts and guide screenshots`:** this branch didn't cause it. - `python3 -I -B scripts/check_guide_screenshots.py --review-sources` (the step that fails) gives the same 14 `REVIEW REQUIRED` issues on main at 22d0d200 as on this branch. The two outputs are byte-identical; for example, `settings-graphics.png: gpu/vk/vk_menu.cpp changed since reviewed revision`. - This branch touches only `builder/crates/longshot-builder/src/from_source/` and one paragraph of `docs/dev/reference/build.md`, none of the screenshots' sources. - #2724 updates those reviewed sources. I'll rebase this branch onto main once it merges. **L1, a real RenHDrum compile through cc:** done on Windows, in a folder with a space in its path. Both runs did `from-source` of #2728 with an `llvm-ar` (LLVM 23.1.5, from a full llvm-mingw) on PATH, so RenHDrum is compiled rather than skipped. - **This branch:** `renhdrum: renhdrum.dll compiled in 20 s`, with `CFLAGS_x86_64_pc_windows_gnullvm` quoted and `CC_SHELL_ESCAPED_FLAGS=1`. It's packed, then the pull request's builder compiles and its `--version` reads the pack (245 s in all). - **The same builder with only the quoting turned off:** RenHDrum's build script fails. cc splits the flag at the space, and clang says `no such file or directory: 'ünï\…\renhdrum\work=renhdrum'`. Linux, with tools.lock's llvm, stays under Still to test (by hand). The description's Testing now has both runs.
llun force-pushed fix/from-source-path-with-space from 3838cf15ad
Some checks failed
CI / What the change needs (pull_request) Successful in 9s
CI / Third-party parts and guide screenshots (pull_request) Failing after 12s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 12s
PR description / Title and description (pull_request_target) Successful in 6s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m9s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m15s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m19s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m16s
CI / Website build and checks (pull_request) Failing after 35s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 27m41s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 41m19s
to 6b9cb765f2
Some checks failed
CI / What the change needs (pull_request) Successful in 15s
PR description / Title and description (pull_request_target) Successful in 14s
CI / Third-party parts and guide screenshots (pull_request) Failing after 23s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 22s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m28s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m17s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m28s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m25s
CI / Website build and checks (pull_request) Failing after 36s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
2026-11-28 19:54:02 +00:00
Compare
Author
Member

Rebased onto main at bd7bcb52, which includes #2724 (the stale guide screenshots) and #2732 (the Python twin of this fix). The rebase was clean, and the new head is 6b9cb765.

  • Guide screenshots (L2): the 14 issues main had are gone. check_guide_screenshots.py --review-sources now reports one, and main at bd7bcb52 reports exactly the same one: settings-graphics.png: gpu/vk/device_policy.h changed since reviewed revision b31dccae, from #2730, which merged after #2724. This branch doesn't touch that file, so that check stays red until main's own review hash is updated.
  • The tests/ hint: no check reads the changed files. The match is test_dev_ab.py's test_wired_from_source, a test of dev.py ab's switch scan with "from_source" only in its name. The description now says so.
  • After the rebase: the test commit alone still fails with rustc's --remap-path-prefix must contain '=', and the 17 from_source tests pass on the head. Main's new commits change nothing under from_source/, so the Windows runs in Testing still hold.
Rebased onto main at bd7bcb52, which includes #2724 (the stale guide screenshots) and #2732 (the Python twin of this fix). The rebase was clean, and the new head is 6b9cb765. - **Guide screenshots (L2):** the 14 issues main had are gone. `check_guide_screenshots.py --review-sources` now reports one, and main at bd7bcb52 reports exactly the same one: `settings-graphics.png: gpu/vk/device_policy.h changed since reviewed revision b31dccae`, from #2730, which merged after #2724. This branch doesn't touch that file, so that check stays red until main's own review hash is updated. - **The `tests/` hint:** no check reads the changed files. The match is `test_dev_ab.py`'s `test_wired_from_source`, a test of `dev.py ab`'s switch scan with "from_source" only in its name. The description now says so. - **After the rebase:** the test commit alone still fails with rustc's `--remap-path-prefix must contain '='`, and the 17 `from_source` tests pass on the head. Main's new commits change nothing under `from_source/`, so the Windows runs in Testing still hold.
Author
Member

Rebased onto main at 3b42f60d (#2741, #2760, neither touches from_source/): clean, head 33f5a177; the 17 from_source tests pass and formatting is clean. The guide-screenshot check still fails on main's own #2730 issue (settings-graphics.png, device_policy.h), not this branch.

Rebased onto main at 3b42f60d (#2741, #2760, neither touches from_source/): clean, head 33f5a177; the 17 from_source tests pass and formatting is clean. The guide-screenshot check still fails on main's own #2730 issue (settings-graphics.png, device_policy.h), not this branch.
llun force-pushed fix/from-source-path-with-space from 6b9cb765f2
Some checks failed
CI / What the change needs (pull_request) Successful in 15s
PR description / Title and description (pull_request_target) Successful in 14s
CI / Third-party parts and guide screenshots (pull_request) Failing after 23s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 22s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m28s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m17s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m28s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m25s
CI / Website build and checks (pull_request) Failing after 36s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
to 33f5a1770d
Some checks failed
PR description / Title and description (pull_request_target) Successful in 8s
CI / What the change needs (pull_request) Successful in 13s
CI / Third-party parts and guide screenshots (pull_request) Failing after 15s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 13s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m16s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m9s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m8s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m31s
CI / Website build and checks (pull_request) Failing after 36s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 32m29s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 43m28s
2026-11-28 20:36:57 +00:00
Compare
HumanBean approved these changes 2026-11-28 20:37:38 +00:00
HumanBean deleted branch fix/from-source-path-with-space 2026-11-28 20:38:11 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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!2731
No description provided.