docs/testing: the C++ build needs a Visual Studio developer environment #3019
Open
github-bot
wants to merge 2 commits from
github-bot/gh-3019 into main
AGit
pull from: github-bot/gh-3019
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
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
github/ubiquitarianism--leonida!3019
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3019"
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?
@fiestorra on GitHub · 2026-12-01 23:52 UTC · original
fiestorra:docs-vs-dev-shell→main· +10 −0 · 1 files · 2 commits · opendocs/testing: the C++ build needs a Visual Studio developer environment
The page shows the two raw commands to build
runtime/buildby hand, and they link withfrom a plain PowerShell - measured on 2026-12-02: the same build directory that fails that
way builds in 0.2 min once
Launch-VsDevShell.ps1is loaded.build_runtime.ps1sets theenvironment up itself, which is why the standard path never shows it.
The paragraph above the list already mentions a "Developer PowerShell for VS 2022" as the way
out of a Visual Studio 2026 link problem; what it did not say is that the commands need the
environment at all. It says it now, with the failure and the one line that loads it.
python -m unittest discover -s tests -p "test_docs_*.py": 57 tests, OK.Written with an AI assistant.
The page shows the two raw commands to build `runtime/build` by hand, and they link with LNK1181: cannot open input file 'kernel32.lib' from a plain PowerShell - measured on 2026-12-02: the same build directory that fails that way builds in 0.2 min once `Launch-VsDevShell.ps1` is loaded. `build_runtime.ps1` sets the environment up itself, which is why the standard path never shows it. The paragraph above the list already mentions a "Developer PowerShell for VS 2022" as the way out of a Visual Studio 2026 link problem; what it did not say is that the commands need the environment at all. It says it now, with the failure and the one line that loads it. `python -m unittest discover -s tests -p "test_docs_*.py"`: 57 tests, OK. Written with an AI assistant.@andrew-ai on GitHub · 2026-12-01 23:54 UTC · original · edited 2026-12-02 00:07 UTC
The new one-liner misses an installed VS 2022 Build Tools instance on this Windows machine. The literal path under $env:ProgramFiles does not exist here. The instance is under Program Files (x86). I verified this alternative from the repository root in plain PowerShell:
This loaded Developer PowerShell 17.14.23, kept the working directory at the repository root, exposed cl.exe, and put a directory containing kernel32.lib on LIB. The version filter matters on this host because it also has VS 2017. I verified environment setup only.
Codex-assisted.
Follow-up: I also compiled and linked a small Windows program with cl and kernel32.lib in the discovered shell, and the executable exited 0. Installer metadata marks this particular 2022 instance incomplete, which explains why vswhere without -all returned only 2017 here. For general instructions, prefer a complete 2022 instance when available; -all can also select an unfinished installation. I did not build the full runtime.
@imShangLi on GitHub · 2026-12-02 05:32 UTC · original
VERIFY-3019 — Linux, Fedora 45, no GPU device, no game files, no title
Verdict: PASS. Adds one paragraph to
docs/testing.mdexplaining that the two directcmakebuild commands need a Visual Studio developer environment. Every claim I could check against the repository checks out, and the documentation tests pass. One minor nit (the one-liner hardcodes the Build Tools edition folder).Head
a409e610, base currentmain(8422def7), merge base913b88b9, 1 file, +5/−0:docs/testing.md.1. What it changes
In step 2 of "Quick start on Windows" (
docs/testing.md), after the note about building from a "Developer PowerShell for VS 2022", a new bolded paragraph states: the two directcmakecommands above need a Visual Studio developer environment;build_runtime.ps1sets it up itself, but typing them into a plain PowerShell does not — the build stops atLNK1181: cannot open input file 'kernel32.lib'; loading it first is one line invokingLaunch-VsDevShell.ps1.2. The claims it makes, and which ones I checked
build_runtime.ps1sets it up itself" — checked.scripts/build_runtime.ps1finds Visual Studio withvswhere.exe("$installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath, line 44) and callsVC\Auxiliary\Build\vcvars64.batfrom it (lines 46, 131), which sets the MSVCINCLUDE/LIB/PATH.docs/design.md:143also says "It sets up MSVC throughvcvars64.bat". Verified.cmake -S runtime -B runtime\build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ONandcmake --build runtime\build; without the dev environment'sLIB/INCLUDEset, the link step cannot find the Windows SDK import libraries.LNK1181: cannot open input file 'kernel32.lib'is the classic MSVC symptom (cl.exe reachable, Windows SDKLIBnot on the path). Plausible and well-known, but not reproducible on this machine.& "$env:ProgramFiles\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Launch-VsDevShell.ps1" -Arch amd64 -HostArch amd64" — the path is the canonical VS 2022 Build Tools location ofLaunch-VsDevShell.ps1and the flags are valid; I cannot confirm the file exists on a Windows machine from here, and it is edition-specific (see §4).3. What the tests do here
python3 -I -m unittest discover -s tests -p "test_docs_*.py"— 57 tests, all pass (52.1 s).python3 -I scripts/check_no_game_data.py docs/testing.md— exit 0.python3 -I scripts/red_green.py 3019 --no-cargo— "red not constructible: the pull request changes no test" (verdictred not constructible). Expected for a docs-only change: there is no test to go red.git merge-tree --write-tree origin/main pr3019— merges cleanly (no conflict).4. Anything wrong in the text
docs/testing.md:43— the one-liner hardcodes the Build Tools edition folder (...\2022\BuildTools\Common7\Tools\Launch-VsDevShell.ps1), but step 1 of the same page says "Visual Studio 2022 (Community or Build Tools)". A tester who installed Community would need...\2022\Community\Common7\Tools\Launch-VsDevShell.ps1. Minor: the command is correct for Build Tools but not universal; not a blocker.**bold**/backtick voice and wraps at ~100–131 chars like the surrounding prose (the long one-liner at line 43 is intentionally not broken). No duplicated sentences, no markdown links added, anddocs/testing.mdhas no table of contents to update.5. What I did not check
Launch-VsDevShell.ps1invocation need a Windows machine with Visual Studio. This box has no Windows toolchain, so I verified only the claim's plausibility and its consistency withscripts/build_runtime.ps1(which usesvswhere+vcvars64.bat, exactly the mechanism the paragraph describes).@fiestorra on GitHub · 2026-12-02 17:47 UTC · original
Fixed, and thank you - that was a good catch. Both nits you named are corrected and pushed, with the tests you listed still green.
The one in #3019 mattered more than a style nit, and it is checked on this machine: the hardcoded
$env:ProgramFiles\Microsoft Visual Studio\2022\BuildTools\...\Launch-VsDevShell.ps1does not exist here,while the same file under
Program Files (x86)does - so the Build Tools edition path in the text wouldhave sent a reader to
LNK1181: cannot open input file 'kernel32.lib', which is the very failure theparagraph is about. The paragraph now says
<VS install>, names both folders, and gives vswhere with-products *- without-products *vswhere prints nothing on a Build Tools-only machine (checked:empty without, the BuildTools path with it).
AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
@MoonEyes on GitHub · 2026-12-02 18:28 UTC · original
Re-checked #3019 at
e601fa3e1: the hardcoded Build Tools path is gone and thevswhere -products *lookup is in. One small gap left: no-SkipAutomaticLocation.python -m unittest discover -s tests -p "test_docs_*.py"python -I scripts/check_no_game_data.py docs/testing.mdDocs only, so no red/green applies.
Earlier defect: fixed.
docs/testing.md:43-48now writes<VS install>\Common7\Tools\Launch-VsDevShell.ps1, says Build Tools is underProgram Files (x86)and an IDE edition underProgram Files, and givesvswhere.exe -latest -products * -property installationPath, with the reason-products *is needed. That matchesscripts/build_runtime.ps1:44.Remaining (minor)
docs/testing.md:43:Launch-VsDevShell.ps1changes the current directory to%USERPROFILE%\source\reposwhen that folder exists, unless-SkipAutomaticLocationis passed. The next lines arecmake -S runtime -B runtime\build, relative to the repository, so on such a machine they fail with "source directory does not exist". andrew-ai's tested lines had the switch. Add-SkipAutomaticLocationto the command (or say "thencdback to the repository").PR text: "Written with an AI assistant." does not name the model or the reviewer agent (CONTRIBUTING.md, "AI-assisted contributions").
Verdict: ready after item 1 (one switch). Nothing else blocks.
AI-assisted: Claude Opus 5.5 (Claude Code), verification only.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
@MoonEyes on GitHub · 2026-12-02 20:33 UTC · original
RUN (independent run on Windows, head
e601fa3e158232ff3d7548e67653613470f5591f, merged intomainb41763227aeed2d23c98af84bcbc1bddc7acdc90withgit merge --no-ff)This replaces the earlier check of
a409e6109: the author pushede601fa3e1(one commit, "do not hardcode which VS folder the dev shell is under") while that check ran.Green
docs/testing.md, +10 lines. No code, no tests changed.python -I scripts/check_no_game_data.py docs/testing.md: exit 0.python -I -m unittest discover -s tests -p "test_docs_*.py"on the merge: 57 tests, OK (162 s).change-scopeandno-game-datasuccess;check,linux-python-and-viewer,semantic-testsskipped (docs only). GitHub has an Actions incident today, so I did not rely on these: the local runs above are the evidence.Red
docs/testing.mdback in:LNK1181appears 0 times there and 1 time with the PR's version, and the docs tests pass both ways (they do not cover the paragraph).Review
$env:ProgramFiles\...\2022\BuildTools\...path is gone. The text now says<VS install>\Common7\Tools\Launch-VsDevShell.ps1, names both folders and givesvswhere.exe -latest -products * -property installationPath.vswhereexists underProgram Files (x86)\Microsoft Visual Studio\Installer, and returnsC:\Program Files\Microsoft Visual Studio\2022\Communitywith-products *.Launch-VsDevShell.ps1exists there; the old hard-coded BuildTools path underProgram Filesdoes not, while the(x86)BuildTools one does. So the new wording ("Build Tools underProgram Files (x86), IDE editions underProgram Files") matches this machine.build_runtime.ps1sets it up itself": true,scripts/build_runtime.ps1line 44 uses the same-latest -products *lookup, plus-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64; line 46 builds thevcvars64.batpath and line 131 calls it.-products *vswhere prints nothing on a Build Tools-only machine was not reproduced: only Community is complete here, so both forms print the same.-SkipAutomaticLocation. The script does take that switch here, but whether it changes directory to~\source\reposis not testable here (%USERPROFILE%\source\reposdoes not exist on this machine). Adding the switch or acdback would be safer; not blocking.Not covered
LNK1181failure and the dev-shell one-liner were not executed (no build run, an in-game run is going on, no Rust/cmake build started).Launch-VsDevShell.ps1.gh pr view.Verdict
PASS: the earlier wrong-path defect is fixed, the explanation matches
build_runtime.ps1, the merge is clean and the docs tests and no-game-data check are green. Open nits, none blocking:-SkipAutomaticLocation, model named in the PR description.AI-assisted (Claude Code), models: Claude Opus 5.5 (checker), separate Claude Opus 5.5 judge.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.