Loader: compile unwind_copy only with the diagnostics feature #3785

Closed
github-bot wants to merge 1 commit from github-bot/gh-3785 into main AGit
Owner

@⁠mrgeda on GitHub · 2026-11-30 07:08 UTC · original
mrgeda:fix/unwind-copy-dead-code → main · +1 −0 · 1 files · 1 commits · closed without merging

[pr-fix]

Fixes # (no issue: the first Clippy gate itself fails on main)

What it changes

unwind_copy is called only from stacks.rs, whose module is compiled with
diagnostics alone (crates/victory-loader/src/lib.rs:42-43). It was moved
into the unconditional crash module, so the default build has no caller for
it and -D warnings stops the first Clippy gate:

error: function `unwind_copy` is never used
 --> crates\victory-loader\src\crash.rs:804:15
   = note: `-D dead-code` implied by `-D warnings`

That is the step main's CI has been failing on since 41adb55 (run 46320380085).
This adds the #[cfg(feature = "diagnostics")] the module that calls it
already carries.

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): none, this is a compile-time gate change
  • Before: cargo clippy -p victory-loader --locked -- -D warnings -> dead_code error, reproduced locally on 1.98.1
  • After: both CI Clippy gates pass
    • cargo clippy -p victory-loader --locked -- -D warnings
    • cargo clippy -p victory-loader --all-features --locked -- -D warnings
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): n/a
  • cargo test passed for the crates it touches: yes (cargo test -p victory-loader --locked, the integration suites: 4 tests, all pass)

Separately, the Tests step has an independent red of its own that this change
does not touch: cargo xtask policy reports
crates/victory-loader/src/heap_sites/frame_users.rs: 2022 hex digits in one run of \x/0x literals. It is the generated TESTED: &[usize] table (about 300
entries, lines 794-1093), which trips longest_hex_literal_run's 512-digit
limit. The file says "do not edit by hand" and its generator is not in the
tree, so how to present that table (or exempt it) looks like your call; I am
reporting it here rather than loosening the policy.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: none found (the open-PR list was checked by hand; GitHub's search API kept dropping through the proxy)
**@⁠mrgeda** on GitHub · 2026-11-30 07:08 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3785) `mrgeda:fix/unwind-copy-dead-code` → `main` · +1 −0 · 1 files · 1 commits · closed without merging [pr-fix] Fixes # (no issue: the first Clippy gate itself fails on main) ## What it changes `unwind_copy` is called only from `stacks.rs`, whose module is compiled with `diagnostics` alone (`crates/victory-loader/src/lib.rs:42-43`). It was moved into the unconditional `crash` module, so the default build has no caller for it and `-D warnings` stops the first Clippy gate: ``` error: function `unwind_copy` is never used --> crates\victory-loader\src\crash.rs:804:15 = note: `-D dead-code` implied by `-D warnings` ``` That is the step main's CI has been failing on since 41adb55 (run 46320380085). This adds the `#[cfg(feature = "diagnostics")]` the module that calls it already carries. ## How it was tested - GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): none, this is a compile-time gate change - Before: `cargo clippy -p victory-loader --locked -- -D warnings` -> dead_code error, reproduced locally on 1.98.1 - After: both CI Clippy gates pass - `cargo clippy -p victory-loader --locked -- -D warnings` - `cargo clippy -p victory-loader --all-features --locked -- -D warnings` - For shader changes, the wave sizes tested (32 and/or 64 lanes): n/a - `cargo test` passed for the crates it touches: yes (`cargo test -p victory-loader --locked`, the integration suites: 4 tests, all pass) Separately, the Tests step has an independent red of its own that this change does not touch: `cargo xtask policy` reports `crates/victory-loader/src/heap_sites/frame_users.rs: 2022 hex digits in one run of \x/0x literals`. It is the generated `TESTED: &[usize]` table (about 300 entries, lines 794-1093), which trips `longest_hex_literal_run`'s 512-digit limit. The file says "do not edit by hand" and its generator is not in the tree, so how to present that table (or exempt it) looks like your call; I am reporting it here rather than loosening the policy. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: none found (the open-PR list was checked by hand; GitHub's search API kept dropping through the proxy)
unwind_copy is called only from stacks.rs, whose module is compiled with
`diagnostics` alone. In the default build it therefore has no caller, and
`-D warnings` stops the first Clippy gate on dead_code: main's CI has been
red on that step since 41adb55.

Verified with both CI gates:
  cargo clippy -p victory-loader --locked -- -D warnings
  cargo clippy -p victory-loader --all-features --locked -- -D warnings
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 07:13:05 +00:00
Author
Owner

@⁠dyshay on GitHub · 2026-11-30 08:55 UTC · original

Merged into our fork's integration branch for testing (dyshay/VIctory-NVIDIA, branch janus-prs). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with --profile diag --features diagnostics, and the CPU tests of the touched code pass. A run on an RTX 4090 is queued. Frame times will follow here.

**@⁠dyshay** on GitHub · 2026-11-30 08:55 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3785#issuecomment-7273519001) Merged into our fork's integration branch for testing ([dyshay/VIctory-NVIDIA](https://github.com/dyshay/VIctory-NVIDIA/tree/janus-prs), branch `janus-prs`). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with `--profile diag --features diagnostics`, and the CPU tests of the touched code pass. A run on an RTX 4090 is queued. Frame times will follow here.
Author
Owner

@⁠mrgeda on GitHub · 2026-11-30 09:11 UTC · original

Thanks for merging, and for confirming --profile diag --features diagnostics works as expected—that's the exact path gated by the cfg.

Also, since a 4090 won't hit the low-memory paths, just wanted to mention I can repro the same #3784 issue on my laptop (16 GB RAM / RTX 4050 6 GB), though it stalls even earlier before reaching the scene:

  • 19 host pipelines failed (8 compute, 10 graphics, 1 mesh) with 0x8007000e
  • Commit hit 22.1 GB (only 1.1–3.0 GB resident); free physical RAM bottomed out at 750 MB
  • Memory guard deferred 512 compiles; stuck at 2.0 fps (502 ms/frame, 0 draws/frame) until I closed the window

Since it's a tier below the 8 GB / 16 GB setup in #3784, let me know if logs from a 6 GB card would be useful for this batch—I can also run it with VICTORY_HELD_LEVELS=1 and VICTORY_LEVELS_ON_DEMAND=1 like in #3784 if needed. Just sharing the data point here; keeping this PR strictly to the cfg change.

**@⁠mrgeda** on GitHub · 2026-11-30 09:11 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3785#issuecomment-7273859170) Thanks for merging, and for confirming --profile diag --features diagnostics works as expected—that's the exact path gated by the cfg. Also, since a 4090 won't hit the low-memory paths, just wanted to mention I can repro the same #3784 issue on my laptop (16 GB RAM / RTX 4050 6 GB), though it stalls even earlier before reaching the scene: - 19 host pipelines failed (8 compute, 10 graphics, 1 mesh) with 0x8007000e - Commit hit 22.1 GB (only 1.1–3.0 GB resident); free physical RAM bottomed out at 750 MB - Memory guard deferred 512 compiles; stuck at 2.0 fps (502 ms/frame, 0 draws/frame) until I closed the window Since it's a tier below the 8 GB / 16 GB setup in #3784, let me know if logs from a 6 GB card would be useful for this batch—I can also run it with VICTORY_HELD_LEVELS=1 and VICTORY_LEVELS_ON_DEMAND=1 like in #3784 if needed. Just sharing the data point here; keeping this PR strictly to the cfg change.
github-bot closed this pull request 2026-12-01 18:51:18 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:48 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:48 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3785#issuecomment-7321592532) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!3785
No description provided.