CI: main's clippy gate runs again (five findings left after 145f7722) #4166

Closed
github-bot wants to merge 12 commits from github-bot/gh-4166 into main AGit
Owner

@⁠tribbedev on GitHub · 2026-11-30 16:57 UTC · original
tribbedev:fix/card-pass-capture → main · +786 −839 · 35 files · 12 commits · closed without merging

Fixes #1267

The check job still stops in its first clippy step, so cargo test --workspace
has not run on main for a while. The card_pass argument error that stopped it
earlier was fixed upstream in 145f7722; these five are what is left.

I see the queue of gate repairs (#1566, #3530, #3560, #2048, #2792, #2682, #3385,
#1290, #2772, #2744, #3086, #2019, #3785), most of them CONFLICTING now. This is
not a fourteenth opinion on the same lint — it is what main carries today,
on top of 84bd61e2.

What it changes

  1. crates\victory-gpu\src\shadow.rs:7197: Shadow::ranged has no caller left;
    ranged_parts, which it wrapped, is what the copy code calls. Removed.
  2. crates\victory-shader\src\emit\lower.rs:114: Lowered::loop_caps is written
    by the lowering and read by nothing yet. Kept, with #[allow(dead_code)], for
    the tests that look at a lowering's loops.
  3. crates\victory-gpu\src\host.rs:5081 (CaptureRing's test): seed % 3 == 0
    as seed.is_multiple_of(3).
  4. crates\victory-gpu\src\copystat.rs:1470 (only with --all-features): mb,
    bytes as megabytes for the log lines, is unused in a diagnostics build, where
    the logging crate leaves those lines out as a whole. Kept, with the same mark.
  5. crates\victory-hle\src\modules\xmem.rs:1933 (from edb22cfd, the one CI
    reported on the previous push of this PR): the switch was read with
    match … { Some(explicit) => explicit, None => false }; bool's default is
    that false, so .unwrap_or_default(), with the comment it carried kept
    inside the closure.

Nothing runs differently: one dead wrapper gone, one spelling, two marks, one
match written as the default it is.

How it was tested

  • cargo clippy --workspace --all-targets --locked -- -D warnings: passes.
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings:
    passes.
  • cargo test --workspace (the job's third step) is not run here — reaching it is
    what this PR is for, and the CI job on this PR runs it.
  • No shader, no GPU path, no runtime switch: all five findings are compile-time.

cargo fmt --all --check is not clean on main either (apps\victory\build.rs,
crates\victory-gpu\src\host\aside.rs); the CI job does not run it, and nothing
here changes formatting.

Checked for overlap

  • Of the open gate PRs, none carries these five lines: they were opened before
    84bd61e2 (finding 3's test and finding 5's commit came with yesterday's
    capture plan and today's xmem port change), and #2019/#3785 do the loader's
    unwind_copy instead, which main no longer needs. Findings 1 to 4 are one line
    each; finding 5 is a match in one closure. This branch rebases cleanly on any
    of them.
**@⁠tribbedev** on GitHub · 2026-11-30 16:57 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4166) `tribbedev:fix/card-pass-capture` → `main` · +786 −839 · 35 files · 12 commits · closed without merging Fixes #1267 The `check` job still stops in its first clippy step, so `cargo test --workspace` has not run on `main` for a while. The `card_pass` argument error that stopped it earlier was fixed upstream in `145f7722`; these five are what is left. I see the queue of gate repairs (#1566, #3530, #3560, #2048, #2792, #2682, #3385, #1290, #2772, #2744, #3086, #2019, #3785), most of them `CONFLICTING` now. This is not a fourteenth opinion on the same lint — it is what `main` carries **today**, on top of `84bd61e2`. ## What it changes 1. `crates\victory-gpu\src\shadow.rs:7197`: `Shadow::ranged` has no caller left; `ranged_parts`, which it wrapped, is what the copy code calls. Removed. 2. `crates\victory-shader\src\emit\lower.rs:114`: `Lowered::loop_caps` is written by the lowering and read by nothing yet. Kept, with `#[allow(dead_code)]`, for the tests that look at a lowering's loops. 3. `crates\victory-gpu\src\host.rs:5081` (`CaptureRing`'s test): `seed % 3 == 0` as `seed.is_multiple_of(3)`. 4. `crates\victory-gpu\src\copystat.rs:1470` (only with `--all-features`): `mb`, bytes as megabytes for the log lines, is unused in a diagnostics build, where the logging crate leaves those lines out as a whole. Kept, with the same mark. 5. `crates\victory-hle\src\modules\xmem.rs:1933` (from `edb22cfd`, the one CI reported on the previous push of this PR): the switch was read with `match … { Some(explicit) => explicit, None => false }`; `bool`'s default is that `false`, so `.unwrap_or_default()`, with the comment it carried kept inside the closure. Nothing runs differently: one dead wrapper gone, one spelling, two marks, one `match` written as the default it is. ## How it was tested - `cargo clippy --workspace --all-targets --locked -- -D warnings`: passes. - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: passes. - `cargo test --workspace` (the job's third step) is not run here — reaching it is what this PR is for, and the CI job on this PR runs it. - No shader, no GPU path, no runtime switch: all five findings are compile-time. `cargo fmt --all --check` is not clean on `main` either (`apps\victory\build.rs`, `crates\victory-gpu\src\host\aside.rs`); the CI job does not run it, and nothing here changes formatting. ## Checked for overlap - [x] Of the open gate PRs, none carries these five lines: they were opened before `84bd61e2` (finding 3's test and finding 5's commit came with yesterday's capture plan and today's xmem port change), and #2019/#3785 do the loader's `unwind_copy` instead, which `main` no longer needs. Findings 1 to 4 are one line each; finding 5 is a `match` in one closure. This branch rebases cleanly on any of them.
`cargo clippy --workspace --all-targets --locked -- -D warnings`, the CI job's
first step, stopped on `main`, so neither clippy step nor `cargo test --workspace`
ever ran — the state #1267 describes for the last pushes:

- `crates\victory-gpu\src\host.rs:20302` and `20328`: the two `card_pass` calls
  of the compare prelude's test passed five arguments. The function takes six
  since `capture: [u32; 3]`, "zeros otherwise" — it is read with mode 4 only —
  and both calls use modes 0 and 1, so `[0; 3]`, as the production calls at
  8379 and 8627 pass.
- `host.rs:5081`: `seed % 3 == 0` written as `seed.is_multiple_of(3)`.
- `crates\victory-gpu\src\shadow.rs:7197`: `Shadow::ranged` had no caller left;
  `ranged_parts`, which it was a wrapper of, is what the copy code uses. Removed.
- `crates\victory-shader\src\emit\lower.rs:114`: `Lowered::loop_caps` is written
  by the lowering and read by nothing yet. Kept, with `#[allow(dead_code)]`, for
  the tests that look at a lowering's loops.
- `crates\victory-gpu\src\copystat.rs:1470` (only with `--all-features`): `mb`,
  bytes as megabytes for the log lines, is unused in a diagnostics build, where
  the logging crate leaves those lines out as a whole. Kept, with the same mark.

Verified: `cargo clippy --workspace --all-targets --locked -- -D warnings` and
the same with `--all-features` both pass, and `cargo check --locked -p victory-gpu
--all-targets` builds.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 16:57:59 +00:00
github-bot changed title from CI: main's clippy gate runs again (card_pass's capture argument, and four lints) to CI: main's clippy gate runs again (five findings left after 145f7722) 2026-11-30 18:11:00 +00:00
github-bot force-pushed github-bot/gh-4166 from 97a5864498 to b8ecde8209 2026-11-30 18:11:01 +00:00 Compare
Author
Owner

@⁠iBooM72 on GitHub · 2026-11-30 17:17 UTC · original

The CI run for 97a58644, merged with main at 84bd61e2, gets past the errors fixed here, then stops at one already on main, from ffe92c57:

crates/victory-hle/src/modules/xmem.rs:1933: clippy::manual_unwrap_or_default (the match in port_on)

Replacing the match with .unwrap_or_default(), as Clippy suggests, should keep the same behaviour, as unset is already false. I haven't tested that change. The comment with the fps measurements can stay above it.

I haven't run this PR locally. With #3902 (e89ce07b) merged into the same main, that line was the only Clippy error left with default features and with --all-features. Both Clippy commands passed when I ignored manual_unwrap_or_default and manual_unwrap_or, which flags the same line if only the first is ignored. I didn't run the tests. #3902 also fixes the three Clippy errors CI currently reports on main, and conflicts with this PR in copystat.rs, shadow.rs and lower.rs.

Checked with AI assistance (Claude Code).

**@⁠iBooM72** on GitHub · 2026-11-30 17:17 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4166#issuecomment-7286044601) The CI run for `97a58644`, merged with `main` at `84bd61e2`, gets past the errors fixed here, then stops at one already on `main`, from `ffe92c57`: `crates/victory-hle/src/modules/xmem.rs:1933`: `clippy::manual_unwrap_or_default` (the `match` in `port_on`) Replacing the `match` with `.unwrap_or_default()`, as Clippy suggests, should keep the same behaviour, as unset is already `false`. I haven't tested that change. The comment with the fps measurements can stay above it. I haven't run this PR locally. With #3902 (`e89ce07b`) merged into the same `main`, that line was the only Clippy error left with default features and with `--all-features`. Both Clippy commands passed when I ignored `manual_unwrap_or_default` and `manual_unwrap_or`, which flags the same line if only the first is ignored. I didn't run the tests. #3902 also fixes the three Clippy errors CI currently reports on `main`, and conflicts with this PR in `copystat.rs`, `shadow.rs` and `lower.rs`. Checked with AI assistance (Claude Code).
Author
Owner

@⁠tribbedev on GitHub · 2026-11-30 17:54 UTC · original

Second commit, from the job's third step: with the clippy gate passed, cargo test --workspace reached the tests for the first time and 1131 passed, 2 failed, both
of them completeness tests that yesterday's and today's merges left behind:

  • list::thin::tests::bindings_record_no_work — "a call is in no list", 47 of 49:
    BEGIN_QUERY and END_QUERY (query recording, which calls nothing on the card,
    as SAMPLE_MASK does not) were not in binds_only.
  • shader_cache::tests::every_switch_of_the_translator_is_in_the_key — the four
    VICTORY_ORACLE_* names of the differential fuzzer are read by nothing in the
    tree any more.

Both pass here; the job on this push runs the whole suite again.

**@⁠tribbedev** on GitHub · 2026-11-30 17:54 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4166#issuecomment-7287024985) Second commit, from the job's third step: with the clippy gate passed, `cargo test --workspace` reached the tests for the first time and 1131 passed, 2 failed, both of them completeness tests that yesterday's and today's merges left behind: - `list::thin::tests::bindings_record_no_work` — "a call is in no list", 47 of 49: `BEGIN_QUERY` and `END_QUERY` (query recording, which calls nothing on the card, as `SAMPLE_MASK` does not) were not in `binds_only`. - `shader_cache::tests::every_switch_of_the_translator_is_in_the_key` — the four `VICTORY_ORACLE_*` names of the differential fuzzer are read by nothing in the tree any more. Both pass here; the job on this push runs the whole suite again.
github-bot closed this pull request 2026-12-01 18:50:38 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:46 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:46 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4166#issuecomment-7321514591) 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!4166
No description provided.