Diagnostics builds compile again #2744

Closed
gabrielecabrini wants to merge 1 commit from upstream-pr/2744 into main
gabrielecabrini commented 2026-11-29 16:46:39 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by gabrielecabrini on 2026-11-29T16:46:39Z.


What

cargo build --profile diag -p victory --features diagnostics, and therefore the CI's cargo clippy --workspace --all-targets --all-features step, stop at nine errors in victory-gpu on main.

Evidence

error[E0618]: expected function, found `Option<SubmissionTiming>`
    --> crates/victory-gpu/src/host.rs:9127:60
8673 |         let mut timing = (late && submission_timing()).then(|| SubmissionTiming::new(...));
error[E0425]: cannot find function `mb` in this scope
    --> crates/victory-gpu/src/copystat.rs:1349:9

Fix

  • host.rs: the submission's local let mut timing (an Option<SubmissionTiming>) shadows the diagnostics-only fn timing() (VICTORY_GPU_TIMING) at its three uses in the same function. They call self::timing() now.
  • copystat.rs: the "windows cut nearer" line formats with mb(..), which that function never defined. It is defined there as a closure, bytes to MB as f64, as the file's other report functions do.

No behaviour changes. VICTORY_GPU_TIMING stays off unless set.

Tests

  • cargo xwin build --profile diag -p victory --features diagnostics builds.
  • cargo xwin clippy -p victory-gpu --all-targets --all-features finishes with no errors.
  • The resulting diagnostics build ran several play sessions under Proton (2026-11-29).
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5552872506 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2744). Originally posted by [gabrielecabrini](https://github.com/gabrielecabrini) on 2026-11-29T16:46:39Z. --- ## What `cargo build --profile diag -p victory --features diagnostics`, and therefore the CI's `cargo clippy --workspace --all-targets --all-features` step, stop at nine errors in `victory-gpu` on `main`. ## Evidence error[E0618]: expected function, found `Option<SubmissionTiming>` --> crates/victory-gpu/src/host.rs:9127:60 8673 | let mut timing = (late && submission_timing()).then(|| SubmissionTiming::new(...)); error[E0425]: cannot find function `mb` in this scope --> crates/victory-gpu/src/copystat.rs:1349:9 ## Fix - `host.rs`: the submission's local `let mut timing` (an `Option<SubmissionTiming>`) shadows the diagnostics-only `fn timing()` (`VICTORY_GPU_TIMING`) at its three uses in the same function. They call `self::timing()` now. - `copystat.rs`: the "windows cut nearer" line formats with `mb(..)`, which that function never defined. It is defined there as a closure, bytes to MB as `f64`, as the file's other report functions do. No behaviour changes. `VICTORY_GPU_TIMING` stays off unless set. ## Tests - `cargo xwin build --profile diag -p victory --features diagnostics` builds. - `cargo xwin clippy -p victory-gpu --all-targets --all-features` finishes with no errors. - The resulting diagnostics build ran several play sessions under Proton (2026-11-29).
gabrielecabrini commented 2026-11-30 17:17:09 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by gabrielecabrini on 2026-11-30T17:17:09Z.


Closing: the same change is already on main.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7286022046 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2744#issuecomment-7286022046). Originally posted by [gabrielecabrini](https://github.com/gabrielecabrini) on 2026-11-30T17:17:09Z. --- Closing: the same change is already on main.

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
trustno1-coder/VIctory-NVIDIA!2744
No description provided.