Build and test the portable crates on non-Windows hosts #2990
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2992"
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 Marvisak/VIctory. Originally posted by 0xkn0wh3r3 on 2026-11-26T02:36:47Z.
The library crates and their tests don't compile on macOS or Linux, because some Windows-only code is referenced from places that aren't behind
cfg(windows). This adds the missing gates so the portable parts of the workspace (shader translator, formats, pipeline, PE parsing, most HLE and GPU logic) can be built and tested on any host. Nothing changes on Windows.Changes
#[cfg(windows)]that every other call site has.fallback_samplersandview_formatare gated like thehostmodule they use.IDLE_MSandIDLE_FRAMESare plain constants, so their gate is removed; the eviction logic (choose) and its test then build everywhere.xmemallocator hooks ind3d12xand the Win32 text-entry dialog inxgameuiare Windows-only. Elsewhere an allocator refusal is logged as a warning and the text entry counts as cancelled.The
victoryapp is still Windows-only:translateandprebuildcall the shader cache and pipeline library directly. Gating those can be a separate change.Testing
cargo test --workspace --exclude victorypasses, with 446 passed, 0 failed, 9 ignored. Before this change,victory-gpu,victory-hleandvictory-shader's tests didn't compile.cargo check --workspace --all-targets --target x86_64-pc-windows-msvcpasses (type-check only; I haven't run the Windows tests).Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-26T02:39:05Z.
Review: COMMENTED
Verified: the gating is precise in both directions — windows-only surfaces (fallback_samplers, view_format, xmem hooks, the dialog module, own-binary PE tests, dxil-validator tests) get cfg(windows), while the platform-free IDLE_MS/IDLE_FRAMES consts are correctly un-gated. The non-Windows ask() stub returning None (cancel) is the right semantic, and audio's warn fallback preserves the diagnostic. A cancelled entry rather than a stub dialog is the honest behavior off Windows.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T03:07:58Z.
Review: CHANGES_REQUESTED
Code review on
b252135b(static source inspection):rejects_garbage_without_panickingno longer tests PE truncation off Windows (crates/victory-pe/src/image.rs:444-496):rejects_garbage_without_panickingremains un-gated and truncatesstd::env::current_exe(). On Linux/macOS that returns an ELF/Mach-O binary, soImageInfo::parseexits at the initialMZcheck and never exercises deeper PE truncation paths. Using a minimal synthetic valid PE fixture (verified to parse before truncating) keeps the test meaningful on all hosts..github/workflows/ci.yml:20,apps/victory/src/prebuild.rs:24,crates/victory-gpu/src/pipeline.rs:595):apps/victory, whoseprebuild.rsimports Windows-onlyPrebuild/use_pipeline_cache. Adding a Linux/non-Windows CI job with an explicit portable package list (-p ...) will keep portable builds from regressing.Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-26T04:12:50Z.
Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head
b252135(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 866 passed, 0 failed, 10 ignored.#[test]functions in the diff.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T05:26:46Z.
Automated triage for the maintainers.
Thanks. No new push, so the verdict stays the same: whether to support non-Windows development hosts (and add a Linux CI job) is the maintainer's decision.
CI: passing.
Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by 0xkn0wh3r3 on 2026-11-26T06:43:34Z.
Understood: supporting non-Windows development hosts is your scope call, and without a non-Windows CI job the gates would drift. If you want it, I'll add a Linux job with an explicit list of portable packages (a workflow change, so yours to approve). I'd also replace
rejects_garbage_without_panicking's use ofcurrent_exe()with a small synthetic PE, so it tests truncation on every host (fuzeofficlal's point). Thexgameui::askand allocator-refusal stubs would be marked as build-only. If you'd rather not take on another host platform, I'll close this.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.