fix(builder): from-source compiles the third-party objects with dev compile, and a failure there says what the builder said #2774

Merged
HumanBean merged 3 commits from llun/Longshot:fix/from-source-dev-compile into main 2026-11-29 03:06:54 +00:00
Member

Summary

Building a pull request (or Main) from the Longshot Launcher stops at "The third-party objects could not be compiled
from the source (exit code: 1):"
, with nothing after the colon.

Cause. #2762 made compile a developer's command (longshot-builder dev compile), and #2769 moved the packager's
calls over. But from-source still starts its nested builder with compile --third-party-objects …. The launcher
installs the newest nightly builder as Longshot.exe to run from-source. Under that play name, play::wanted treats
any first word missing from play's COMMANDS as game arguments. compile left that list in #2762. So the nested builder
plays: it runs the fast check and starts a game build instead of compiling the objects. Then it fails without an
error event. third_party_objects only kept that event's text, so the message ended at the colon.

On main: run any release builder renamed Longshot.exe (as the launcher has it) with from-source --commit <sha> --out <dir> --name x --output json. Or run the line it gives its child,
Longshot.exe compile --work … --third-party-objects … --output json, by hand. The child prints
fast check: not built yet, play_plan, build_plan and no compile.

Changes

  • from_source::third_party_args: the nested builder's command line, now dev compile …. dev is in play's
    COMMANDS, so it runs under any program name.
  • from_source::not_compiled: after the error event's text (when there is one), the failure adds "The end of what
    the builder said:"
    and the builder's last 20 lines: its stderr, its log events, and any line that isn't an event.
    Cargo's failures already do the same ("The end of what cargo said:"). The launcher shows the builder's error text as
    it is, so the launcher needs no change.
  • from_source::drain and Tail (review): both pipes are read by each_line, which reads raw lines (at most 1 MiB at a
    time) and decodes them lossily, so a byte that isn't UTF-8 stops neither pipe. Only the end is kept while the builder
    speaks: the last 20 non-blank lines, each cut to 1 KiB, 8 KiB in all, with a log event's lines split.
  • docs/dev/reference/build.md: the from-source step names dev compile.

Read first: third_party_objects, third_party_args, drain, Tail and not_compiled in
builder/crates/longshot-builder/src/from_source/mod.rs.

It came in as a player's report from the launcher: a PR build (nightly launcher, a .nup on a path without spaces)
stopped there with no output. #2731 and #2732 (from-source's rustc and cc flags) did not cause it.

Testing

Tested: Windows 11, this PC, the builder from this branch (debug).

  • Both new tests fail on the test commit and pass on the fix commit (cargo test -p longshot-builder):
    • tests::from_source_s_third_party_compile_is_a_command_this_builder_runs: on main, play::wanted("/v/Longshot.exe", line) is Some(…) (played).
    • from_source::tests::a_failed_third_party_compile_says_the_end_of_what_the_builder_said: on main, the message ends
      at (exit code: 1): .
  • The review's collector tests pass, and each fails with its part undone:
    • the_builder_s_output_is_read_to_its_end_on_both_pipes: with the old .lines() reader, the error event after an
      invalid byte is lost (left: "").
    • the_end_kept_is_bounded_while_the_builder_speaks: without the bound, all 5000 lines are kept.
  • Repro on main's code: the unfixed builder copied as Longshot.exe and run with from-source's child line, in an empty
    temp folder. It played (fast check, build_plan) and ended with exit 121, no compile.
  • End to end, the launcher's way: this branch's builder copied as Longshot.exe, then from-source --commit 4a266e78e --out … --name main-4a266e78 --output json, with a temp LONGSHOT_CACHE. It got the source, Rust and the tools, then compiled the 322 third-party objects through the nested dev compile (36.5 s). It made the pack, compiled the builder (66 s) and ended with done in 176 s. The builder it made answers --version as longshot-builder main-4a266e78 (source …).
  • A pull request's whole path, in the game: this branch's own head (git archive of f80bef20, since the fork's archive isn't public) through from-source --archive … --commit …, run by the fixed builder as Longshot.exe. It finished in 67 s (the third-party objects 10.9 s, from the cache). Its builder (pr-fix-f80bef20) then ran build --profile <temp> --game <the .nup> --upscaler fsr4, and play started the game: RTX 5080, NVIDIA 621.40, Windows 11. The game ran at 1920×1080 and presented 5520 frames, with no fatal, panic or device-lost line in its log, until I closed it.
  • Linux (WSL Ubuntu 24.04, x86_64), this branch's head 89f81ff0 as a git archive:
    • the signed nightly-909 (main 4a266e78, fetched with longshot-builder fetch nightly --platform linux-x64), as
      Longshot.x86_64, fails its from-source with the player's error: The third-party objects could not be compiled from the source (exit status: 120): (120 is play's "never built");
    • this branch's builder, built with the Rust that run left in its cache, as Longshot.x86_64: the same from-source
      compiled the 322 third-party objects (20.4 s), compiled the builder and ended with done in 82 s; the builder it
      made answers --version as longshot-builder pr-fix-linux (source …);
    • the 8 from_source::tests and the command-line test pass there.
  • cargo test -p longshot-builder: 6 tests fail on this PC on main and here alike (Windows environment; none touch
    from-source): doctor::tests::no_gpu_reads_as_the_game_s_header_does,
    dev::site_hooks::tests::every_form_answers_as_its_hook_runs, tests::mod_calls_the_hook_with_a_context_and_its_status,
    tests::recomplauncher_s_build_step_is_a_command_line_it_takes,
    play::tests::a_first_run_writes_the_profile_from_the_copy_given_or_chosen,
    tests::a_build_for_a_profile_writes_profile_json_and_its_settings.
  • cargo clippy -p longshot-builder -- -D warnings with this PC's Rust 1.100.1 stops on an unused ExitCode at
    after.rs:398 and play.rs:669. Both are on main and untouched here.
  • tests/run_all.py --strict --changed: on Windows, test_dev_packs, byte_compile_tracked, test_recomplauncher_json
    and test_no_release_lookup pass. test_dev_build, test_builder_channel, test_longshot_exit and
    test_prompt_font_bind fail here and on main alike (no gcc, Linux cases). All 4 pass in WSL Ubuntu 24.04.

Still to test:

  • Windows and Linux, the Longshot Launcher: the first signed nightly after this merges, building a pull request (#2765,
    say) from the launcher's Pull request channel, expecting it past "Building the tools from source" (by hand).

Measurements

Nothing to measure: from-source's command line and an error message. The game isn't changed.

Risks

  • dev compile takes the same flags compile took before #2762 (--work, --root, --store, --jobs, --cache,
    --output, --third-party-objects). The new test parses the whole line through parse.
  • The fix reaches players with the next nightly, since the launcher runs the newest nightly's from-source. Until then,
    every Pull request and Main build from the launcher fails at this step. The prebuilt channels (Stable, Release
    candidate, Nightly) are not affected.
  • A longer error text in the launcher when the step fails (at most 20 more lines, 8 KiB).

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 PC has no gcc. The checks that read
    the changed files are named above and pass in WSL; the builder's 6 pre-existing failures are 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.
  • A check under tests/ that reads changed source is updated, not weakened. (Those reading main.rs and
    from_source/mod.rs needed no change and pass as they are; no switch is added: LONGSHOT_CACHE is only in the
    new test's assertion.)
  • 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 Building a pull request (or Main) from the Longshot Launcher stops at **"The third-party objects could not be compiled from the source (exit code: 1):"**, with nothing after the colon. **Cause.** #2762 made `compile` a developer's command (`longshot-builder dev compile`), and #2769 moved the packager's calls over. But `from-source` still starts its nested builder with `compile --third-party-objects …`. The launcher installs the newest nightly builder as `Longshot.exe` to run `from-source`. Under that play name, `play::wanted` treats any first word missing from play's `COMMANDS` as game arguments. `compile` left that list in #2762. So the nested builder **plays**: it runs the fast check and starts a game build instead of compiling the objects. Then it fails without an `error` event. `third_party_objects` only kept that event's text, so the message ended at the colon. **On main:** run any release builder renamed `Longshot.exe` (as the launcher has it) with `from-source --commit <sha> --out <dir> --name x --output json`. Or run the line it gives its child, `Longshot.exe compile --work … --third-party-objects … --output json`, by hand. The child prints `fast check: not built yet`, `play_plan`, `build_plan` and no compile. **Changes** - `from_source::third_party_args`: the nested builder's command line, now `dev compile …`. `dev` is in play's `COMMANDS`, so it runs under any program name. - `from_source::not_compiled`: after the `error` event's text (when there is one), the failure adds **"The end of what the builder said:"** and the builder's last 20 lines: its stderr, its log events, and any line that isn't an event. Cargo's failures already do the same ("The end of what cargo said:"). The launcher shows the builder's error text as it is, so the launcher needs no change. - `from_source::drain` and `Tail` (review): both pipes are read by `each_line`, which reads raw lines (at most 1 MiB at a time) and decodes them lossily, so a byte that isn't UTF-8 stops neither pipe. Only the end is kept while the builder speaks: the last 20 non-blank lines, each cut to 1 KiB, 8 KiB in all, with a log event's lines split. - `docs/dev/reference/build.md`: the from-source step names `dev compile`. Read first: `third_party_objects`, `third_party_args`, `drain`, `Tail` and `not_compiled` in `builder/crates/longshot-builder/src/from_source/mod.rs`. It came in as a player's report from the launcher: a PR build (nightly launcher, a `.nup` on a path without spaces) stopped there with no output. #2731 and #2732 (from-source's rustc and cc flags) did not cause it. ## Testing **Tested:** Windows 11, this PC, the builder from this branch (debug). - Both new tests fail on the test commit and pass on the fix commit (`cargo test -p longshot-builder`): - `tests::from_source_s_third_party_compile_is_a_command_this_builder_runs`: on main, `play::wanted("/v/Longshot.exe", line)` is `Some(…)` (played). - `from_source::tests::a_failed_third_party_compile_says_the_end_of_what_the_builder_said`: on main, the message ends at `(exit code: 1): `. - The review's collector tests pass, and each fails with its part undone: - `the_builder_s_output_is_read_to_its_end_on_both_pipes`: with the old `.lines()` reader, the error event after an invalid byte is lost (`left: ""`). - `the_end_kept_is_bounded_while_the_builder_speaks`: without the bound, all 5000 lines are kept. - Repro on main's code: the unfixed builder copied as `Longshot.exe` and run with from-source's child line, in an empty temp folder. It played (fast check, `build_plan`) and ended with exit 121, no compile. - End to end, the launcher's way: this branch's builder copied as `Longshot.exe`, then `from-source --commit 4a266e78e --out … --name main-4a266e78 --output json`, with a temp `LONGSHOT_CACHE`. It got the source, Rust and the tools, then compiled the 322 third-party objects through the nested `dev compile` (36.5 s). It made the pack, compiled the builder (66 s) and ended with `done` in 176 s. The builder it made answers `--version` as `longshot-builder main-4a266e78 (source …)`. - A pull request's whole path, in the game: this branch's own head (`git archive` of f80bef20, since the fork's archive isn't public) through `from-source --archive … --commit …`, run by the fixed builder as `Longshot.exe`. It finished in 67 s (the third-party objects 10.9 s, from the cache). Its builder (`pr-fix-f80bef20`) then ran `build --profile <temp> --game <the .nup> --upscaler fsr4`, and `play` started the game: RTX 5080, NVIDIA 621.40, Windows 11. The game ran at 1920×1080 and presented 5520 frames, with no fatal, panic or device-lost line in its log, until I closed it. - **Linux** (WSL Ubuntu 24.04, x86_64), this branch's head `89f81ff0` as a `git archive`: - the signed nightly-909 (main `4a266e78`, fetched with `longshot-builder fetch nightly --platform linux-x64`), as `Longshot.x86_64`, fails its from-source with the player's error: `The third-party objects could not be compiled from the source (exit status: 120): ` (120 is play's "never built"); - this branch's builder, built with the Rust that run left in its cache, as `Longshot.x86_64`: the same from-source compiled the 322 third-party objects (20.4 s), compiled the builder and ended with `done` in 82 s; the builder it made answers `--version` as `longshot-builder pr-fix-linux (source …)`; - the 8 `from_source::tests` and the command-line test pass there. - `cargo test -p longshot-builder`: 6 tests fail on this PC on main and here alike (Windows environment; none touch from-source): `doctor::tests::no_gpu_reads_as_the_game_s_header_does`, `dev::site_hooks::tests::every_form_answers_as_its_hook_runs`, `tests::mod_calls_the_hook_with_a_context_and_its_status`, `tests::recomplauncher_s_build_step_is_a_command_line_it_takes`, `play::tests::a_first_run_writes_the_profile_from_the_copy_given_or_chosen`, `tests::a_build_for_a_profile_writes_profile_json_and_its_settings`. - `cargo clippy -p longshot-builder -- -D warnings` with this PC's Rust 1.100.1 stops on an unused `ExitCode` at `after.rs:398` and `play.rs:669`. Both are on main and untouched here. - `tests/run_all.py --strict --changed`: on Windows, `test_dev_packs`, `byte_compile_tracked`, `test_recomplauncher_json` and `test_no_release_lookup` pass. `test_dev_build`, `test_builder_channel`, `test_longshot_exit` and `test_prompt_font_bind` fail here and on main alike (no gcc, Linux cases). All 4 pass in WSL Ubuntu 24.04. **Still to test:** - Windows and Linux, the Longshot Launcher: the first signed nightly after this merges, building a pull request (#2765, say) from the launcher's Pull request channel, expecting it past "Building the tools from source" (by hand). ## Measurements Nothing to measure: from-source's command line and an error message. The game isn't changed. ## Risks - `dev compile` takes the same flags `compile` took before #2762 (`--work`, `--root`, `--store`, `--jobs`, `--cache`, `--output`, `--third-party-objects`). The new test parses the whole line through `parse`. - The fix reaches players with the next nightly, since the launcher runs the newest nightly's `from-source`. Until then, every Pull request and Main build from the launcher fails at this step. The prebuilt channels (Stable, Release candidate, Nightly) are not affected. - A longer error text in the launcher when the step fails (at most 20 more lines, 8 KiB). ## 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). (This PC has no gcc. The checks that read the changed files are named above and pass in WSL; the builder's 6 pre-existing failures are 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] A check under `tests/` that reads changed source is updated, not weakened. (Those reading `main.rs` and `from_source/mod.rs` needed no change and pass as they are; no switch is added: `LONGSHOT_CACHE` is only in the new test's assertion.) - [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)
Two tests, failing on main:
- from_source_s_third_party_compile_is_a_command_this_builder_runs: the
  command line from-source gives its nested builder (now built by
  from_source::third_party_args) is run as the third-party compile under
  Longshot.exe, Longshot.x86_64 and longshot-builder.exe. On main it is
  `compile ...`, which since #2762 is a dev command: under a play name
  play::wanted takes it as the game's arguments.
- a_failed_third_party_compile_says_the_end_of_what_the_builder_said:
  a failure with no error event says the last 20 lines the builder
  printed. On main the message ends at "(exit code: 1): ".

The helpers are moved out of third_party_objects with main's behaviour
kept, so the tests fail for the bug's reason.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(builder): from-source compiles the third-party objects with dev compile, and a failure there says what the builder said
Some checks failed
CI / What the change needs (pull_request) Successful in 13s
CI / Third-party parts and guide screenshots (pull_request) Successful in 18s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 15s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
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
CI / Website build and checks (pull_request) Has been cancelled
f80bef20e3
Since #2762 `compile` is a developer's command (`longshot-builder dev
compile`), but from-source still started its nested builder with
`compile --third-party-objects ...`. A launcher installs the nightly
builder as Longshot.exe, and under that play name play::wanted took the
line as the game's arguments: the nested builder ran the fast check and
started a game build instead of compiling the objects, then ended with a
failure and no error event. A pull request built from the launcher
stopped at "The third-party objects could not be compiled from the
source (exit code: 1):" with nothing after it.

- third_party_args gives `dev compile ...`, which main.rs runs as the
  third-party compile under any name.
- not_compiled adds the last 20 lines the nested builder said (its
  stderr, its log events, any line that is not an event) after the
  error event's text, as cargo's failures already do ("The end of what
  the builder said:").
- docs/dev/reference/build.md's from-source step names `dev compile`.

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

Tested in game: Windows 11, RTX 5080, NVIDIA 621.40. A pull request's whole path: this branch's head built with from-source by the fixed builder named Longshot.exe (as the launcher has it). It got past the third-party objects (322 compiled) and finished. Its builder then built the game from the .nup with FSR 4, and play started it: 1920x1080, 5520 frames presented, no fatal, panic or device-lost line in the log. On main the same step plays instead of compiling and fails with an empty message.

Tested in game: Windows 11, RTX 5080, NVIDIA 621.40. A pull request's whole path: this branch's head built with from-source by the fixed builder named Longshot.exe (as the launcher has it). It got past the third-party objects (322 compiled) and finished. Its builder then built the game from the .nup with FSR 4, and play started it: 1920x1080, 5520 frames presented, no fatal, panic or device-lost line in the log. On main the same step plays instead of compiling and fails with an empty message.
llun changed title from WIP: fix(builder): from-source compiles the third-party objects with dev compile, and a failure there says what the builder said to fix(builder): from-source compiles the third-party objects with dev compile, and a failure there says what the builder said 2026-11-29 02:07:13 +00:00
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The command fix restored the reported Windows build path, including an end-to-end game build and launch. Linux verification and the running CI checks are still outstanding. Recommend approval; not approved on the forge.

From-source now invokes the third-party compile as a developer command and includes recent builder output in failure messages. The change is small and keeps the existing compile options; it also retains diagnostic output in memory until the child exits.

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:466: The launcher-style from-source build has not yet been verified on Linux. (more on the line) Do: Run the branch's builder as Longshot.x86_64 on Linux through from-source and confirm that the third-party objects and resulting builder complete.

Checks: Still running: 7 checks.

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

Does it help: Yes. The author reproduced the wrong play dispatch on main and reports that the fixed Windows builder compiled 322 third-party objects, finished from-source, and built and launched the game. Linux has not yet been exercised end to end.

Other systems: The command runs on Windows and Linux and is independent of GPU vendor. The Windows launcher-style path was tested; the Linux launcher-style path remains untested. The change does not alter game runtime code.

Switches: None added, changed or removed. The existing LONGSHOT_CACHE option is passed to the child as before.

Reviewed: f80bef20e3 against 4a266e78ee: Read the repository rules, contribution standards, PR template, complete diff and commit messages; examined the changed builder functions, their dispatch, parser, reporter and compile callers, and the new tests. Skimmed the rest of main.rs, the build reference and unrelated surrounding implementation. The referenced Tooling AGENTS.md was not present in the checkout; docs/review-checklist.md was absent.; nothing run (a code review).

Checked and fine:

  • The dev command is recognized under both play names, and the parser accepts the passed compile options.
  • The new argument test checks the command and key parsed values; the failure-message test checks the 20-line tail.
  • Both commits record AI assistance. No game-derived or generated files, API versions, or switch tables are changed.

Testing: No commands from the project or tests were run during review. The author reports Windows tests and an end-to-end build; CI is still running.

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


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

**Recommendation: Approve.** The code is ready: only testing is left. The command fix restored the reported Windows build path, including an end-to-end game build and launch. Linux verification and the running CI checks are still outstanding. Recommend approval; not approved on the forge. From-source now invokes the third-party compile as a developer command and includes recent builder output in failure messages. The change is small and keeps the existing compile options; it also retains diagnostic output in memory until the child exits. **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:466`: The launcher-style from-source build has not yet been verified on Linux. (more on the line) **Do:** Run the branch's builder as Longshot.x86_64 on Linux through from-source and confirm that the third-party objects and resulting builder complete. **Checks:** Still running: 7 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes. The author reproduced the wrong play dispatch on main and reports that the fixed Windows builder compiled 322 third-party objects, finished from-source, and built and launched the game. Linux has not yet been exercised end to end. **Other systems:** The command runs on Windows and Linux and is independent of GPU vendor. The Windows launcher-style path was tested; the Linux launcher-style path remains untested. The change does not alter game runtime code. **Switches:** None added, changed or removed. The existing LONGSHOT_CACHE option is passed to the child as before. **Reviewed:** f80bef20e3ee against 4a266e78ee80: Read the repository rules, contribution standards, PR template, complete diff and commit messages; examined the changed builder functions, their dispatch, parser, reporter and compile callers, and the new tests. Skimmed the rest of main.rs, the build reference and unrelated surrounding implementation. The referenced Tooling AGENTS.md was not present in the checkout; docs/review-checklist.md was absent.; nothing run (a code review). **Checked and fine:** - The dev command is recognized under both play names, and the parser accepts the passed compile options. - The new argument test checks the command and key parsed values; the failure-message test checks the 20-line tail. - Both commits record AI assistance. No game-derived or generated files, API versions, or switch tables are changed. **Testing:** No commands from the project or tests were run during review. The author reports Windows tests and an end-to-end build; CI is still running. **Overlaps and merge order:** Not checked; network access was unavailable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -474,3 +466,1 @@
.arg(cache)
.arg("--third-party-objects")
.arg(&set)
c.args(third_party_args(src, fs, cache, jobs, &set))
Member

L1 (should fix): The launcher-style from-source build has not yet been verified on Linux.

When: A Linux player building Main or a pull request relies on the same nested command and Linux toolchain path; the reported successful end-to-end run is on Windows.

Do: Run the branch's builder as Longshot.x86_64 on Linux through from-source and confirm that the third-party objects and resulting builder complete.

**L1** (should fix): The launcher-style from-source build has not yet been verified on Linux. *When:* A Linux player building Main or a pull request relies on the same nested command and Linux toolchain path; the reported successful end-to-end run is on Windows. **Do:** Run the branch's builder as Longshot.x86_64 on Linux through from-source and confirm that the third-party objects and resulting builder complete.
futondestroyer left a comment

Recommendation: Request changes. The Windows evidence supports the command fix. Bound the diagnostic capture while the child runs.

The nested builder now enters dev compile under both Launcher executable names. The parser still receives the same work, source, store, cache, jobs, JSON output, and third-party set arguments. Stdout and stderr are drained concurrently, and the child is waited on by the spawning thread.

Blocking

  • builder/crates/longshot-builder/src/from_source/mod.rs:483–484 keeps every stderr, plain stdout, and structured log line in a growing vector on successful and failed runs. On failure it joins the entire vector before taking the last 20 nonblank lines. A noisy compiler can make the parent retain and then copy a large log while compilation is already competing for memory. Keep only the recent nonblank lines while draining the pipes and cap retained text by bytes as well. Cover mixed stdout/stderr and multiline log events through the actual collector so the test checks retention as well as the displayed string.

Diagnostic coverage

  • The existing line readers stop on the first decoding error. A non-UTF-8 tool line on stderr can discard the error that follows. When touching the collector, keep draining across invalid text and render it lossily. The existing formatting-only test cannot detect this.

Evidence

  • Reviewed f80bef20e3eed4a921008d0b212297e161ca3e4c against 4a266e78ee803824cff449d3df419c5cd1e4368d, all four changed files and the relevant play, CLI and compile callers. No switches changed. This was a code review.
  • The author's same-head Windows run reproduced the old play dispatch, then compiled the third-party set and completed a Main build (322 objects, 176 s total). The fixed builder also completed the exact PR archive path and built and launched the game. This covers the Windows command regression. The Linux Launcher integration run remains open, and the first fixed signed nightly should be checked against the actual #2765 target before using it for the Radeon test. That packaging check is additional to the author's debug-Builder run.
**Recommendation: Request changes.** The Windows evidence supports the command fix. Bound the diagnostic capture while the child runs. The nested builder now enters `dev compile` under both Launcher executable names. The parser still receives the same work, source, store, cache, jobs, JSON output, and third-party set arguments. Stdout and stderr are drained concurrently, and the child is waited on by the spawning thread. **Blocking** - `builder/crates/longshot-builder/src/from_source/mod.rs:483–484` keeps every stderr, plain stdout, and structured log line in a growing vector on successful and failed runs. On failure it joins the entire vector before taking the last 20 nonblank lines. A noisy compiler can make the parent retain and then copy a large log while compilation is already competing for memory. Keep only the recent nonblank lines while draining the pipes and cap retained text by bytes as well. Cover mixed stdout/stderr and multiline log events through the actual collector so the test checks retention as well as the displayed string. **Diagnostic coverage** - The existing line readers stop on the first decoding error. A non-UTF-8 tool line on stderr can discard the error that follows. When touching the collector, keep draining across invalid text and render it lossily. The existing formatting-only test cannot detect this. **Evidence** - Reviewed `f80bef20e3eed4a921008d0b212297e161ca3e4c` against `4a266e78ee803824cff449d3df419c5cd1e4368d`, all four changed files and the relevant play, CLI and compile callers. No switches changed. This was a code review. - The author's same-head Windows run reproduced the old play dispatch, then compiled the third-party set and completed a Main build (322 objects, 176 s total). The fixed builder also completed the exact PR archive path and built and launched the game. This covers the Windows command regression. The Linux Launcher integration run remains open, and the first fixed signed nightly should be checked against the actual #2765 target before using it for the Radeon test. That packaging check is additional to the author's debug-Builder run.
@ -490,2 +480,4 @@
let (stdout, stderr) = (child.stdout.take(), child.stderr.take());
let mut why = String::new();
// (what the builder said, its stderr and its log's text as they came: the end of it is in the error)
let said = std::sync::Mutex::new(Vec::<String>::new());
Member

[P2] Bound the retained diagnostic tail during capture. Every qualifying line is currently stored even on successful builds, then a failure joins the full log before discarding all but the last 20 lines. Keep the last 20 nonblank lines under a byte limit while both pipes continue to drain. Test the collector with multiline and mixed-stream output.

[P2] Bound the retained diagnostic tail during capture. Every qualifying line is currently stored even on successful builds, then a failure joins the full log before discarding all but the last 20 lines. Keep the last 20 nonblank lines under a byte limit while both pipes continue to drain. Test the collector with multiline and mixed-stream output.
@ -494,3 +487,4 @@
use std::io::BufRead;
for line in std::io::BufReader::new(stderr.expect("piped")).lines().map_while(std::result::Result::ok) {
r.trace(|| tracing::info!(source = "tool", tool = "builder", stream = "stderr", "{line}"));
say(&line);
Member

The existing UTF-8 line iterator stops at an invalid byte sequence. A tool diagnostic using a legacy Windows encoding can leave the actual failure later in stderr unread. Consider reading raw lines and decoding lossily, and exercise that path with the collector.

The existing UTF-8 line iterator stops at an invalid byte sequence. A tool diagnostic using a legacy Windows encoding can leave the actual failure later in stderr unread. Consider reading raw lines and decoding lossily, and exercise that path with the collector.
fix(builder): from-source keeps only the end of what its nested builder says, and reads past bytes that are not UTF-8
Some checks failed
CI / What the change needs (pull_request) Successful in 10s
CI / Third-party parts and guide screenshots (pull_request) Successful in 13s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 15s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m14s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m16s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m2s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m44s
CI / Website build and checks (pull_request) Successful in 2m33s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 25m32s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 37m17s
89f81ff081
Review (futondestroyer): the collector kept every line on success and on
failure, and its line readers stopped at the first invalid UTF-8.

- drain(): both pipes read by each_line(), which reads raw lines (at
  most 1 MiB at a time) and decodes them lossily, so a tool's legacy
  code page stops neither pipe and the error after it is still read.
- Tail: the last 20 non-blank lines while they come, each cut to 1 KiB,
  8 KiB in all; a log event's text of several lines is split into them.
- Tests through the real collector: mixed stdout and stderr, a
  multi-line log event, a line that is no event, invalid bytes before
  the error event; and the bound held over 5000 lines and over long
  lines. Each fails with its part undone (the old .lines() reader loses
  the error event; no bound keeps all 5000).

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

Pushed 89f81ff0 for the reviews:

futondestroyer (request changes):

  • Bounded capture. The collector is drain() now, with a Tail that keeps only the end while the builder speaks:
    the last 20 non-blank lines, each cut to 1 KiB, 8 KiB in all. Nothing is joined at the end any more. A log event's
    text of several lines goes in as separate lines.
  • Lossy reading. Both pipes are read by each_line(): raw lines (at most 1 MiB at a time), decoded lossily, so an
    invalid byte stops neither pipe.
  • Tests through the real collector.
    • the_builder_s_output_is_read_to_its_end_on_both_pipes covers mixed stdout and stderr, a multi-line log event, a
      line that is no event, and invalid bytes on both pipes, with the error event after them.
    • the_end_kept_is_bounded_while_the_builder_speaks covers 5000 stderr lines, 30 lines of 8000 bytes, and a
      30-line event.
    • Each test fails with its part undone. The old .lines() reader loses the error event (left: ""); without the
      bound, every line is kept.

BeanBot L1 (Linux): run in WSL Ubuntu 24.04 on this head.

  • The signed nightly-909, as Longshot.x86_64, fails from-source with the player's error,
    (exit status: 120): and nothing after it.
  • This branch's builder, as Longshot.x86_64, compiled the 322 third-party objects, compiled the builder and finished
    (82 s). The builder it made runs.
  • The from-source tests pass on Linux too.

On the first signed nightly after the merge: it's in Still to test, as a launcher PR build (#2765) on Windows and Linux.

Pushed `89f81ff0` for the reviews: **futondestroyer (request changes):** - **Bounded capture.** The collector is `drain()` now, with a `Tail` that keeps only the end while the builder speaks: the last 20 non-blank lines, each cut to 1 KiB, 8 KiB in all. Nothing is joined at the end any more. A log event's text of several lines goes in as separate lines. - **Lossy reading.** Both pipes are read by `each_line()`: raw lines (at most 1 MiB at a time), decoded lossily, so an invalid byte stops neither pipe. - **Tests through the real collector.** - `the_builder_s_output_is_read_to_its_end_on_both_pipes` covers mixed stdout and stderr, a multi-line log event, a line that is no event, and invalid bytes on both pipes, with the error event after them. - `the_end_kept_is_bounded_while_the_builder_speaks` covers 5000 stderr lines, 30 lines of 8000 bytes, and a 30-line event. - Each test fails with its part undone. The old `.lines()` reader loses the error event (`left: ""`); without the bound, every line is kept. **BeanBot L1 (Linux):** run in WSL Ubuntu 24.04 on this head. - The signed nightly-909, as `Longshot.x86_64`, fails from-source with the player's error, `(exit status: 120): ` and nothing after it. - This branch's builder, as `Longshot.x86_64`, compiled the 322 third-party objects, compiled the builder and finished (82 s). The builder it made runs. - The from-source tests pass on Linux too. On the first signed nightly after the merge: it's in *Still to test*, as a launcher PR build (#2765) on Windows and Linux.
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The command fix completed launcher-style from-source builds on Windows and Linux, and the diagnostic collector now retains a bounded tail. The remaining launcher checks and CI are still pending. Nothing blocking is left. Recommend approval; not approved on the forge.

From-source builds now invoke the third-party compiler correctly under the launcher’s executable name, and failures include recent builder output. The collector adds bounded diagnostic handling without changing the game.

Since the last review (on f80bef20e3)
Resolved: L1 (The launcher-style from-source build has not yet been verified on Linux.)

Checks: Still running: 7 checks.

Also noticed (2; not asked for, not blocking)
  • The first signed nightly still needs the described Windows and Linux Launcher pull request builds.
  • CI is still running.
More: does it help, other systems, switches, what was read

Does it help: Yes. The author reports that the unfixed Linux nightly failed with exit status 120, while this head compiled 322 third-party objects and completed from-source in 82 seconds; the Windows launcher-style build also completed.

Other systems: The changed path runs on Windows and Linux. The author reports successful launcher-style builds on both, plus a Windows game build and launch; actual Launcher checks against the first signed nightly remain planned.

Switches: None.

Reviewed: 89f81ff081 against 4a266e78ee: Read the repository review rules and pull request template, the changed collector and its tests, the cargo helper, the command-line diff and dispatch references. Skimmed the recorded runs and documentation change; the complete main.rs and other referenced modules were not read in full.; nothing run (a code review).

Checked and fine:

  • The nested command uses dev compile with the existing arguments.
  • Both child pipes are drained concurrently and invalid UTF-8 is decoded lossily.
  • The diagnostic tail is bounded during capture and splits multiline log text.

Testing: The author reports passing collector and command-line tests and successful Windows and Linux from-source runs. No commands that build or run project code were executed for this review.

Overlaps and merge order: None identified.


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

**Recommendation: Approve.** The command fix completed launcher-style from-source builds on Windows and Linux, and the diagnostic collector now retains a bounded tail. The remaining launcher checks and CI are still pending. Nothing blocking is left. Recommend approval; not approved on the forge. From-source builds now invoke the third-party compiler correctly under the launcher’s executable name, and failures include recent builder output. The collector adds bounded diagnostic handling without changing the game. **Since the last review** (on f80bef20e3ee) Resolved: L1 (The launcher-style from-source build has not yet been verified on Linux.) **Checks:** Still running: 7 checks. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - The first signed nightly still needs the described Windows and Linux Launcher pull request builds. - CI is still running. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes. The author reports that the unfixed Linux nightly failed with exit status 120, while this head compiled 322 third-party objects and completed from-source in 82 seconds; the Windows launcher-style build also completed. **Other systems:** The changed path runs on Windows and Linux. The author reports successful launcher-style builds on both, plus a Windows game build and launch; actual Launcher checks against the first signed nightly remain planned. **Switches:** None. **Reviewed:** 89f81ff08193 against 4a266e78ee80: Read the repository review rules and pull request template, the changed collector and its tests, the cargo helper, the command-line diff and dispatch references. Skimmed the recorded runs and documentation change; the complete main.rs and other referenced modules were not read in full.; nothing run (a code review). **Checked and fine:** - The nested command uses dev compile with the existing arguments. - Both child pipes are drained concurrently and invalid UTF-8 is decoded lossily. - The diagnostic tail is bounded during capture and splits multiline log text. **Testing:** The author reports passing collector and command-line tests and successful Windows and Linux from-source runs. No commands that build or run project code were executed for this review. **Overlaps and merge order:** None identified. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
futondestroyer left a comment

Recommendation: Wait for the remaining CI and Launcher verification. I retire the diagnostic-capture blocker from my previous review on 89f81ff08193795f958f364eca5bb870221f37ce against 4a266e78. I found no new code blocker.

Both pipes still drain concurrently. Each read is limited to a 1 MiB chunk, and lossy decoding lets later diagnostics through after invalid UTF-8. The retained tail now holds up to 20 nonblank lines and 8 KiB of text, with a UTF-8-safe cutoff for individual entries. The formatter joins only retained lines. The new tests exercise the collector with both streams, bad bytes, a multiline event, 5,000 lines, and long multibyte text. As additional coverage, a single physical line over 1 MiB followed by a structured error would exercise the chunk boundary directly.

The author's exact-head WSL run reproduced exit 120 with signed nightly-909, then completed the fixed from-source run in 82 seconds after compiling 322 third-party objects. The collector and argument tests passed there. The earlier Windows debug-Builder run at f80bef20 covers dispatch through the archive build and game launch. The first signed nightly containing the fix still needs the actual Windows and Linux Launcher Pull request channel check with #2765. That is the packaging and delivery check before relying on it for the Radeon test. CI

**Recommendation: Wait for the remaining CI and Launcher verification.** I retire the diagnostic-capture blocker from my [previous review](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2774#issuecomment-89023) on `89f81ff08193795f958f364eca5bb870221f37ce` against `4a266e78`. I found no new code blocker. Both pipes still drain concurrently. Each read is limited to a 1 MiB chunk, and lossy decoding lets later diagnostics through after invalid UTF-8. The retained tail now holds up to 20 nonblank lines and 8 KiB of text, with a UTF-8-safe cutoff for individual entries. The formatter joins only retained lines. The new tests exercise the collector with both streams, bad bytes, a multiline event, 5,000 lines, and long multibyte text. As additional coverage, a single physical line over 1 MiB followed by a structured error would exercise the chunk boundary directly. The author's exact-head WSL run reproduced exit 120 with signed nightly-909, then completed the fixed from-source run in 82 seconds after compiling 322 third-party objects. The collector and argument tests passed there. The earlier Windows debug-Builder run at `f80bef20` covers dispatch through the archive build and game launch. The first signed nightly containing the fix still needs the actual Windows and Linux Launcher Pull request channel check with #2765. That is the packaging and delivery check before relying on it for the Radeon test. [CI](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/57266)
HumanBean deleted branch fix/from-source-dev-compile 2026-11-29 03:06:54 +00:00
Member

Validation finished after the PR merged as 2a146054. The run below used the exact PR head as its outer Builder.

Independent Windows validation of 89f81ff08193795f958f364eca5bb870221f37ce against #2765 at 7d4deb299fcc0d4d7e218ede718133e9ca4b9a4a.

I built the candidate Builder from source and ran it as Longshot.exe, the name the Launcher uses, with a pinned source archive and disposable cache and destination. The nested command compiled 322 of 322 third-party objects with zero failures in 59.4 s. The full game-free from-source command exited 0 in 243.3 s. It produced done for the selected commit, its source.json names that commit with signed: false, and the generated Builder returned longshot-builder pr-2765-7d4deb29 (source f2226edd735d4f2e) from --version. The local developer Builder lacked an archiver for the optional RenHDrum step and reported that warning. This covers source packaging and the name-sensitive dispatch regression. The Windows and Linux Launcher Pull request channel smoke remains for the first signed nightly containing the fix. The author's exact-head Linux WSL run already covers the game-free path on Linux.

The current Rust CI log reports passing Clippy and Rust tests, including the new command and diagnostic collector tests. The workspace rustfmt complaint is in unchanged host_sources_tests.rs. The synthetic end-to-end test still expects image.bin at the game-folder root, while the merge base and this head both write data/image.bin. The same end-to-end failure appeared on the earlier #2765 run. Neither failure comes from the from-source patch.

Validation finished after the PR merged as `2a146054`. The run below used the exact PR head as its outer Builder. Independent Windows validation of `89f81ff08193795f958f364eca5bb870221f37ce` against [#2765](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2765) at `7d4deb299fcc0d4d7e218ede718133e9ca4b9a4a`. I built the candidate Builder from source and ran it as `Longshot.exe`, the name the Launcher uses, with a pinned source archive and disposable cache and destination. The nested command compiled 322 of 322 third-party objects with zero failures in 59.4 s. The full game-free `from-source` command exited 0 in 243.3 s. It produced `done` for the selected commit, its `source.json` names that commit with `signed: false`, and the generated Builder returned `longshot-builder pr-2765-7d4deb29 (source f2226edd735d4f2e)` from `--version`. The local developer Builder lacked an archiver for the optional RenHDrum step and reported that warning. This covers source packaging and the name-sensitive dispatch regression. The Windows and Linux Launcher Pull request channel smoke remains for the first signed nightly containing the fix. The author's exact-head Linux WSL run already covers the game-free path on Linux. The current [Rust CI log](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/57266/jobs/3/attempt/1/logs) reports passing Clippy and Rust tests, including the new command and diagnostic collector tests. The workspace rustfmt complaint is in unchanged `host_sources_tests.rs`. The synthetic end-to-end test still expects `image.bin` at the game-folder root, while the merge base and this head both write `data/image.bin`. The same end-to-end failure appeared on [the earlier #2765 run](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/57233/jobs/3/attempt/1/logs). Neither failure comes from the from-source patch.
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!2774
No description provided.