Repository navigation
chore(shader): move lower.rs unit tests into emit/lower_tests.rs to satisfy asset policy - #27
Merged
Conversation
…atisfy asset policy
6 of 7 tasks
This was referenced Nov 25, 2026
This was referenced Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Moves the inline
#[cfg(test)] mod testsblock (lines 11564–12747, ~46 KiB) out ofcrates/viport-shader/src/emit/lower.rsintocrates/viport-shader/src/emit/lower_tests.rs, wired fromlower.rsvia:Why
Commit
76e5e50grewcrates/viport-shader/src/emit/lower.rsto 534,435 bytes, exceeding the 524,288-byte (512 KiB) file-size limit enforced bycargo xtask policy:Moving the inline test module to
emit/lower_tests.rsbringslower.rsdown to ~488 KiB (~36 KiB of headroom below the limit) with zero behavioural changes, identical module paths (emit::lower::tests::*), and minimal diff at the bottom oflower.rsso open PRs editing lowering code do not conflict.Checked
docs/asset-policy.mdbuild.rs, git hook,.cargoconfig, CI change or script (or an issue explains why)cargo test --workspacepasses (see below;viport-shaderfull lib test suite ran and passed)cargo clippy --workspace --all-targets --locked -- -D warningspasses (see below;viport-shaderclippy passed with pre-existing untouched lints allowed on Rust 1.100 GNU)rustfmt; I did not reformat lines I did not changeWhat I ran
Windows 11 Pro build 26300.10075,
rustup run stable-x86_64-pc-windows-gnu(rustc 1.100.0, no game data), onmaine566768:cargo xtask policyfailed withPOLICY: crates/viport-shader/src/emit/lower.rs: 534435 bytes exceeds the 524288-byte limit.cargo xtask policy:asset policy: 218 files ok(lower.rsis 489,504 bytes,lower_tests.rsis 40,463 bytes).VIPORT_WARP=1cargo test -p viport-shader --lib --locked: 342 passed, 0 failed, 4 ignored (allemit::lower::tests::*tests run and pass unchanged).cargo clippy -p viport-shader --no-deps --lib --tests --locked: zero warnings inlower_tests.rs(pre-existing untouched lints inlower.rsare tracked separately in CI: clear the clippy errors that keep main red since a3e7f17 #21).--workspacetest/clippy suite (MSVClink.exenot installed locally; onlyviport-shadertest module layout changed).Overlaps
Checked open PRs (#14, #21, #22, #23, #24):
crates/viport-shader/src/emit/lower.rs; this PR only replaces the trailing#[cfg(test)] mod tests { ... }block at line 11564, so it should merge cleanly with CI: clear the clippy errors that keep main red since a3e7f17 #21 and Shaders: decode and lower v_dot8_i32_i4 #22 without conflicts.emit/lower.rs.AI assistance: Antigravity assisted with extracting the test module, running
xtask policyand theviport-shadersuite, and preparing this PR.