CI: cargo clippy --workspace --all-targets fails on main in victory-shader #1439
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by n-romanovich on 2026-11-27T06:40:29Z.
Summary
cargo clippy --workspace --all-targets --locked -- -D warningscurrently fails onmain(9a9091d) with 7 errors invictory-shader(lib test target), causing CI to fail on all PRs regardless of which crate they touch.Failing Lints
crates/victory-shader/src/emit/wave64_after_loop.rs:533(clippy::precedence)Clippy flags
i / 16 ^ 1as potentially ambiguous operator precedence. Parenthesizing(i / 16) ^ 1preserves the exact evaluation order (/binds tighter than^).crates/victory-shader/src/emit/valu_tests.rs:608-617(clippy::double_comparisons,clippy::neg_cmp_op_on_partial_ord)Inside
every_f32_comparison_answers_nans_as_ieee, theieeereference closure checks all 16v_cmp_<op>_f32predicates:0x5 => a < b || a > b/0xA => !(a < b || a > b)(clippy::double_comparisons)0x9 => !(a >= b),0xB => !(a > b),0xC => !(a <= b),0xE => !(a < b)(clippy::neg_cmp_op_on_partial_ord)Clippy's suggested rewrites (
a != bor flipping comparison operators) are not equivalent forf32whenaorbisNaN(e.g.a < b || a > bisfalseforNaN, whereasa != bistrue;!(a >= b)istrueforNaN, whereasa < bisfalse). Theieeeclosure needs#[allow(clippy::double_comparisons, clippy::neg_cmp_op_on_partial_ord)]rather than changing the predicates.Reproduction
Imported from fxceless/victory-fork. Originally posted by CwWwWwW on 2026-11-27T09:12:34Z.
A related second blocker in the same CI job, from an independent check of main
9a9091d:The Tests step (
cargo test --workspace --exclude victory-gpu) fails on the asset policy - xtask'srepository_passes_policy- before it ever reaches the crate tests:crates/victory-gpu/src/host.rs571758 bytescrates/victory-shader/src/emit/lower.rs527045 bytesboth over the 524288-byte limit (
cargo run -p xtask -- policy-> 2 violations;cargo test -p xtask->policy::tests::repository_passes_policyFAILED). So fixing the Clippy step alone will not make CI green: the policy also needs a fix, e.g. #1361 (2 MiB ceiling for Rust source files) or #1357 (moving the test modules out).For reference, #1322 combines the Rust-source ceiling with the host test split; a merge simulation of that branch onto
9a9091din a scratch worktree is clean, givescargo xtask policy->asset policy: 245 files ok,cargo test -p xtask6/6,cargo check --workspace --all-targetsclean,victory-gpu242 passed andvictory-shader252 passed (details: https://github.com/fxceless/victory-fork/pull/1322#issuecomment-7214357383).(Independent verification, synthetic/offline only; no game data.)
Imported from fxceless/victory-fork. Originally posted by CwWwWwW on 2026-11-27T09:19:58Z.
End-to-end verification of the complete CI path, on a scratch branch based on
9a9091d(offline; this host has only the windows-gnu toolchain, so the MSVC-only hle-probe fixture is the one thing that cannot run here - CI's windows-latest covers it):Applied to main in order: our 5 open fix commits (
ae849df,804ec39,a2020cb,f7dba22,8b9c6e6- #1444, #1445, #1446, #1447, #1448) plus #1322's policy-ceiling commit (73e19bb). They cherry-pick cleanly, no conflicts.With that branch:
cargo run -p xtask -- policy->asset policy: 235 files ok(the Tests-step policy test passes)cargo clippy --workspace --all-targets -- -D warningswith only #1440's three lint groups allowed (precedence,double_comparisons,neg_cmp_op_on_partial_ord) -> clean, i.e. #1440's fix is the remaining piececargo test --workspace --exclude victory-gpu -- --skip loads_binds_and_calls_probe-> 21/21 suites green (the skipped test is the MSVC-only hle-probe fixture; everything else, including xtask's policy test, passes)cargo test -p victory-gpu --lib -- --test-threads=1-> 243 passed, 0 failed, 7 ignoredSo #1440 + #1322 (or #1361/#1357 for the policy half) + our five PRs is a verified path to a green CI on main. No external code was used; the branch was built for verification only and is not pushed.