Fix the Linux build and clippy gates #1017
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1017"
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 Jitheswar on 2026-11-24T15:06:29Z.
What 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
Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T15:41:04Z.
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).
Imported from Marvisak/VIctory. Originally posted by pablogonz12 on 2026-11-24T16:47:39Z.
Tested on Linux (Arch, the repo's pinned 1.98.1 toolchain), your head
b0933f5merged onffe310e.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.
Imported from Marvisak/VIctory. Originally posted by Jitheswar on 2026-11-24T16:58:07Z.
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.Imported from Marvisak/VIctory. Originally posted by x3ero0 on 2026-11-24T19:26:54Z.
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.
Imported from Marvisak/VIctory. Originally posted by Jitheswar on 2026-11-24T22:54:27Z.
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).Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:33:19Z.
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
Imported from Marvisak/VIctory. Originally posted by Jitheswar on 2026-11-25T02:32:54Z.
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).
Imported from Marvisak/VIctory. Originally posted by astrosteveo on 2026-11-25T05:43:48Z.
Review: APPROVED
Read the diff at
d5de72band ran it merged ontomain940d32f(no conflicts), natively on Arch Linux with the pinned Rust 1.98.1. The earlier Linux reports here were on older heads.maincargo build --workspace --lockedhost_resourcecargo clippy --workspace --all-targets --locked -- -D warnings--all-featurescargo test --workspace --all-features --lockedFrom reading: nearly all of it is gating. The one line that can differ on Windows is
image_named, which takes the text after the last separator instead ofPath::file_name; for the absolute pathsset_image_pathstores there, that is the same name.set_image_pathitself is unchanged on Windows.I have a branch for the same thing on my fork (
build/native-linux, not opened here). It overlaps this one, and nothing in it speaks against this PR.Not checked: a Windows run (CI is green at this head).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pull request closed