Chores: clippy -D warnings clean, xtask policy green, stable tests #154
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/154"
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 Belobug/VIctory-Belobug-AMD. Originally posted by dutch2005 on 2026-11-25T17:37:42Z.
Why
cargo clippy --workspace --all-targets --locked -- -D warningsfailed on ten pre-existingvictory-shadererrors and more invictory-gpu;cargo test -p xtaskfailed becauselower.rsis source, not a game asset. Two timing/global-state tests also flaked under load. This PR makes the full Windows toolchain green.What
u32::from, deadint_value).cargo clippy --fixfor machine-applicable GPU lints; documented crate-level allows for the fork's low-level unsafe/tuple-heavy code.frame::waitbinding (_waitvswait), which broke--all-features..rssource files;lower.rsremains source, as the README says.WaveSize) and #93 (xmem whole-view fix + test). Drop them once those PRs merge.Testing (RX 6700 XT, Windows 11, Rust 1.98.1)
cargo clippy --workspace --all-targets --locked -- -D warnings— passed.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings— passed.cargo test --workspace --locked -- --test-threads=1— 563 passed, 0 failed.cargo test -p xtask --locked— 4 passed, 0 failed.Notes
No game data on this machine; this is toolchain/test quality only.
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by KernelSmoker on 2026-11-25T17:52:30Z.
Additional validation on PR head
4d11f00: both Clippy commands passed in the pinned Rust 1.98.1 Fedora 45 container, cross-targetingx86_64-pc-windows-gnu:cargo clippy --workspace --all-targets --target x86_64-pc-windows-gnu --locked -- -D warningscargo clippy --workspace --all-targets --all-features --target x86_64-pc-windows-gnu --locked -- -D warningsThis confirms the lint cleanup on the Windows GNU target; it is not a native Windows/MSVC CI run.
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by adrianmjim on 2026-11-25T18:57:16Z.
Checked head
4d11f00on an RX 7900 XT (Windows 11 build 26300, Rust 1.98.1, MSVC), with separate target dirs. I did not run the game.KernelSmoker found both clippy commands passing on the GNU target. They also pass here on MSVC.
cargo test --workspace --locked -- --test-threads=1gives 563 passed, 0 failed, as in the description.Three problems:
.cargo/config.tomlloses the[alias] xtaskline. The policy check itself passes (cargo run -p xtask -- policyreports "asset policy: 184 files ok"). Butcargo xtask policyfails witherror: no such command: xtask, and the same goes for the README'scargo xtask install-hooksand for the pre-commit hook (cargo xtask policy --staged). This was found on #93 and fixed there in011020b. This branch carries #93 only up to30132fc, so that fix is missing.cargo test -p xtaskstill passes, so it does not catch the missing alias.Clippy is clean on this PR's base (
71652a2) but not after merging current main. I merged it locally onto main000ffdd; there were no conflicts:cargo clippy --workspace --all-targets --locked -- -D warningsfails withfunction layout is never usedatcrates/victory-gpu/src/watch.rs:297.--all-featuresrun fails with twocasting to the same type is unnecessary (usize -> usize)atcrates/victory-gpu/src/copystat.rs:145.Both come from main's
0434b3a. Clippy stops atvictory-gpu, so the crates after it were not linted in the merged tree.The crate-level
#![allow(clippy::undocumented_unsafe_blocks)]invictory-gpuandvictory-hledisables a lint the workspace turns on deliberately ([workspace.lints.clippy] undocumented_unsafe_blocks = "warn"). These are the two crates with most of the unsafe code.too_many_argumentsandtype_complexityare also disabled for the whole ofvictory-gpu. #52 makesvictory-gpuclippy-clean with per-item allows and SAFETY comments instead.Overlap with other open PRs:
victory-shaderchanges address the same ten lints as #3..rsfiles from the size limit is an alternative to splittinglower.rs(#84, #72). That choice is the maintainer's.Pull request closed