clippy: the lints that are not dead code, so the CI step gets past victory-shader #3

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

@⁠erdemcisse on GitHub · 2026-12-01 21:54 UTC · original
clippy/mechanical-lints → main · +7 −8 · 5 files · 1 commits · closed without merging

What and why

cargo clippy --workspace --all-targets --locked -- -D warnings has never passed here (issue #2), and CI stops at that step, so cargo test --workspace has never run in CI at all. The two errors that stop it first are mechanical, in victory-shader:

error: manual implementation of `.is_multiple_of()`
  --> crates/victory-shader/src/emit/water_tile_slots.rs:80:50
80 |         debug_assert!(new.len() <= body.len() && body.len() % 4 == 0);

error: returning the result of a `let` binding from a block
  --> crates/victory-shader/src/emit/mod.rs:2893   (div_fixup_corner_fixture)

With those two out of the way victory-gpu is next, and three of its errors need no decision from anyone (line numbers on main b67c405):

file was now
crates/victory-gpu/src/shadow.rs:1716 if turns % 16 == 0 if turns.is_multiple_of(16)
crates/victory-gpu/src/texture.rs:1657 is_all_zero(&read) is_all_zero(read)
crates/victory-gpu/src/watch.rs:4026 open(&mut g, …) open(&g, …) (+ the mut the guard no longer needs)

open has always taken &Guards, so the &mut only ever coerced; is_multiple_of is x % n == 0; the & clippy points at is one the compiler dereferences anyway. No behaviour change.

What is left is deliberately not here. On this base the remaining failures are 27 dead_code diagnostics — 29 items, because two of them name a pair of methods each: the unused "meta store" in turbo.rs (ShaderMeta, MetaStore, META, META_MAGIC, meta_enabled, encode/decode_resource_kind, encode/decode_root, load_meta_file, meta_store, shader_meta_get/put, flush_meta_now, log_stats), mix64, fast_hash_128*, smart_back::log_stats, host::sends_own, shadow::{card_meta, has_initialized_piece, held_elsewhere}, and watch's Port7Counts, port_journal_counts, per_frame, nothing_new, port_guard_plan, port_guard_line — code that Revert "merge: take non-RT performance and stability work from Leonida Continued" (732113e) left behind. Deleting, wiring up or cfg-gating it is your call, not mine to guess, so issue #2 lists every item with its line.

Tested

Rust 1.98.1 (the pin in rust-toolchain.toml), x86_64-pc-windows-msvc, Windows 11 10.0.26100, MSVC 14.44.35207 — the toolchain and target of the workflow, named explicitly as RUSTUP_TOOLCHAIN=1.98.1-x86_64-pc-windows-msvc (a bare 1.98.1 resolves to rustup's default host here, which is the gnu one). The branch was rebased on main b67c405 before these runs; the workflow run for this branch reports action_required (a fork PR waits for approval), so the numbers are local.

cargo clippy --workspace --all-targets --locked -- -D warnings
  -> exit 101; victory-shader compiles clean; what is left is
     "could not compile victory-gpu (lib test) due to 27 previous errors", all dead_code

cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
  -> exit 101; the same dead code, plus a never-constructed faultbook::Unlocked,
     is_multiple_of at crates/victory-gpu/src/descriptor.rs:1235, and a needless
     borrow at crates/victory-gpu/src/texture.rs:1825

cargo test -p victory-gpu --lib --locked -- --test-threads=1
  -> 466 passed; 5 failed; 36 ignored
cargo test --workspace --locked
  -> 26 + 2 + 16 + 48 + 3 passed in the other crates; victory-gpu 464 passed, 7 failed

Those failures are not from this diff, and they decide what happens next. The same five gpu_owned tests fail on unmodified main (b67c405) on this PC — assertion failed: shadow.carded(), "512 KiB buffer should be Card-backed in GDDR7 VRAM" — so they are a property of the machine and of that code, not of a lint. The sixth is host::menu::tests::the_link_is_always_right_under_the_note, which fails only where VICTORY_STREAMLINE_DIR is set (that is #1); the seventh, in the multi-threaded workspace run, is the flaky watch::port7_tests::no_write_is_lost_with_port_7 of #4. What this change does is let the Tests step run for the first time: it will be red on that set, and #1 and #4 are the other two pieces.

GPUs tested: n/a for the change — lints and unit tests; no device workload, no game files.

AI-assisted: yes — DeepSeek Harness (lead agent).

**@⁠erdemcisse** on GitHub · 2026-12-01 21:54 UTC · [original](https://github.com/RedLightDOWN/VIvidia/pull/3) `clippy/mechanical-lints` → `main` · +7 −8 · 5 files · 1 commits · closed without merging ### What and why `cargo clippy --workspace --all-targets --locked -- -D warnings` has never passed here (issue #2), and CI stops at that step, so `cargo test --workspace` has never run in CI at all. The two errors that stop it first are mechanical, in `victory-shader`: ``` error: manual implementation of `.is_multiple_of()` --> crates/victory-shader/src/emit/water_tile_slots.rs:80:50 80 | debug_assert!(new.len() <= body.len() && body.len() % 4 == 0); error: returning the result of a `let` binding from a block --> crates/victory-shader/src/emit/mod.rs:2893 (div_fixup_corner_fixture) ``` With those two out of the way `victory-gpu` is next, and three of its errors need no decision from anyone (line numbers on `main` `b67c405`): | file | was | now | | --- | --- | --- | | `crates/victory-gpu/src/shadow.rs:1716` | `if turns % 16 == 0` | `if turns.is_multiple_of(16)` | | `crates/victory-gpu/src/texture.rs:1657` | `is_all_zero(&read)` | `is_all_zero(read)` | | `crates/victory-gpu/src/watch.rs:4026` | `open(&mut g, …)` | `open(&g, …)` (+ the `mut` the guard no longer needs) | `open` has always taken `&Guards`, so the `&mut` only ever coerced; `is_multiple_of` is `x % n == 0`; the `&` clippy points at is one the compiler dereferences anyway. No behaviour change. **What is left is deliberately not here.** On this base the remaining failures are 27 `dead_code` diagnostics — 29 items, because two of them name a pair of methods each: the unused "meta store" in `turbo.rs` (`ShaderMeta`, `MetaStore`, `META`, `META_MAGIC`, `meta_enabled`, `encode`/`decode_resource_kind`, `encode`/`decode_root`, `load_meta_file`, `meta_store`, `shader_meta_get`/`put`, `flush_meta_now`, `log_stats`), `mix64`, `fast_hash_128*`, `smart_back::log_stats`, `host::sends_own`, `shadow::{card_meta, has_initialized_piece, held_elsewhere}`, and `watch`'s `Port7Counts`, `port_journal_counts`, `per_frame`, `nothing_new`, `port_guard_plan`, `port_guard_line` — code that `Revert "merge: take non-RT performance and stability work from Leonida Continued"` (`732113e`) left behind. Deleting, wiring up or `cfg`-gating it is your call, not mine to guess, so issue #2 lists every item with its line. ### Tested Rust 1.98.1 (the pin in `rust-toolchain.toml`), `x86_64-pc-windows-msvc`, Windows 11 10.0.26100, MSVC 14.44.35207 — the toolchain and target of the workflow, named explicitly as `RUSTUP_TOOLCHAIN=1.98.1-x86_64-pc-windows-msvc` (a bare `1.98.1` resolves to rustup's default host here, which is the gnu one). The branch was rebased on `main` `b67c405` before these runs; the workflow run for this branch reports `action_required` (a fork PR waits for approval), so the numbers are local. ``` cargo clippy --workspace --all-targets --locked -- -D warnings -> exit 101; victory-shader compiles clean; what is left is "could not compile victory-gpu (lib test) due to 27 previous errors", all dead_code cargo clippy --workspace --all-targets --all-features --locked -- -D warnings -> exit 101; the same dead code, plus a never-constructed faultbook::Unlocked, is_multiple_of at crates/victory-gpu/src/descriptor.rs:1235, and a needless borrow at crates/victory-gpu/src/texture.rs:1825 cargo test -p victory-gpu --lib --locked -- --test-threads=1 -> 466 passed; 5 failed; 36 ignored cargo test --workspace --locked -> 26 + 2 + 16 + 48 + 3 passed in the other crates; victory-gpu 464 passed, 7 failed ``` **Those failures are not from this diff, and they decide what happens next.** The same five `gpu_owned` tests fail on unmodified `main` (`b67c405`) on this PC — `assertion failed: shadow.carded()`, "512 KiB buffer should be Card-backed in GDDR7 VRAM" — so they are a property of the machine and of that code, not of a lint. The sixth is `host::menu::tests::the_link_is_always_right_under_the_note`, which fails only where `VICTORY_STREAMLINE_DIR` is set (that is #1); the seventh, in the multi-threaded workspace run, is the flaky `watch::port7_tests::no_write_is_lost_with_port_7` of #4. What this change does is let the **Tests** step run for the first time: it will be red on that set, and #1 and #4 are the other two pieces. GPUs tested: n/a for the change — lints and unit tests; no device workload, no game files. AI-assisted: yes — DeepSeek Harness (lead agent).
`cargo clippy --workspace --all-targets --locked -- -D warnings` has never
passed here, and the two that stop it first are in `victory-shader`:

  * water_tile_slots.rs:80  `body.len() % 4 == 0`      -> `.is_multiple_of(4)`
  * emit/mod.rs:2893        `let l = ...; l`           -> return the call

With those out of the way the next 27 errors are all `dead_code` in
`victory-gpu` (the unused meta store the revert of the Leonida Continued merge
left in `turbo.rs`, the port-7 counters in `watch.rs`, two `log_stats`), and
whether that code is deleted, wired up or feature-gated is the owner's call:
issue #2 has the inventory. What is left here is mechanical and has no such
question:

  * shadow.rs:1714   `turns % 16 == 0`        -> `.is_multiple_of(16)`
  * texture.rs:1562  `is_all_zero(&read)`     -> `is_all_zero(read)`
  * watch.rs:3946    `open(&mut g, ...)`      -> `open(&g, ...)` (`open` takes
                     `&Guards`), and the `mut` on the guard it was borrowed from
                     goes with it

No behaviour change: `is_multiple_of` is `x % n == 0`, the borrow clippy points
at is the one the compiler dereferences anyway, and `open` has always taken a
shared reference.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 21:57:53 +00:00
github-bot force-pushed github-bot/gh-3 from 78558db383 to e90076c505 2026-12-02 18:40:01 +00:00 Compare
Author
Owner

@⁠erdemcisse on GitHub · 2026-12-02 18:38 UTC · original

Rebased on main b67c405; every number in the body is from that tree, not from 17303ca.

  • The three mechanical lines moved with main and now read shadow.rs:1716, texture.rs:1657, watch.rs:4026.
  • The remaining set is stated as measured here: 27 dead_code diagnostics (29 items — two name a pair of methods), with the inventory listed by file, and --all-features adds a never-constructed faultbook::Unlocked, descriptor.rs:1235 and texture.rs:1825.
  • Added what happens after this lands, because it is the point of the change: the Tests step runs for the first time and will be red on seven failures that exist on unmodified main here — five gpu_owned tests (shadow.carded(), "512 KiB buffer should be Card-backed in GDDR7 VRAM"), the menu note when VICTORY_STREAMLINE_DIR is set (#1), and the watch::port7_tests flake (#4). None of them come from this diff; the control run on b67c405 is quoted in the body.

Force-pushed: e90076c.

**@⁠erdemcisse** on GitHub · 2026-12-02 18:38 UTC · [original](https://github.com/RedLightDOWN/VIvidia/pull/3#issuecomment-7354917332) Rebased on `main` `b67c405`; every number in the body is from that tree, not from `17303ca`. - The three mechanical lines moved with main and now read `shadow.rs:1716`, `texture.rs:1657`, `watch.rs:4026`. - The remaining set is stated as measured here: 27 `dead_code` diagnostics (29 items — two name a pair of methods), with the inventory listed by file, and `--all-features` adds a never-constructed `faultbook::Unlocked`, `descriptor.rs:1235` and `texture.rs:1825`. - Added what happens *after* this lands, because it is the point of the change: the **Tests** step runs for the first time and will be red on seven failures that exist on unmodified `main` here — five `gpu_owned` tests (`shadow.carded()`, "512 KiB buffer should be Card-backed in GDDR7 VRAM"), the menu note when `VICTORY_STREAMLINE_DIR` is set (#1), and the `watch::port7_tests` flake (#4). None of them come from this diff; the control run on `b67c405` is quoted in the body. Force-pushed: `e90076c`.
github-bot closed this pull request 2026-12-03 18:14:40 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.