fix(builder): reuse the launcher cache on direct start #2781

Merged
HumanBean merged 2 commits from HumanBean/Longshot:direct-launch-cache into main 2026-11-29 04:14:58 +00:00
Owner

Summary

Opening Longshot directly from an installed version could use a different shader cache from Play in the launcher when the player configured a custom build-files folder. Use the same launcher-library lookup as the profile resolver to choose the builder cache in that installation.

This covers installed and marked portable libraries. The cache root feeds the existing build work folders, build stores, and shader caches. Explicit environment paths keep their existing precedence for a direct start. See #2773 and #2768.

Testing

Tested: Linux, GeForce RTX 3090, NVIDIA 620.70.06. Started an existing version through the launcher’s Play shortcut and by opening the built game directly. Both reached the game with the same profile, build, configured SPIR-V store and per-driver shader cache. The game executable and build record kept their original timestamps. The regression test failed before the fix and passed with it. The locked builder and build-driver tests, focused Clippy and formatting passed before replaying the patch on current main.

Still to test:

  • Finish the strict game-free suite and repeat the launch-path check on the rebased branch.
  • Windows, by hand. Set a custom build-files folder and open the same version from the launcher and directly. Confirm both open the expected profile and reuse the same build and shader caches.

Measurements

This corrects path selection. Performance was not measured.

Risks

A directly started installed version uses its launcher’s current cache location. A moved cache may need to warm up if the new location is empty. Standalone cache discovery uses the same rules as before.

Checklist

Ready for review

  • One topic, on current main. The title is a Conventional Commit.
  • Tested on my own PC, in the game, as Testing says.
  • mise run test passes. The strict suite is queued.
  • Measurements says what was measured.
  • No game files, build output, or hand-edited generated files. third_party/ untouched.

When it applies

  • A fix: a game-free test that fails before the fix and passes here.
  • Docs updated.
  • AI assistance recorded with Assisted-by: trailers.
## Summary Opening Longshot directly from an installed version could use a different shader cache from Play in the launcher when the player configured a custom build-files folder. Use the same launcher-library lookup as the profile resolver to choose the builder cache in that installation. This covers installed and marked portable libraries. The cache root feeds the existing build work folders, build stores, and shader caches. Explicit environment paths keep their existing precedence for a direct start. See #2773 and #2768. ## Testing **Tested:** Linux, GeForce RTX 3090, NVIDIA 620.70.06. Started an existing version through the launcher’s Play shortcut and by opening the built game directly. Both reached the game with the same profile, build, configured SPIR-V store and per-driver shader cache. The game executable and build record kept their original timestamps. The regression test failed before the fix and passed with it. The locked builder and build-driver tests, focused Clippy and formatting passed before replaying the patch on current main. **Still to test:** - Finish the strict game-free suite and repeat the launch-path check on the rebased branch. - Windows, by hand. Set a custom build-files folder and open the same version from the launcher and directly. Confirm both open the expected profile and reuse the same build and shader caches. ## Measurements This corrects path selection. Performance was not measured. ## Risks A directly started installed version uses its launcher’s current cache location. A moved cache may need to warm up if the new location is empty. Standalone cache discovery uses the same rules as before. ## 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, as Testing says. - [ ] `mise run test` passes. The strict suite is queued. - [x] Measurements says what was measured. - [x] No game files, build output, or hand-edited generated files. `third_party/` untouched. ### When it applies - [x] A fix: a game-free test that fails before the fix and passes here. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` trailers.
Assisted-by: Codex
fix(builder): reuse the launcher cache on direct start
Some checks failed
CI / What the change needs (pull_request) Successful in 12s
CI / Third-party parts and guide screenshots (pull_request) Successful in 14s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 14s
PR description / Title and description (pull_request_target) Failing after 5s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 1m57s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m34s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m8s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m28s
CI / Website build and checks (pull_request) Successful in 1m34s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 17m8s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 38m17s
1dcd7b33cd
Assisted-by: Codex
Author
Owner

Tested in game: Linux, GeForce RTX 3090, NVIDIA 620.70.06. Launcher Play and opening the game executable directly both reached the game with the same profile, existing build, configured SPIR-V store, and driver-specific shader cache.

Tested in game: Linux, GeForce RTX 3090, NVIDIA 620.70.06. Launcher Play and opening the game executable directly both reached the game with the same profile, existing build, configured SPIR-V store, and driver-specific shader cache.
Member

Possibly related, for context:

  • issue #2504 Idea: Shared shader store in another Drive — Related request to relocate the shared shader store
  • PR #2629 fix(builder): share installed and portable launcher folders — Merged change established shared launcher cache paths
Possibly related, for context: - issue #2504 Idea: Shared shader store in another Drive — Related request to relocate the shared shader store - PR #2629 fix(builder): share installed and portable launcher folders — Merged change established shared launcher cache paths
HumanBean changed title from WIP: fix(builder): reuse the launcher cache on direct start to fix(builder): reuse the launcher cache on direct start 2026-11-29 04:14:53 +00:00
HumanBean deleted branch direct-launch-cache 2026-11-29 04:14:58 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2781
No description provided.