Build: compile and test the workspace on Linux again #523
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/523"
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 spidercraft on 2026-11-24T04:27:01Z.
What
mainno longer builds on Linux (E0425host_resourceinvictory-gpu, then Windows-only modules reached fromvictory-hle). This gates only those uses, so the workspace builds and its tests run on Linux again:view_formatand the D3D12 allocator hookup are Windows-only, like what they call.XLaunchNewGameends the title only on Windows; the text entry dialog answers "dismissed" elsewhere.translate --validate/--pipelinesrefuse to start off Windows (no host validator or D3D12 there); translation itself runs.No reformatting, no behaviour change on Windows. #112 covers the same ground plus setup and CI, but it conflicts with
maintoday and reformats the workspace; this is the minimal fix, and the base of the native Linux runtime PRs that follow.Tested
cargo test --workspacepasses, 162 passed, 13 ignored.cargo check --workspace --all-targets --target x86_64-pc-windows-msvc: same diagnostics as before (none).cargo xtask policyok. No game data used.🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T06:52:03Z.
Review: APPROVED
Verified on macOS 26 arm64, rustc 1.98.1, head
0012266, full macOS-buildable suite with--locked --no-fail-fast:cargo check --workspace --all-targetsis also clean on this head (modulo one pre-existing dead-code warning in victory-shader's lib test, fixed in #685).I can't verify the Linux CI claims themselves (no Linux/docker here), but the portability fixes compile and test green on macOS too. Approving.
Imported from Marvisak/VIctory. Originally posted by spidercraft on 2026-11-24T04:35:28Z.
Note: #235 makes the same minimal Linux gates and was opened earlier; the two conflict. If #235 lands first I'll rebase #524 and #526 onto it and close this one.
Imported from Marvisak/VIctory. Originally posted by KoLolX3 on 2026-11-24T05:34:41Z.
Check on Linux, not Windows: pass. Head
001226617merged ontomaind2a4bae1f(clean merge).core,formats,game,loader,pe,pipeline,shader): PR92 passed, 0 failed,main92 passed, 7 failed. The 7 tests that fail onmainno longer fail.cargo check --workspace --all-targetsok andcargo test --workspaceok: 162 passed, 0 failed, 13 ignored, includingvictory-gpu(23) andvictory-hle(43). Onmainthe same check fails to build (3 errors). The 7 tests that fail onmaininvictory-loaderandvictory-peare now#[ignore]d on this platform (3 + 4), not repaired.cargo xwin check --workspace --target x86_64-pc-windows-msvc, coversvictory-gpu,victory-hleand the app): PR ok,mainok.main168.mainhere as well (not this PR): 7 tests invictory-loaderandvictory-pethat parse their own test binary as a PE image, which is an ELF file on Linux.victory-gpu/victory-hletests and the game itself.On: AMD Ryzen 7 5700, 62 GB RAM, Artix Linux 7.3.4-artix1-2, rustc 1.98.1 (the repo's pinned toolchain), cargo-xwin 0.24.1. No game data. Automated check only: the code itself was not reviewed.
Imported from Marvisak/VIctory. Originally posted by ThomasHFWright on 2026-11-24T12:46:53Z.
Verified this PR's patch from
0012266175278c7b220c00f09e2a7bef08aa63dfapplied cleanly to currentmainffe310eb2098e52169f4c44db5ffdabf43a72622in a separate checkout, using the pinned Rust 1.98.1 on Linux x86_64. Both refs were unchanged when rechecked before posting.cargo check --workspace --all-targets --locked --offline: fails with E0425,host_resourcenot found invictory-gpu.cargo test --workspace --locked --offline --no-fail-fast: 215 passed, 0 failed, 15 ignored. Ten ignores are the Windows-specific cases gated by this PR; the other five are reference-data tests/benchmarks. Ignored tests are not counted as passes.cargo check --workspace --all-targets --all-features --locked --offline --target x86_64-pc-windows-msvc: passes without warnings, using clang-cl/lld-link and an MSVC SDK.cargo run --locked --offline --quiet -p xtask -- policy): passes.translateexits 0;translate --validateandtranslate --pipelineseach exit 1 withneeds Windows (the host DXIL validator and D3D12).All checks ran with networking disabled. No game data was used. The Windows cross-check initially hit a read-only sandbox error because BLAKE3's compiler emits a temporary assembly file beside its source; it passed after giving that dependency a disposable writable copy, without changing the PR.
Not checked: native Windows execution, native Linux gameplay, or shader translation with real input. This validates Linux build/test portability and the CLI guards, not runtime support.
AI-assisted testing with Codex.
Imported from Marvisak/VIctory. Originally posted by pablogonz12 on 2026-11-24T16:47:41Z.
Tested on Linux (Arch, pinned 1.98.1), your head
0012266merged onffe310e:cargo build --workspaceis clean andcargo test --workspace --lockedpasses, so it does fix the E0425 (host_resourceatresource.rs:284).But host
cargo clippy --workspace --all-targets --locked -- -D warningsfails on the gated imports, now unused:crates/victory-shader/src/emit/mod.rs:407super::bitcode::Attr.../emit/mod.rs:422super::shader::Shadercrates/victory-gpu/src/fence.rs:138super::*,:139crate::object::slotcrates/victory-gpu/src/pipeline.rs:21OnceLock#1017 passes that same clippy plus the tests and the Windows-target clippy (both feature sets) as of today, so this one looks superseded; worth comparing before either merges.
Not tested: Windows, the game.
Imported from Marvisak/VIctory. Originally posted by Impre-visible on 2026-11-24T19:19:18Z.
One more Wine-specific point, measured tonight on Linux (GE-Proton11-6 Wine, vkd3d-proton from Proton Experimental, GTX 1660):
Under Wine the indirect argument clamp never compiles, so every indirect execution is dropped.
crates/victory-gpu/src/indirect.rsbuilds its clamp shader withD3DCompile. Wine's built-ind3dcompiler_47(vkd3d-shader's HLSL compiler) rejects it:and the frame-rate lines then report
dropped N/frame without a host pipeline: indirect kind K: not bounded (no clamp, or arguments not 4-byte aligned).not boundedreport lines in one run to about frame 1930winetricks d3dcompiler_47)With the native compiler the indirect draws run: the world frame time goes from about 1.3-4.6 s to 7-14 s here, and I get 16 warnings
a draw or dispatch dropped: no dynamic slots for its tables. The final image is still dark in both cases.So for Linux users today: install the native
d3dcompiler_47in the prefix. A fix on the VIctory side could be to ship the clamp as precompiled bytecode, or to write it withoutRWByteAddressBuffer.Load/Load3/Store2/Store3; I have not tested either.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:23:51Z.
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:apps/victory/src/translate.rs.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by tarcisioads on 2026-11-25T01:27:07Z.
Tested this on macOS (
Darwin arm64,cargo 1.100.0) cherry-picked onto currentmain(42363ab):xgame.rschange is already present onmain, andapps/victory/src/translate.rshad a small conflict at the end of the file with the newtestsmodule.main, two newer paths inapps/victoryalso need#[cfg(windows)]gating socargo test --workspacebuilds off Windows:apps/victory/src/translate.rs:warm()(callsvictory_gpu::shader_cache, which is#[cfg(windows)])apps/victory/src/prebuild.rs:prebuild::run()and itsvictory_gpu::pipeline::{Prebuild, ...}imports (also#[cfg(windows)])cargo test --workspacepasses on macOS (400 passed, 0 failed, 18 ignored) andcargo xtask policypasses (182 files ok).Imported from Marvisak/VIctory. Originally posted by tarcisioads on 2026-11-25T01:37:16Z.
I pushed a rebased branch with those two
apps/victory#[cfg(windows)]fixes on top ofmain(42363ab) in case it's helpful: https://github.com/tarcisioads/VIctory/tree/test/macos-pr523 (commits8461553andf7d7d75).Imported from Marvisak/VIctory. Originally posted by astrosteveo on 2026-11-25T02:25:05Z.
I rebased this onto
940d32f, keeping your commit, in https://github.com/astrosteveo/VIctory/pull/1. On top of it: the two newer breaks tarcisioads found (warm,prebuild), onecfg_attr(not(windows), allow(...))line per affected crate so clippy passes with-D warnings, an executable pre-commit hook with a test, and a Linux CI job as a separate commit. Linux: 401 tests passed, 0 failed, 18 ignored. CI passes on Windows and Linux. Take whatever is useful; I'm not opening a competing PR. Done with AI assistance (Claude).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.