Repository navigation
Conversation
|
Independent clean-target Clippy and GPU comparison check at AI-assisted with OpenAI Codex (GPT-6). |
KelboLive
left a comment
There was a problem hiding this comment.
Checked the clippy claims by running both configurations rather than reading the body:
| tree | --workspace |
--workspace --all-targets |
|---|---|---|
PR base 21e6bbf4b |
4 | 10 |
PR head 118118191 |
0 | 0 |
origin/main 3e7b34a52 |
5 | 11 |
| PR merged into today's main (clean merge) | 1 | 1 |
So the four targeted warnings are genuinely gone, and the behaviour hunks are safe: Stages keeps the amplify, ms, ps evaluation order and regroups only Copy fields, let _ = places.insert(..) is the same no-op on a Copy Option, while let keeps one fetch_add per iteration, and (0.0..1e9).contains(&v) is exactly the old range test with is_finite() still short-circuiting first. leonida-gpu 627/0/58 and leonida-shader 409/0/5.
Two corrections:
- The body's
--all-targetsnumber does not reproduce: at the stated base the unique total is 10 (4 lib + 6 test), not 15. The diff addresses exactly those ten. - "0" is true at the head, not on today's main:
maingained anunused_mutatcrates/leonida-gpu/src/host.rs:7435(fn send_published(&self, mut h: Handoff)) after this branch's base, so a simulated merge today still reports one warning. Rebase (or drop thatmut) or the claim is stale on landing.
The six valu_tests warnings are a legitimate false positive, and the allow is correctly scoped: #[allow(...)] sits on fn float_compares_with_nan_on_the_device (line 1034), not the module, and valu_tests is already #[cfg(all(test, windows))]. The predicates really do differ — a < b || a > b is ordered not-equal (false for NaN) while a != b is unordered (true for NaN), and !(a >= b) etc. are true when either operand is NaN. Two nits: the allow also lists nonminimal_bool, which no warning required, and the body's sentence is backwards — changing want to a != b would make the NaN rows fail, not pass while checking the wrong thing. The argument that the predicates differ is still right.
Cosmetic: the long doc comment above mesh_pipeline now documents struct Stages and leaves mesh_pipeline undocumented.
|
Follow-up on the remaining In that combination, replacing MEASURED, AI-assisted (Codex). |
VERIFY-2877 — Linux, Rust 1.98.1 (the pinned toolchain), no GPU device, no game filesVerdict: PASS, with two things to know: it conflicts with #2873, and the Head 1. What it fixesFour clippy warnings that came back after #2681 and #2682 landed, and six more in
struct Stages { amplify: Option<D3D12_SHADER_BYTECODE>, ms: D3D12_SHADER_BYTECODE, ps: D3D12_SHADER_BYTECODE }
fn mesh_pipeline(device: …, root: …, code: Stages, g: …, depth_bounds: bool, name: Option<&str>) -> …so it takes six arguments, and the body destructures it on its first line. Only the four call sites change shape.
2. The
|
|
Verified on Windows 11, Rust 1.98.1, no GPU and no game files. The claim holds on the pull request's own base. The warnings were counted from the compiler's own JSON messages (one per line), so the count is what the compiler reported and not a summary line's word for it:
The four the report names are all there on the base, and all four are gone on the head:
and the six in Two things the report should say, because both are measured and neither blocks the change. 1. The base's counts are five and sixteen, not "four and fifteen". The fifth warning on the base is 2. What happens when it lands on the current
So a merge that brings this pull request's commits onto the current One note on the Not checked: the warnings on a Linux host (clippy's lints are the same, but only Windows was run here); the crates outside the workspace. |
9f27d23 to
3d412f6
Compare
The cleanup that merged tonight (ProjectLeonida#2681, ProjectLeonida#2682) fixed 83 warnings; four came back by the time it landed, all from merges made after it: pipeline/host.rs this function has too many arguments (8/7) pipeline/known.rs drop on a value that implements Copy pipeline/known.rs this loop could be written as a `while let` loop glyphs/live.rs manual `Range::contains` implementation The first is the only one with a shape: the three shader bytecodes become a MeshShaders struct, so mesh_pipeline takes six arguments and the body destructures it on its first line, where the four call sites cannot see the difference. The other three are clippy's own wording, applied. And six in emit/valu_tests.rs are a different thing: clippy suggests `a != b` for `a < b || a > b` and equivalences for the negated compares, and in a table of RDNA2's sixteen f32 compare predicates those are not the same function: with a NaN, `a < b || a > b` is false and `a != b` is true. Allowing the two lints on that one test is the fix, and the comment above the table says why. After review (KelboLive, Neutron-0, imShangLi, merzleckeier), four things: - `send_published`'s parameter loses `mut`, which is only written under `diagnostics`; the `let mut h = h;` is behind that feature. Without it the tree produced by merging this into main carried `unused_mut` and "clippy is at zero" would not have been true of the result. - the struct is `MeshShaders`, not `Stages`: `stages` is already the name of the crate's actual stage set, and this holds shader bytecodes. - the doc that describes mesh_pipeline's stream goes back on `mesh_pipeline`; the struct gets two lines of its own. - `nonminimal_bool` leaves the allow: no warning asked for it, and with `--all-targets` the count is still zero. Measured on main dcda41f: cargo clippy --workspace 0 warnings cargo clippy --workspace --all-targets 0 warnings cargo test -p leonida-gpu --lib -- --test-threads=1 633 passed; 0 failed cargo test -p leonida-shader 414 passed; 0 failed cargo test -p leonida-hle passed Written with an AI assistant.
3d412f6 to
3e7b0c5
Compare
|
All four reviews read, and four things changed because of them. Head is now The fn send_published(&self, h: Handoff) {
// The lists and the stamp are added to `h` only with `diagnostics`.
#[cfg(feature = "diagnostics")]
let mut h = h;which is the shape merzleckeier measured.
The doc (Neutron-0): the stream-forms doc goes back on
And the sentence you caught, KelboLive: "the test would pass while checking the wrong thing" is backwards, as you say - changing On the counts (KelboLive): your 10 at I have not touched #2873, which overlaps in three files; my reading of the thread is the same as yours - the two are versions of one change, and this one's comments and allow plus that one's test is the right combination. That is a maintainer's call and I am not going to make it by rebasing over someone else's branch. Measured at Written with an AI assistant. |
cargo clippy --workspaceand--all-targetsare both at zero with this, from four and fifteen. It is the four that came back after the cleanup merged tonight, plus the six in the tests that the cleanup did not cover.#2681and#2682fixed 83 warnings between them. These four were back by the time they landed, all from merges made afterwards:Three are clippy's own wording, applied.
known.rs:246becomeslet _ = places.insert(..), which is what the function just below it (make) already does - the two had drifted into different spellings of the same thing.host.rs:1214is the only one with a shape: the three shader bytecodes become aStagesstruct, somesh_pipelinetakes six arguments:and the body destructures it on its first line, so the four call sites are the only thing that changed shape.
And the six in
emit/valu_tests.rsare a different kind, which is why they get anallowinstead of a change:That table is RDNA2's sixteen
f32compare predicates. With a NaN,a < b || a > bis false anda != bis true - so clippy's suggestion would change which predicate the test asserts, and the test would then pass while checking the wrong thing. The comment above the table already said then..forms are negations; this adds that they are not the ordered shortcuts, and allows exactly the three lints that ask for them.Measured on
main21e6bbf4b:leonida-gpuon one thread because of the concurrency flake (cargo test --workspaceon this crate fails about one run in eight; #2570 has the measurements).What this does not do: make it stay at zero. The cleanup showed that a hand sweep lasts about one day here.
#2648's job already runscargo clippy -- -D warningsas a report step; the line in that workflow's comment - "make it blocking (-D warnings) then" - is what this makes possible, and it belongs there and not here.AI-assisted: yes - DeepSeek v4.1 (flash), which measured the cleanup instead of trusting its title, and then measured this one.
Written with an AI assistant.