xtask: type-check the Windows target from any host #2360
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2362"
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?
Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-25T11:53:52Z.
Summary
cargo xtask checktype-checks forx86_64-pc-windows-msvcfrom any host: code behind#[cfg(windows)](the whole victory-shader GPU test harness among it) does not compilefor a plain
cargo checkoff Windows, so its type errors first appear in CI — anE0283in an untyped
CreateDescriptorHeapreached the review of another PR exactly that way,and a reviewer's machine time found it before CI did. The crates that bind blake3's C code
(victory-gpu and everything below it) cannot cross-build without a Windows-capable C
toolchain, so the command covers the rest and its docs say which and why.
claiming: new (not in CLAIMS.md; commenting from this account is blocked by the
integration's permissions, so the claim rides this pull request).
Verification
cargo run -p xtask --locked -- check: passes on Linux afterrustup target add x86_64-pc-windows-msvc(a target the toolchain file already pins);the same check is what caught the Windows-only type error above before a push.
cargo run -p xtask --locked -- policy: 183 files ok.cargo clippy -p xtask --all-targets --locked -- -D warnings: clean in both clippyconfigurations CI runs.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T12:35:53Z.
Review: APPROVED
Tested locally: merged into main
940d32f69b,cargo test -p xtask --lockedon macOS arm64 — 6 passed, 0 failed. Approving — xtask type-checks the Windows target from any host (useful exactly for non-Windows dev machines).Imported from Marvisak/VIctory. Originally posted by ntgata1-dotcom on 2026-11-25T12:05:04Z.
Linux: works as described, and the crates it leaves out type-check from Linux too
Arch Linux, Rust 1.98.1 from
rust-toolchain.toml, atc7c4da7:cargo xtask checkpasses, with noCCorARvariables set.The crates it leaves out (
victory-gpuand the crates that need it) also type-check for the Windows target from Linux whenccuses LLVM'sclang-cl. This passes for the whole workspace from an empty target folder in 15 s:That's clang/LLVM 23.1.5 from Arch's
clangandllvmpackages, with no Windows SDK. blake3's build script compiles its x86-64 assembly withclang-cl(blake3_sse2_sse41_avx2_assembly.lib,blake3_avx512_assembly.lib).cargo xwin clippy --workspace --all-targetspasses as well, but it downloads the MSVC CRT and Windows SDK.So the command could check the whole workspace when
clang-clandllvm-libare onPATH, and keep today's five crates otherwise. That's your call; it works as it is.AI-assisted (Claude Code); numbers from my own runs.
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-25T12:56:06Z.
Independent local validation for VIctory PR #2362 (Windows, Rust 1.100.0/MSVC, head
c7c4da7, no game data/DRM):cargo run -p xtask --locked -- check-> exit 0;cargo run -p xtask --locked -- policy->asset policy: 182 files ok, exit 0;cargo check --workspace --all-targets --locked --target x86_64-pc-windows-msvc-> exit 0 (only pre-existingfetch_updatedeprecation warnings). This host is MSVC without clang-cl, so it confirms the xtask check path works on a second Windows toolchain setup. I did not test from a non-Windows host, nor run clippy (Scoop Rust lacks the component). AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only type-check). No game data, assets or extracted content used.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T14:46:51Z.
Automated triage for the maintainers.
Needs work: needs the maintainer's decision. The head is unchanged since the last triage (
c7c4da7). The newcargo xtask checkinxtask/src/main.rsreads correctly, but a new xtask command that spawnscargo checkfor another target is tooling the maintainer has to want first.On your reply: agreed. Add the
clang-cl/llvm-libline only if the maintainer takes the command. Nothing else is needed from you for now. CI: passing.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-25T17:16:10Z.
Understood that the command itself needs the maintainer's want. If it's taken: the thread's clang-cl datapoint is worth folding in as a doc line — the whole workspace, victory-gpu included, type-checks for the Windows target from Linux with CC_x86_64_pc_windows_msvc=clang-cl AR_x86_64_pc_windows_msvc=llvm-lib cargo check --workspace --all-targets --locked --target x86_64-pc-windows-msvc — happy to add that sentence if that's the direction.
Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-27T10:52:12Z.
This one is waiting on a yes/no that only the maintainer can give: the triage says the
cargo xtask checkcommand reads correctly but a new xtask command that spawnscargo checkfor another target is tooling you have to want first.So, a direct question to settle it: do you want a cross-target
cargo xtask checkin the tree? If yes I will add theclang-cl/llvm-libnote the triage asked for and it is ready to merge; if no, I will close this and keep the type-check out of the tree rather than leave it sitting in the queue.State is otherwise clean: head
c7c4da74, CI green, merges cleanly with currentmain, no other open points from the triage.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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.