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

Closed
tribbedev wants to merge 12 commits from upstream-pr/4166 into main
tribbedev commented 2026-11-30 16:57:09 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tribbedev on 2026-11-30T16:57:09Z.


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.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5569812676 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4166). Originally posted by [tribbedev](https://github.com/tribbedev) on 2026-11-30T16:57:09Z. --- 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.
iBooM72 commented 2026-11-30 17:17:57 +00:00 (Migrated from github.com)

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


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).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7286044601 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4166#issuecomment-7286044601). Originally posted by [iBooM72](https://github.com/iBooM72) on 2026-11-30T17:17:57Z. --- 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).
tribbedev commented 2026-11-30 17:54:27 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tribbedev on 2026-11-30T17:54:27Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7287024985 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4166#issuecomment-7287024985). Originally posted by [tribbedev](https://github.com/tribbedev) on 2026-11-30T17:54:27Z. --- 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.
trustno1-coder commented 2026-12-01 18:46:22 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:46:22Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321514591 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4166#issuecomment-7321514591). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:46:22Z. --- 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

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!4166
No description provided.