Repository navigation
Conversation
`main` does not build on non-Windows hosts (CI runs only on windows-latest): `victory-gpu` calls Windows-only items from portable code, and Windows-only callers leave portable helpers unused. - victory-gpu: gate Windows-only items (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) with #[cfg(windows)], some #[cfg(any(windows, test))]; the per-memory texture helpers (family, DEPTH, MemoryKey, memory_key, castable), the `switch` module and the loader's `publish` module stay built everywhere (their tests run on every host) and are allowed unused off Windows. The root-signature shim tests and the ID3D12Fence1 test, which drive Windows-only COM objects, are Windows-only. - victory-gpu: silence unused parameters on the non-Windows paths of close/barrier/execute_indirect, matching reset(). - victory-hle: gate `function` (the System32 loader) and the Windows-only modules' imports; keep already-absolute and Windows-style absolute title paths on non-Windows hosts and resolve file names across both separators; gate the drive-over-folder mount test to Windows. - victory-shader: gate the Windows-only imports of the emit tests; `Lowered::rovs` is read only by the GPU tests; the mesh test's program is built for the validator, which only Windows has. - victory-loader/victory-pe: gate tests that read current_exe as PE. - apps/victory: `translate --cache` (the warm-up and pre-build) fills the host's shader cache and pipeline library and is Windows-only; other hosts get an error saying so. Without the Windows DLLs, the validator and host pipelines are skipped with a note. Linux: cargo build, cargo clippy --workspace --all-targets -D warnings (default and --all-features) and cargo test --workspace --all-features (26 suites, 394 passed) pass. Windows target (cargo-xwin): clippy -D warnings, default and --all-features, passes. cargo xtask policy passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Windows the title-path shortcut returned an already-absolute path unchanged, where `main` passed every path through `std::path::absolute` (`GetFullPathNameW`: `/` becomes `\`, `..` is resolved), so a title started as `C:/games/x/../game.exe` would read that raw string back from `GetModuleFileName`. The shortcut now runs only on other hosts, where a Windows-style path must not be joined to the host's current directory; Windows behaves as before. Tests: on Windows `C:/games/x/../game.exe` becomes `C:\games\game.exe`; elsewhere drive-rooted, drive-root and UNC title paths are kept as stored and a relative one is made absolute. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…finds `image_named` took the file name from a split at `\` and `/` on every host. Windows keeps `Path::file_name` now, so nothing changes there; the split is for other hosts, whose `Path::file_name` splits only at `/`. A test checks both on each host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New code on main reaches items that are Windows-only off Windows: texture_desc calls texture_memory (now Windows-only too), choose uses IDLE_MS and IDLE_FRAMES (allowed unused off Windows, as choose and its test need them), execute leaves `this` unused, and three new shader tests validate DXIL, which only Windows has. Items only Windows code uses, the new hold module among them, are allowed unused off Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ithout stubs The inner cfg(windows) block of a test that is already Windows-only, and a cfg(windows) import in a module that already is, go. translate's host checks (the Checks field and its use) are Windows-only, so the stand-in Host off Windows keeps only `new`, which fails, and the unreachable stub shaders are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fallback samplers, the view heap page-table test, the audio heap's host-allocator report and the text-entry style test reach Windows-only modules; the validator test's lowered DXIL is mutated on Windows only.
After Marvisak#2670's job, with the same clippy gates as the Windows job.
kotekompotek
left a comment
There was a problem hiding this comment.
Scoped review: the Linux job mirrors the Windows one (clippy + all-features + tests), and the cfg-gating is mechanical — windows-only modules/import paths behind cfg(windows) with anyhow::Context split where needed. Catching non-Windows breakage in CI is worth the maintenance surface. LGTM.
fuzeofficlal
left a comment
There was a problem hiding this comment.
Verified head 5333d11c cleanly merged onto origin/main (63bcca43) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + D3D12 WARP + VICTORY_D3D12_DEBUG=1).
Code & Windows Regression Review
- All
#[cfg(windows)]/#[cfg(not(windows))]gates preserve Windows behavior cleanly (victory-hle/src/runtime.rskeepsstd::path::absoluteon Windows; PEcurrent_exe()self-parse tests and Windows-only API/UI tests are gated appropriately; non-WindowsValidator/Hoststubs return clear errors). crates/victory-shader/src/emit/lower.rsis520,798B (+235 B vs63bcca43), safely under the 512 KiB limit.- Cross-PR note (
#2907):#2907callsvictory_gpu::adapter_identity(),victory_gpu::set_caption_status(...), andcrate::prebuild::run(...)unconditionally fromapps/victory/src/startup.rs, so whichever PR lands second will need non-Windows#[cfg]gates/stubs there.
Local Verification (Windows 11 x64)
cargo clippy --locked --workspace --all-targets -- -D warnings(default and--features victory-gpu/diagnostics): clean.cargo xtask policy:191 files ok.- Passed full unit + integration test suites for
victory(14+4),victory-core(13),victory-formats(46),victory-game(15),victory-hle(154+2),victory-loader(35+4),victory-pe(36),victory-pipeline(8),xtask(6). victory-gpu(VICTORY_D3D12_DEBUG=1,--features diagnostics): RTX 5090root::tests11/11; WARPhost::tests+descriptor::host::tests31/31,root/list/queue/fence/resource/descriptor47/47,frame::tests2/2,placed_uav_tests1/1.victory-shader:emit::lower::tests+emit::tests50/50 passed.
Looks clean on the Windows side and ready to merge.
|
Automated triage for the maintainers. Proposed close. Out of scope. This makes the workspace build and test off Windows, with stubs and CI: passing. This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the Generated by Claude Code |
maindoes not build on Linux (#90):cargo check --workspace --all-targetsat842b0cbstops with 21 errors invictory-gpuandvictory-shader. That blocks contributors on Linux from running the tests at all.This carries #2334, which conflicts with
main, rebased onto842b0cb. Its commits keep their authors. #2334 in turn carries #1017; its description lists what the gates do.What is new here
xgameui.rs.mainadded apasswordparameter toask. The off-Windowsasktakes it too and still cancels.0721c05: gates for codemaingained after Fix the Linux build and clippy gates (carries #1017) #2334.descriptor::fallback_samplersis re-exported on Windows only, beside itshostmodule.a_released_view_heap_drops_its_page_tableruns on Windows only. It reads the host heap andmemory.tracing::warn!, becausexmemis Windows-only.password_scope_masks_the_edit_controlchecks the edit-control style on Windows only. The scope-to-password check still runs everywhere.loweredis mutable on Windows only, sounused_mutis allowed off Windows.5333d11: a Linux CI job, somainstays building off Windows. Since Fix the Linux build and clippy gates (carries #1017) #2334 was opened,mainbroke the Linux build twice more. The job runs onubuntu-latestwith the same clippy gates and tests as the Windows job. The job itself is from Build and test on Linux; a CI job keeps it so; VICTORY_LOG_FILE #2670.No behaviour changes on Windows.
Proof
On CachyOS Linux, Rust 1.98.1:
cargo clippy --workspace --all-targets --locked -- -D warnings: clean. The same command with--all-featuresis also clean.cargo test --workspace --locked: 458 passed, 0 failed.linuxjob and the Windowscheckjob both pass.mainat842b0cb:cargo check --workspace --all-targetsfails with 21 errors.--target x86_64-pc-windows-msvc, withclang-clforblake3's C files): both CI clippy gates are clean. CI here runs the Windows tests.cargo xtask policy: 191 files ok.