fix(pe,shader): allow victory-pe tests and victory-shader clippy --all-targets to pass on non-Windows hosts #313
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#313
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?
@RUIZ-Enrique-25002136 on GitHub · 2026-12-02 08:59 UTC · original
Summary
Running the cross-platform Rust crates (
victory-pe,victory-shader) on non-Windows hosts (e.g., Linuxx86_64) currently fails tests and--all-targetsclippy due to two small Windows-specific assumptions in test code:crates/victory-pe/src/image.rs:449-511(victory-peunit tests):parses_own_test_binary,rva_to_file_offset_maps_entry_point,rva_to_file_offset_rejects_offsets_past_4_gib, andrejects_iat_outside_imagecallown_image()(std::fs::read(std::env::current_exe().unwrap())) and unwrapImageInfo::parse(...).current_exe()is an ELF or Mach-O binary rather than a PE32+ image, causing all 4 tests to fail withMalformed("Unknown file magic").#[cfg(windows)]to those 4 self-image tests keepsrejects_garbage_without_panickingand all synthetic PE tests active cross-platform while allowingcargo test -p victory-peto pass on Linux/macOS.crates/victory-shader/src/emit/mod.rs:1402, 1551, 2431, 3055, 3298(victory-shadertest warnings):emit::mod::testsgatevalidator::Validatorandhost::Hostassertions behind#[cfg(windows)], leaving 6 unused-import / unused-variable / unused-mut warnings under#[cfg(not(windows))]:emit/mod.rs:1402:use super::bitcode::Attr;emit/mod.rs:1551:use super::shader::Shader;emit/mod.rs:2431:let ms = triangle_mesh(...)(only read inside#[cfg(windows)])emit/mod.rs:3055:let mut dxil = l.dxil;(only read/mutated inside#[cfg(windows)])emit/mod.rs:3298:let shader = emit(...)(only read inside#[cfg(windows)])cargo clippy -p victory-shader --all-targets -- -D warningsfails on non-Windows hosts even thoughvictory-shaderitself is pure platform-independent Rust.github-bot referenced this issue2026-12-02 09:05:16 +00:00