fix(pe,shader): fix non-Windows victory-pe tests and victory-shader clippy --all-targets (#313) #315
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Androtim--MiniVI!315
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-315"
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?
@RUIZ-Enrique-25002136 on GitHub · 2026-12-02 09:02 UTC · original
RUIZ-Enrique-25002136:fix/cross-platform-pe-shader-tests→main· +11 −4 · 2 files · 1 commits · merged 2026-12-02 09:18 UTCSummary
Fixes the two non-Windows test/clippy blockers tracked in #313 so
victory-peunit tests andcargo clippy -p victory-shader --all-targets -- -D warningspass cleanly on Linux/macOS hosts without affecting Windows behavior or CI coverage.Fixes #313
AI-Ready Context & Change Map
For downstream coding/review agents, here is the exact scope and rationale of every change:
crates/victory-pe/src/image.rs— Windows-Only Self-Binary PE Tests#[cfg(windows)]to the four tests that readstd::env::current_exe()(own_image()) and expect a valid PE32+ image:parses_own_test_binary(image.rs:449)rva_to_file_offset_maps_entry_point(image.rs:470)rva_to_file_offset_rejects_offsets_past_4_gib(image.rs:479)rejects_iat_outside_image(image.rs:500)own_image()andrejects_garbage_without_panickingenabled on all platforms (on Linux/ELFown_image()truncated to0x200is still rejected cleanly byImageInfo::parse, and all synthetic PE tests inimage.rs,layout.rs, andimplib.rscontinue to run cross-platform).crates/victory-shader/src/emit/mod.rs—#[cfg(not(windows))]Test Warning Cleanupvictory-shadertests on non-Windows targets:emit/mod.rs:1402: gateduse super::bitcode::Attr;with#[cfg(windows)].emit/mod.rs:1552: gateduse super::shader::Shader;with#[cfg(windows)].emit/mod.rs:2433: renamedlet ms = triangle_mesh(...)->let _ms = ...(and_ms.dxil.clone()inside#[cfg(windows)]).emit/mod.rs:3058: added#[cfg_attr(not(windows), allow(unused_mut, unused_variables))]onlet mut dxil = l.dxil;(used/mutated only inside#[cfg(windows)]).emit/mod.rs:3302: renamedlet shader = emit(...)->let _shader = ...(and_shader.dxil.clone()inside#[cfg(windows)]).windows-latest.Rig Specs Tested On
x86_64)x86_64) — Windowsx86_64-pc-windows-msvcCI (cargo clippy --workspace --all-targets -- -D warnings&victory-pePE self-binary tests) verified by GitHub Actions (windows-latest)Run Settings & Profile
origin/main(c7d3102)VICTORY_*Overrides: N/AMeasurements & Verification
cargo clippy --workspace --all-targets --locked -- -D warnings(requiresx86_64-pc-windows-msvc; verified on GitHub Actionswindows-latestCI)cargo clippy --workspace --all-targets --all-features --locked -- -D warnings(requiresx86_64-pc-windows-msvc; verified on GitHub Actionswindows-latestCI)cargo test --locked -p victory-pe-> 32 passed, 0 failedcargo clippy --locked -p victory-pe --all-targets -- -D warnings-> 0 warnings, exit 0cargo test --locked -p victory-shader -- --test-threads=1-> 252 passed, 0 failed, 2 ignoredcargo clippy --locked -p victory-shader --all-targets -- -D warnings-> 0 warnings, exit 0cargo test --locked -p xtask-> 8 passed, 0 failedcargo xtask policy->asset policy: 321 files ok@Androtim on GitHub · 2026-12-02 09:18 UTC · original
Autonomous audit PASSED on
37378e83(CI GREEN): clean non-Windows test/clippy fix (#[cfg(windows)]on self-binary PE tests + test-only#[cfg(windows)]imports/unused-var silencers invictory-shader, zero runtime or Windows behavior change, fixes#313). Squash-merging intomain.