[build] --features diagnostics does not compile on v2026.11.29.01 (shadowed fn timing, missing mb in log_heap_elsewhere) #2164

Closed
opened 2026-11-29 10:04:13 +00:00 by PeppeBeard · 3 comments
PeppeBeard commented 2026-11-29 10:04:13 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by PeppeBeard on 2026-11-29T10:04:13Z.


Building from source at tag v2026.11.29.01 (commit 829188e9) with the diagnostics feature fails to compile:

cargo build --profile diag -p victory --features diagnostics

rustc 1.98.1 (per rust-toolchain.toml), x86_64-pc-windows-msvc, Windows 11.

Nine errors, all in victory-gpu, in three groups:

1. Shadowed timing function (E0618 ×3 + E0277 ×2)

The local added recently at crates/victory-gpu/src/host.rs:8673:

let mut timing = (late && submission_timing()).then(|| SubmissionTiming::new(called, runs.len(), parts.len() + 1));

shadows fn timing() -> bool (host.rs:2706), so the three later calls in the same function break:

  • host.rs:9127 — let groups: Vec<...> = if timing() {
  • host.rs:9169 — if timing() {
  • host.rs:9180 — if timing() && started.elapsed() > ...

The two E0277 str sizing errors at host.rs:9172 (runs[i].slowest(...)) are cascades of the same shadowing.

<arg_value>Suggested fix: rename the local (e.g. sub_timing) at lines 8673 and 8676–8677. The later call sites keep calling fn timing().

2. Missing mb closure in log_heap_elsewhere (E0425 ×4)

crates/victory-gpu/src/copystat.rs:1349–1352 calls mb(...) for the window_trim() line, but the mb closure is only defined inside the sibling log() function; the merge dropped the definition from log_heap_elsewhere.

Suggested fix: add before the tracing::info! using it (values are bytes):

let mb = |v: u64| v >> 20;

(same convention as same_bytes() in shadow.rs).

Why CI did not catch it: a plain build without the feature compiles clean — verified locally:

cargo build --profile diag -p victory

finishes without errors, so released artifacts are unaffected; only self-builders using --features diagnostics hit this.

With these two changes (3 inserted lines, 2 renamed identifiers) the diagnostics build finishes clean.

Happy to open a PR with the fix.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6677416072 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2164). Originally posted by [PeppeBeard](https://github.com/PeppeBeard) on 2026-11-29T10:04:13Z. --- Building from source at tag `v2026.11.29.01` (commit `829188e9`) with the diagnostics feature fails to compile: ``` cargo build --profile diag -p victory --features diagnostics ``` rustc 1.98.1 (per rust-toolchain.toml), x86_64-pc-windows-msvc, Windows 11. Nine errors, all in `victory-gpu`, in three groups: **1. Shadowed `timing` function (E0618 ×3 + E0277 ×2)** The local added recently at `crates/victory-gpu/src/host.rs:8673`: ```rust let mut timing = (late && submission_timing()).then(|| SubmissionTiming::new(called, runs.len(), parts.len() + 1)); ``` shadows `fn timing() -> bool` (host.rs:2706), so the three later calls in the same function break: - host.rs:9127 — `let groups: Vec<...> = if timing() {` - host.rs:9169 — `if timing() {` - host.rs:9180 — `if timing() && started.elapsed() > ...` The two E0277 `str` sizing errors at host.rs:9172 (`runs[i].slowest(...)`) are cascades of the same shadowing. <arg_value>**Suggested fix:** rename the local (e.g. `sub_timing`) at lines 8673 and 8676–8677. The later call sites keep calling `fn timing()`. **2. Missing `mb` closure in `log_heap_elsewhere` (E0425 ×4)** `crates/victory-gpu/src/copystat.rs:1349–1352` calls `mb(...)` for the `window_trim()` line, but the `mb` closure is only defined inside the sibling `log()` function; the merge dropped the definition from `log_heap_elsewhere`. **Suggested fix:** add before the `tracing::info!` using it (values are bytes): ```rust let mb = |v: u64| v >> 20; ``` (same convention as `same_bytes()` in shadow.rs). **Why CI did not catch it:** a plain build without the feature compiles clean — verified locally: ``` cargo build --profile diag -p victory ``` finishes without errors, so released artifacts are unaffected; only self-builders using `--features diagnostics` hit this. With these two changes (3 inserted lines, 2 renamed identifiers) the diagnostics build finishes clean. Happy to open a PR with the fix.
github-actions[bot] commented 2026-11-29 10:04:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-29T10:04:21Z.


Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7254188213 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2164#issuecomment-7254188213). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T10:04:21Z. --- Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
PeppeBeard commented 2026-11-29 10:10:51 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by PeppeBeard on 2026-11-29T10:10:51Z.


Environment

  • GPU: NVIDIA GeForce RTX 5070 Ti (16 GB), driver 621.40
  • Windows 11 (build 26200.9974)
  • rustc 1.98.1 (x86_64-pc-windows-msvc), per rust-toolchain.toml

About the play/crash logs: this failure happens at cargo build time, before any victory.exe exists, so there is no run to log — nothing was ever launched. Both %LOCALAPPDATA%\victory\logs\ and %LOCALAPPDATA%\VIctory\data\7952987A\ are empty on this machine (verified: no victory-nvidia-play-*.log, no crashes.log, no *.crash.log). The log of the failed run is therefore the compile log, pasted below in full (it is also what a fresh clone at 829188e9 produces: cargo clean, then cargo build --profile diag -p victory --features diagnostics).

A build without the feature (cargo build --profile diag -p victory) finishes clean on the same commit and toolchain, which is why the released artifacts built without diagnostics are unaffected.

error[E0425]: cannot find function `mb` in this scope
    --> crates\victory-gpu\src\copystat.rs:1349:9
     |
1349 |         mb(not_made),
     |         ^^ not found in this scope

error[E0425]: cannot find function `mb` in this scope
    --> crates\victory-gpu\src\copystat.rs:1350:9
     |
1350 |         mb(below),
     |         ^^ not found in this scope

error[E0425]: cannot find function `mb` in this scope
    --> crates\victory-gpu\src\copystat.rs:1351:9
     |
1351 |         mb(below_unsized),
     |         ^^ not found in this scope

error[E0425]: cannot find function `mb` in this scope
    --> crates\victory-gpu\src\copystat.rs:1352:9
     |
1352 |         mb(above),
     |         ^^ not found in this scope

error[E0618]: expected function, found `Option<SubmissionTiming>`
    --> crates\victory-gpu\src\host.rs:9127:60
     |
2706 | fn timing() -> bool {
     | ------------------- this function of the same name is available here, but it's shadowed by the local binding
...
8673 |         let mut timing = (late && submission_timing()).then(|| SubmissionTiming::new(called, runs.len(), parts.len() + 1));
     |             ---------- `timing` has type `Option<SubmissionTiming>`
...
9127 |         let groups: Vec<&[Option<ID3D12CommandList>]> = if timing() {
     |                                                            ^^^^^^--

error[E0618]: expected function, found `Option<SubmissionTiming>`
    --> crates\victory-gpu\src\host.rs:9169:16
     |
...
9169 |             if timing() {
     |                ^^^^^^--

error[E0618]: expected function, found `Option<SubmissionTiming>`
    --> crates\victory-gpu\src\host.rs:9180:16
     |
...
9180 |             if timing() && started.elapsed() > std::time::Duration::from_millis(50) {
     |                ^^^^^^--

error[E0277]: the size for values of type `str` cannot be known at compilation time
    --> crates\victory-gpu\src\host.rs:9172:26
     |
9172 |                 for (ms, op) in runs[i].slowest(frequency, usize::MAX) {
     |                          ^^ doesn't have a size known at compile-time

error[E0277]: the size for values of type `str` cannot be known at compilation time
    --> crates\victory-gpu\src\host.rs:9172:17
     |
9172 | /                 for (ms, op) in runs[i].slowest(frequency, usize::MAX) {
9173 | |                     crate::copystat::command_took(&op, ms);
9174 | |                 }
     | |_________________^ doesn't have a size known at compile-time

error: could not compile `victory-gpu` (lib) due to 9 previous errors; 5 warnings emitted

(The two E0277 str errors are cascades of the timing shadowing: runs[i] cannot be resolved while the loop operand type is broken.)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7254261728 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2164#issuecomment-7254261728). Originally posted by [PeppeBeard](https://github.com/PeppeBeard) on 2026-11-29T10:10:51Z. --- **Environment** - GPU: NVIDIA GeForce RTX 5070 Ti (16 GB), driver 621.40 - Windows 11 (build 26200.9974) - rustc 1.98.1 (x86_64-pc-windows-msvc), per `rust-toolchain.toml` **About the play/crash logs:** this failure happens at `cargo build` time, before any `victory.exe` exists, so there is no run to log — nothing was ever launched. Both `%LOCALAPPDATA%\victory\logs\` and `%LOCALAPPDATA%\VIctory\data\7952987A\` are empty on this machine (verified: no `victory-nvidia-play-*.log`, no `crashes.log`, no `*.crash.log`). The log of the failed run is therefore the **compile log**, pasted below in full (it is also what a fresh clone at `829188e9` produces: `cargo clean`, then `cargo build --profile diag -p victory --features diagnostics`). A build **without** the feature (`cargo build --profile diag -p victory`) finishes clean on the same commit and toolchain, which is why the released artifacts built without `diagnostics` are unaffected. ``` error[E0425]: cannot find function `mb` in this scope --> crates\victory-gpu\src\copystat.rs:1349:9 | 1349 | mb(not_made), | ^^ not found in this scope error[E0425]: cannot find function `mb` in this scope --> crates\victory-gpu\src\copystat.rs:1350:9 | 1350 | mb(below), | ^^ not found in this scope error[E0425]: cannot find function `mb` in this scope --> crates\victory-gpu\src\copystat.rs:1351:9 | 1351 | mb(below_unsized), | ^^ not found in this scope error[E0425]: cannot find function `mb` in this scope --> crates\victory-gpu\src\copystat.rs:1352:9 | 1352 | mb(above), | ^^ not found in this scope error[E0618]: expected function, found `Option<SubmissionTiming>` --> crates\victory-gpu\src\host.rs:9127:60 | 2706 | fn timing() -> bool { | ------------------- this function of the same name is available here, but it's shadowed by the local binding ... 8673 | let mut timing = (late && submission_timing()).then(|| SubmissionTiming::new(called, runs.len(), parts.len() + 1)); | ---------- `timing` has type `Option<SubmissionTiming>` ... 9127 | let groups: Vec<&[Option<ID3D12CommandList>]> = if timing() { | ^^^^^^-- error[E0618]: expected function, found `Option<SubmissionTiming>` --> crates\victory-gpu\src\host.rs:9169:16 | ... 9169 | if timing() { | ^^^^^^-- error[E0618]: expected function, found `Option<SubmissionTiming>` --> crates\victory-gpu\src\host.rs:9180:16 | ... 9180 | if timing() && started.elapsed() > std::time::Duration::from_millis(50) { | ^^^^^^-- error[E0277]: the size for values of type `str` cannot be known at compilation time --> crates\victory-gpu\src\host.rs:9172:26 | 9172 | for (ms, op) in runs[i].slowest(frequency, usize::MAX) { | ^^ doesn't have a size known at compile-time error[E0277]: the size for values of type `str` cannot be known at compilation time --> crates\victory-gpu\src\host.rs:9172:17 | 9172 | / for (ms, op) in runs[i].slowest(frequency, usize::MAX) { 9173 | | crate::copystat::command_took(&op, ms); 9174 | | } | |_________________^ doesn't have a size known at compile-time error: could not compile `victory-gpu` (lib) due to 9 previous errors; 5 warnings emitted ``` (The two E0277 `str` errors are cascades of the `timing` shadowing: `runs[i]` cannot be resolved while the loop operand type is broken.)
trustno1-coder commented 2026-11-30 16:39:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-30T16:39:33Z.


This should be fixed in v2026.11.29.05. If it still happens on the latest version, please open a new issue with the logs from a run on that version (the play log from %LOCALAPPDATA%\victory\logs and crashes.log).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7285025990 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2164#issuecomment-7285025990). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-30T16:39:33Z. --- This should be fixed in [v2026.11.29.05](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.29.05). If it still happens on the latest version, please open a new issue with the logs from a run on that version (the play log from `%LOCALAPPDATA%\victory\logs` and `crashes.log`).
Sign in to join this conversation.
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#2164
No description provided.