GPU: keep clippy green without the diagnostics feature #491
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/491"
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 iloveslopware on 2026-11-25T01:30:27Z.
main's CI has been red sincec96b4f2(run 45525228245): the default-features clippy lane fails withThe getter's only caller is the memory line in
copystat, and that module compiles only underall(windows, feature = "diagnostics")— with default features there is no caller, and-D dead_codefails the build. The--all-featureslane stays green, which is why only one lane went red.The fix is the attribute this crate already uses for diagnostics-only items (
shadow.rs:2962,pipeline.rs:86,pipeline/host.rs:323):Nothing else changes:
--all-featuresbehavior is identical, and the getter is still there for the diagnostics line.Verification (cross-checked from Linux with clang-cl 23.1.5, the same command CI runs):
cargo clippy --target x86_64-pc-windows-msvc --workspace --all-targets --locked -- -D warnings— failed before with the error above, clean after;--all-features— clean before and after;victory-gpudoes not compile on non-Windows targets — pre-existing sincec96b4f2, unrelated to this attribute, and the subject of #449.Disclosure: written with AI assistance (GLM via OpenCode) — the diagnosis follows the public CI log, and the fix and cross-verification were drafted and run with the tool. Reviewed and understood by the human submitting it.
Imported from fxceless/victory-fork. Originally posted by avt0m4t48 on 2026-11-25T01:51:07Z.
I independently checked this with the pinned Rust 1.98.1 toolchain, cross-targeting
x86_64-pc-windows-msvcfrom Linux. The basec96b4f2b8365bf43d54ab074940923ef8267f4c6failed onplaced_filler_twinswith-D dead-code. The PR headd28e0ddd1e142263b971a39323164ade3615303dpassed workspace Clippy for all targets with warnings denied, both with the project's default features and with--all-features.I used
--features blake3/purein both revisions to run the cross-check without Microsoft'sml64.exe. The source trees were unmodified. This covers the Windows-target lint regression. Native Windows CI and runtime tests were outside this check.Imported from fxceless/victory-fork. Originally posted by iloveslopware on 2026-11-25T02:31:04Z.
Thanks for the independent check — and for writing down the
blake3/pureroute to a cross-target lint run withoutml64.exe; that's a tidier recipe than theCC/ARclang-cl/llvm-ar overrides I used, for anyone without LLVM onPATH.Scope note for the record: the PR is gating-only —
#[cfg_attr(not(feature = "diagnostics"), allow(dead_code))]onplaced_filler_twins, the same patterncopystatalready uses; no behavior change on any target or feature set. Native CI still needs maintainer approval to run, as you say.AI-assisted (GLM via OpenCode).
Imported from fxceless/victory-fork. Originally posted by JRamos1993 on 2026-11-25T12:43:17Z.
On current
main(9376fd6) this patch still merges and fixesplaced_filler_twins, but CI's clippy now fails on two newer lints as well (sort_unstable_by_keyin draw.rs,depth_writtennever read in indirect.rs), with and without--all-features. #642, #755 and #841 fix all three. Comparison: https://github.com/fxceless/victory-fork/pull/642#issuecomment-7162762368Imported from fxceless/victory-fork. Originally posted by iloveslopware on 2026-11-25T19:22:14Z.
Rebased onto current
main(d510ee4) — thanks @JRamos1993 for the check. Re-verified against the new base:d510ee4still fails withplaced_filler_twinsnever-used (2 hits — thecopystatcaller stays Windows+diagnostics-gated, so that lane sees no caller); on this branch it's 2 -> 0.is_multiple_of,contains_key+insert,depth_written,sort_unstable_by_key) are pre-existing onmain— the inventory is identical without this patch — and are covered by #642/#755/#841, so this diff deliberately leaves them alone.AI-assisted: the verification runs and this analysis were machine-assisted; the change and its rationale are as described.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.