Repository navigation
Linux: compile, test and run the analysis commands + format all files - #128
LazyHatGuy wants to merge 6 commits into
Conversation
The GPU and loader modules declared crash, texture and host reads unconditionally, and hle's UI dialog, allocator hook and relaunch call Windows items the modules no longer export here. Gate each; on Linux a value wait is met as unmapped memory is, the host dialog and title relaunch are dismissed, and the translate command says what it needs. Co-Authored-By: Qwen 3.8 Flash Next <noreply@qwen.ai> 🤖 Generated with [OpenCode](https://opencode.ai) (Qwen3.8 Flash)
The loader and PE tests parse the host's own test binary as PE, and two kernel tests read image paths a Windows host keeps as given: on Linux the binary is an ELF and a `C:\...` path is one relative name. Gate those tests to Windows; the rest run on both. Co-Authored-By: Qwen 3.8 Flash Next <noreply@qwen.ai> 🤖 Generated with [OpenCode](https://opencode.ai) (Qwen3.8 Flash)
On a Linux host the Windows-only users of some items are compiled out, so their imports and host-side bookkeeping stand unused: move the dependencies that only the Windows modules use (anyhow, tracing, miniz_oxide, opus-pure, victory-core, victory-pipeline, victory-shader) under the existing cfg(windows) target sections, gate the remaining Windows-only imports and one helper, allow the dead host-side bookkeeping in the GPU files where it has no Linux caller, and keep the deprecated fetch_update allowed until the pinned toolchain can take try_update. No behaviour changes anywhere; the Windows build is untouched. Co-Authored-By: Qwen 3.8 Flash Next <noreply@qwen.ai> 🤖 Generated with [OpenCode](https://opencode.ai) (Qwen3.8 Flash)
`queue::presented` is only read from the capture and host code, all of it Windows-side, so the diagnostics feature alone left it dead. Co-Authored-By: Qwen 3.8 Flash Next <noreply@qwen.ai> 🤖 Generated with [OpenCode](https://opencode.ai) (Qwen3.8 Flash)
|
The CI changes look careful: actions pinned by commit SHA,
Written with an AI assistant (Claude). |
ErRusso
left a comment
There was a problem hiding this comment.
Reviewed at 7c936ab against 2119b0e.
Linux build/test gating is sound: cargo test --workspace --locked passes on this Linux host (all targets green; 170 in victory-shader, 48 in victory-hle, etc.), and the Windows-only paths are gated without changing the Windows build.
Blocking: the new CI fmt step fails on this branch. cargo fmt --all -- --check exits 1 with a large diff (12k lines of formatting output, starting at apps/victory/src/main.rs). Since the PR adds cargo fmt --all -- --check to CI, either run cargo fmt --all and commit the result, or drop the fmt step. As written, the new lint job cannot pass.
Also check the ubuntu-latest matrix job: the workspace tests pass here, but the job needs the pinned toolchain and any system deps; it is otherwise reasonable.
What this does
Makes
cargo test --workspaceandcargo run -p victory -- configpass on aLinux host. The tree was already mostly gated behind
cfg(windows); thiscloses the last leaks, and the Windows build is untouched: every edit is an
attribute or code moved verbatim under a gate.
cargo fmt --allwas also ran so the lint job passesWhat was leaking
victory-loaderdeclared thecrashmodule (VEH handler,windows_sys)unconditionally.
victory-gpureferencedhost::read_into,texture::committedandhost_resourcefrom code that compiles everywhere. On Linux a memory valuewait now counts as met, as unmapped memory already does.
victory-hleused the Win32 modal dialog, thexmemallocator hook,lifecycle's relaunch andfiles' drive mount from ungated paths. Thedialog is dismissed and a self-relaunch parks outside Windows.
apps/victory'stranslatecommand needs the host D3D compiler: likerun, it is present on Linux and says so.Tests
Unit tests that lean on a Windows host are gated with
cfg(all(test, windows)), following the pattern the tree already uses: the loader and PEtests parse the host's own test binary as a PE image (an ELF on Linux), and
two kernel tests assume Windows path semantics. Everything else runs on both:
23 test targets, 0 failures.
Hygiene
cargo check/clippy --workspace --all-targets,plain and
--all-features. Deps that only the Windows modules use (anyhow,tracing, miniz_oxide, opus-pure, victory-core, victory-pipeline,
victory-shader) moved under the existing
cfg(windows)target sections.fetch_updatekept with#[allow(deprecated)]:try_updateis newer thanthe pinned 1.98 toolchain.
Cargo.lockunchanged;--lockedpasses.Still Windows-only
Actually running a title: it needs host D3D12 and the Windows loader. Linux
gets the build, the tests, and the file-side commands —
config,inspect,census,lib-exports,shader-info.This PR was AI assisted