Linux: compile, test and run the analysis commands + format all files #128

Closed
LazyHatGuy wants to merge 6 commits from upstream-pr/128 into main
LazyHatGuy commented 2026-11-24 21:42:42 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by LazyHatGuy on 2026-11-24T21:42:42Z.


What this does

Makes cargo test --workspace and cargo run -p victory -- config pass on a
Linux host. The tree was already mostly gated behind cfg(windows); this
closes the last leaks, and the Windows build is untouched: every edit is an
attribute or code moved verbatim under a gate.

cargo fmt --all was also ran so the lint job passes

What was leaking

  • victory-loader declared the crash module (VEH handler, windows_sys)
    unconditionally.
  • victory-gpu referenced host::read_into, texture::committed and
    host_resource from code that compiles everywhere. On Linux a memory value
    wait now counts as met, as unmapped memory already does.
  • victory-hle used the Win32 modal dialog, the xmem allocator hook,
    lifecycle's relaunch and files' drive mount from ungated paths. The
    dialog is dismissed and a self-relaunch parks outside Windows.
  • apps/victory's translate command needs the host D3D compiler: like
    run, 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 PE
tests 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

  • Zero warnings on Linux for 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_update kept with #[allow(deprecated)]: try_update is newer than
    the pinned 1.98 toolchain.
  • Cargo.lock unchanged; --locked passes.

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

<!-- greyfinch-sync:fxceless/victory-fork:issue:6591993954 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/128). Originally posted by [LazyHatGuy](https://github.com/LazyHatGuy) on 2026-11-24T21:42:42Z. --- ## What this does Makes `cargo test --workspace` and `cargo run -p victory -- config` pass on a Linux host. The tree was already mostly gated behind `cfg(windows)`; this closes the last leaks, and the Windows build is untouched: every edit is an attribute or code moved verbatim under a gate. `cargo fmt --all` was also ran so the lint job passes ## What was leaking - `victory-loader` declared the `crash` module (VEH handler, `windows_sys`) unconditionally. - `victory-gpu` referenced `host::read_into`, `texture::committed` and `host_resource` from code that compiles everywhere. On Linux a memory value wait now counts as met, as unmapped memory already does. - `victory-hle` used the Win32 modal dialog, the `xmem` allocator hook, `lifecycle`'s relaunch and `files`' drive mount from ungated paths. The dialog is dismissed and a self-relaunch parks outside Windows. - `apps/victory`'s `translate` command needs the host D3D compiler: like `run`, 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 PE tests 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 - Zero warnings on Linux for `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_update` kept with `#[allow(deprecated)]`: `try_update` is newer than the pinned 1.98 toolchain. - `Cargo.lock` unchanged; `--locked` passes. ## 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
ericomeehan commented 2026-11-24 23:09:36 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by ericomeehan on 2026-11-24T22:28:58Z.


The CI changes look careful: actions pinned by commit SHA, permissions: contents: read kept, no secrets, and the concurrency group fixed for pull requests. Three things to check:

  • cargo fmt --all -- --check is a new gate. The workspace may not be rustfmt-clean at main (an AGENTS.md draft upstream, Marvisak/VIctory#1707, says a full cargo fmt is avoided because of that, and this fork has added a lot of code since). If main doesn't pass it today, every open PR goes red once this lands. Worth running it on main first, or landing the formatting separately.
  • actions-rust-lang/setup-rust-toolchain in place of rustup toolchain install plus Swatinem/rust-cache: it reads rust-toolchain.toml and caches by default, so the pinned 1.98.1 toolchain should still apply. Worth confirming in the first run's log that it isn't picking up stable.
  • #64 also edits ci.yml (a Linux cross-compile job), so the two will conflict; #37 and the Wine fixes (#20, #28, #127) overlap with the Linux goal too.

Written with an AI assistant (Claude).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7146282723 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/128#issuecomment-7146282723). Originally posted by [ericomeehan](https://github.com/ericomeehan) on 2026-11-24T22:28:58Z. --- The CI changes look careful: actions pinned by commit SHA, `permissions: contents: read` kept, no secrets, and the concurrency group fixed for pull requests. Three things to check: - **`cargo fmt --all -- --check` is a new gate.** The workspace may not be rustfmt-clean at `main` (an `AGENTS.md` draft upstream, Marvisak/VIctory#1707, says a full `cargo fmt` is avoided because of that, and this fork has added a lot of code since). If `main` doesn't pass it today, every open PR goes red once this lands. Worth running it on `main` first, or landing the formatting separately. - **`actions-rust-lang/setup-rust-toolchain` in place of `rustup toolchain install` plus `Swatinem/rust-cache`:** it reads `rust-toolchain.toml` and caches by default, so the pinned 1.98.1 toolchain should still apply. Worth confirming in the first run's log that it isn't picking up stable. - **#64 also edits `ci.yml`** (a Linux cross-compile job), so the two will conflict; #37 and the Wine fixes (#20, #28, #127) overlap with the Linux goal too. Written with an AI assistant (Claude).
upstream-sync changed title from [PR #128] Linux: compile, test and run the analysis commands to [PR #128] Linux: compile, test and run the analysis commands + format all files 2026-11-25 00:09:22 +00:00
ErRusso commented 2026-11-25 00:09:22 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by ErRusso on 2026-11-24T23:45:12Z.

Review: CHANGES_REQUESTED


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.

<!-- greyfinch-sync:fxceless/victory-fork:review:6049254117 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/128#pullrequestreview-6049254117). Originally posted by [ErRusso](https://github.com/ErRusso) on 2026-11-24T23:45:12Z. **Review:** CHANGES_REQUESTED --- 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.
Yoshi-233 commented 2026-11-25 03:06:35 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Yoshi-233 on 2026-11-25T02:49:16Z.


Independent Linux compilation check at your PR head 072b1e3bfa45, with Rust 1.98.1 on Ubuntu 24.04.5 x86-64: cargo check --locked --workspace --all-targets exited 0, including the CLI, GPU, HLE, pipeline and xtask crates. The all-targets check compiled the Linux test targets too. This result is for compilation; it does not exercise the Windows runtime paths.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7151229693 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/128#issuecomment-7151229693). Originally posted by [Yoshi-233](https://github.com/Yoshi-233) on 2026-11-25T02:49:16Z. --- Independent Linux compilation check at your PR head `072b1e3bfa45`, with Rust 1.98.1 on Ubuntu 24.04.5 x86-64: `cargo check --locked --workspace --all-targets` exited 0, including the CLI, GPU, HLE, pipeline and xtask crates. The all-targets check compiled the Linux test targets too. This result is for compilation; it does not exercise the Windows runtime paths.
ErRusso commented 2026-11-25 12:06:43 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by ErRusso on 2026-11-25T11:15:14Z.

Review: APPROVED


Reviewed at 072b1e3. The formatting blocker is resolved:

  • cargo fmt --all -- --check now exits 0 with no diff on this branch. The only commit after my review is Format all files, so the gating and test results from the previous review still hold.
  • @Yoshi-233's independent cargo check --locked --workspace --all-targets at this same head passes.

The PR is currently CONFLICTING with main; please rebase before merging. With that, the Linux gating and the CI changes are good to go.

<!-- greyfinch-sync:fxceless/victory-fork:review:6056597748 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/128#pullrequestreview-6056597748). Originally posted by [ErRusso](https://github.com/ErRusso) on 2026-11-25T11:15:14Z. **Review:** APPROVED --- Reviewed at `072b1e3`. The formatting blocker is resolved: - `cargo fmt --all -- --check` now exits 0 with no diff on this branch. The only commit after my review is `Format all files`, so the gating and test results from the previous review still hold. - @Yoshi-233's independent `cargo check --locked --workspace --all-targets` at this same head passes. The PR is currently `CONFLICTING` with `main`; please rebase before merging. With that, the Linux gating and the CI changes are good to go.
upstream-sync closed this pull request 2026-11-26 15:03:54 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!128
No description provided.