feat(pr-build): build longshot_vk.dll/.so only for renderer-only PRs (RX_VK_ONLY=1) #270
No reviewers
Labels
No labels
area/build
area/install
area/mods
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!270
Loading…
Reference in a new issue
No description provided.
Delete branch "Jer9/LongshotLauncher:feat/pr-build-fast-vk"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Building an open Longshot PR from the Launcher (
#199) currently runs a fullnx2/make_game.pylift, compile, and link (~10–15 minutes) even when the PR only edits renderer code undergpu/vk/. When a matching base nightly build is already installed, onlylongshot_vk.dll(Windows) orlongshot_vk.so(Linux) needs to be rebuilt.This PR adds a conservative, fail-closed renderer-only fast path for PR builds:
Core/FastVkBuild.cs): Classifies the PR's changed files against Longshot's renderer-only contract (mirroringscripts/devtools/packs.py:route(), checkinghost/#includereferences, and checkingnx2/build.pyhost_deps). Any change touchinghost/,nx2/,assets/,third_party/, shaders/build rules outside the standalone renderer, orMKWVK_API_VERSIONfails closed to a fullmake_game.pybuild.Core/FastVkBuild.cs,Core/Toolchains.cs): Records PR build metadata (pr-meta.json) inToolchains.InstallPullRequest, locates a matching installed base nightly, verifiesMKWVK_API_VERSIONparity between the PR source and base, and fails closed to a full build if no compatible base is installed.Core/MakeGameCommand.cs,Core/FastVkBuild.cs,App/ViewModels/BuildStepViewModel.cs): Invokesnx2/build.py --standalonewithRX_VK_ONLY=1andRX_RELEASE=1(preservingOOT_WORKand PGO profile wiring) and stages the resultinglongshot_vk.dll/.sopaired with the base nightly folder viaStageFromBase.What a player / tester notices:
gpu/vk/) in the Launcher drops from a full ~14-minute rebuild to under ~1 minute once a matching nightly is installed, with automatic transparent fallback to a full build whenever a PR touches host/ABI/game code.Helps:
prtrack.No measurable impact:
host/,nx2/,assets/, orMKWVK_API_VERSION(which continue running fullmake_game.py).Files to read first:
Core/FastVkBuild.cs: diff classification,MKWVK_API_VERSIONparity check, andStageFromBasepairing.Core/MakeGameCommand.cs:MakeGameCommand.ForFastVkcommand construction (RX_VK_ONLY=1).Core/Toolchains.csandApp/ViewModels/BuildStepViewModel.cs:pr-meta.jsonrecording and build-step routing.tests/launcher_core/FastVkBuildChecks.cs: unit tests covering renderer-only acceptance, fail-closed cases (host/ABI/build/missing base), and staging.Testing
Tested:
dotnet build LongshotLauncher.slnx -c Release: 0 warnings, 0 errors.LauncherAppTests: PASS.LauncherCoreTests(PullRequestChecks,FastVkBuildChecks,CommandLineChecks): PASS (the only failing check inLauncherCoreTestson this non-admin Windows machine is the pre-existing symlink privilege test atSavesChecks.cs:1003, identical onorigin/main).python -I scripts/translations.py:0new faults (48pre-existing onorigin/main).How to test:
gpu/vk/*.cpp/.hwithout bumpingMKWVK_API_VERSION) and start a PR build; verify the Launcher runsnx2/build.py --standalonewithRX_VK_ONLY=1and pairs the builtlongshot_vk.dll/.sowith the base nightly.host/,nx2/, orMKWVK_API_VERSION(or test without a matching base nightly installed) and verify it falls back cleanly to fullmake_game.py.Still to test:
Measurements
No runtime game code is changed; build-time speedup comes from invoking Longshot's existing
RX_VK_ONLY=1standalone renderer path (nx2/build.py --standalone, typically < 60 s incremental / clean renderer build) instead of fullnx2/make_game.py(~14 min). Exact wall-clock timing depends on CPU core count and warmobj-storestate.Risks
host/include,MKWVK_API_VERSIONmismatch, or missing base nightly automatically falls back to a fullmake_game.pybuild rather than producing a broken binary pair.make_game.pyfor all PR builds; no user settings or saves are altered.Jer9 referenced this pull request2026-11-24 14:49:38 +00:00
Possibly related, for context:
Closing as superseded by the Rust + Slint launcher rewrite (#284) and
forge/mod-api's Rustlongshot-builder(which removednx2/build.py,nx2/make_game.py,RX_VK_ONLY=1, and thepacks.py"vk"route, and shares compiled objects via<cache>/store).A local backup ref is preserved (
backup/feat/pr-build-fast-vk). Multi-PR stack support (#271) has been ported independently onto#284usinglongshot-builder from-source --archive.Pull request closed