Fix the Linux build and clippy gates #1017
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1017
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1017/head"
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?
@Jitheswar on GitHub · 2026-11-24 15:06 UTC · original
quality/non-windows-build→main· +282 −34 · 22 files · 2 commits · closed without mergingWhat and why
maindoesn't build on non-Windows hosts (CI runs only onwindows-latest). On940d32f,cargo buildfails invictory-gpuwithcannot find function host_resource, and clippy finds more. This PR brings the workspace to a clean state on Linux:cargo clippy --workspace --all-targets --locked [--all-features] -- -D warnings;cargo test --workspace --all-features --locked.Rebased onto
940d32fas one commit; it now also covers what that base broke.victory-gpu
#[cfg(windows)](#[cfg(any(windows, test))]where tests use them):view_format,samplers,index,forget,view,rtv_record,dsv_record,tagged_record,pc_format,SRGB,DEPTH_FORMATS,PlacedFootprint::bytes,texture_memory,take_indirect,UAV_BARRIER,presented,title_format.family,DEPTH,MemoryKey,memory_key,castable);switchmodule (theVICTORY_*on/off parser);publishmodule.ID3D12Fence1test drive Windows-only COM objects, so they're Windows-only.close/barrier/execute_indirect, matchingreset().victory-hle
function(the System32 loader) and the Windows-only modules' imports.C:\,\\server\share) are kept as stored, and file names resolve across\and/.victory-shader / victory-loader / victory-pe
emittests.Lowered::rovsis read only by GPU tests, and the mesh test's program is only validated on Windows.apps/victory
translate --cache(the warm-up and pipeline pre-build) fills the host's shader cache and pipeline library, which only a Windows build has. Other hosts get an error that says so.translate: without the Windows DLLs, the validator and host pipelines are skipped with a note instead of failing.Checks
rust-toolchain.toml):cargo build --workspace;cargo clippy --workspace --all-targets -D warnings, default and--all-features;cargo test --workspace --all-featurespasses all 26 suites (394 passed, 8 ignored).cargo clippy --workspace --all-targets -D warnings, default and--all-features, is clean.cargo xtask policy: 182 files ok.No behaviour change on Windows. AI-assisted (Claude Code).
🤖 Generated with Claude Code
@Zipettte on GitHub · 2026-11-24 15:41 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 118e42f:
cargo testdoes not compile:Probably a missing
use std::sync::OnceLock;inpipeline.rs. main (ffe310e) builds and passes on the same machine.Tested with AI assistance (Claude).
@pablogonz12 on GitHub · 2026-11-24 16:47 UTC · original
Tested on Linux (Arch, the repo's pinned 1.98.1 toolchain), your head b0933f5 merged on
ffe310e.Before, on plain main:
cargo build -p victory-gpufails with E0425,cannot find function host_resourceatcrates/victory-gpu/src/resource.rs:284—view_formatcalls what only exists under#[cfg(windows)]. It came from2849477(the host-texture commit of 23 Nov 23:10); its parent builds clean on Linux, and CI never sees it because every job iswindows-latest.With your head:
cargo build --workspace: clean.cargo clippy --workspace --all-targets --locked -- -D warnings(host): clean.cargo test --workspace --locked(host): 217 passed, 0 failed, 5 ignored.cargo xwin clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings, with and without--all-features: clean.Not tested: Windows hardware, the game itself.
@Jitheswar on GitHub · 2026-11-24 16:58 UTC · original
Thanks @Zipettte. That was the first commit,
118e42f, where theOnceLockimport was removed entirely. The current head,b0933f5, puts it back under#[cfg(windows)]next to thetranslatedfield that uses it. pablogonz12 confirmed above thatcargo xwin clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warningsis clean at that head, with and without--all-features. If you get a chance to reruncargo teston Windows atb0933f5, that would confirm it on real hardware.@x3ero0 on GitHub · 2026-11-24 19:26 UTC · original
Tested on Linux,
b0933f5cherry-picked ontomainffe310e(applies cleanly). CachyOS, kernel 7.3.5, Rust 1.98.1 fromrust-toolchain.toml.ffe310effe310e+ this PRcargo build --workspace --locked(native)E0425host_resourceinvictory-gpu/src/resource.rscargo clippy --workspace --all-targets --locked -- -D warnings(native)--all-featurescargo test --workspace --locked(native), with and without--all-features-D warningsforx86_64-pc-windows-msvc(cargo xwin), with and without--all-featurescargo test --workspacefor the Windows target under GE-Proton11-6The ten failures under Wine are environmental and identical on both trees (repository-path checks,
WSAConnectByList, the pipeline library, the container-digest check, the HLSL clamp, the probe fixture), so the Windows side behaves the same there with and without the change.The native binary also does what the description says on real files:
config,inspectandcensus --missingwork, andtranslate <pack> --validate --pipelinesruns through the whole pack (26,084 programs in 35 s here) and printsvalidator skipped (Windows only)andhost pipelines skipped (Windows only)at the top.Not run on native Windows.
@Jitheswar on GitHub · 2026-11-24 22:54 UTC · original
Rebased onto
70564ae(one conflict invictory-hle/src/modules/mod.rs: kept upstream's FidelityFX entry). New commit2b03b41covers what70564aebroke on Linux:castablecalling the Windows-onlyfamily, the test-onlyLowered::rovs, andtranslate --cache/prebuildusing the Windows-only shader cache and pipeline library (now Windows-only, with a clear error elsewhere).cargo build,cargo clippy --workspace --all-targets -D warnings(default and--all-features), andcargo test --workspace --all-featuresall pass.-D warningspasses for default and--all-features;cargo xtask policypasses.70564aeitself still failscargo buildon Linux (host_resource, thenfamily), so this is still needed. AI-assisted (Claude Code).@Marvisak on GitHub · 2026-11-25 00:33 UTC · original · edited 2026-11-25 03:21 UTC
Automated triage for the maintainers.
Merge candidate. This makes the workspace build, pass clippy and pass tests on non-Windows hosts. Most of the change is
#[cfg(windows)]gating.translatealso gets stubs, so the validator and host pipeline checks report "skipped (Windows only)" and--cacheerrors clearly. The Windows-relevant point from the last triage is fixed ind5de72b: incrates/victory-hle/src/runtime.rs,absolute_title_pathapplies thetitle_absoluteshortcut only under#[cfg(not(windows))], and Windows keepsstd::path::absoluteas onmain.title_file_namesplits on both separators, which matchesPath::file_namefor the normalized paths Windows stores. No dependencies change. CI passes.#1183 and #1185 also touch
apps/victory/src/translate.rs, so whichever of these merges later will need a rebase.On your reply: confirmed. The Windows path is unchanged from
main, and the new Windows test pins the/and..normalization.Generated by Claude Code
@Jitheswar on GitHub · 2026-11-25 02:32 UTC · original
Fixed in
d5de72b, as suggested. The title-path shortcut runs only under#[cfg(not(windows))], so Windows keepsstd::path::absolute(GetFullPathNameW) exactly as onmain, andtitle_absoluteis non-Windows only.New tests:
windows_title_paths_are_normalized(Windows):C:/games/x/../game.exe→C:\games\game.exe.windows_style_title_paths_stay_absolute_on_other_hosts(non-Windows): drive-rooted, drive-root and UNC paths are kept as stored, and a relative one is made absolute.Checked:
cargo test -p victory-hle78 passed; workspace clippy-D warningsclean, default and--all-features.-D warningsclean, default and--all-features.victory-hletests under Proton: the new test passes, and the only 2 failures are the same Wine-host onesmainhas (only_loopback_is_reachable,a_kept_blob_past_the_link_limit_is_copied).On the overlap: understood. I'll rebase whichever of #1017, #1183 and #1185 is left after the first one merges. AI-assisted (Claude Code).
Pull request closed