Skip to content

Linux: finish the non-Windows build and tests - #449

Open
iloveslopware wants to merge 2 commits into
fxceless:mainfrom
iloveslopware:non-windows-build
Open

iloveslopware wants to merge 2 commits into
fxceless:mainfrom
iloveslopware:non-windows-build

Conversation

@iloveslopware

Copy link
Copy Markdown

What this does

Completes the Windows gating the tree already started at module level, so the whole workspace builds, lints and tests on a Linux host with zero warnings — while staying identical on Windows: every edit adds cfg or moves code verbatim under one.

  • Items only the Windows host asks for are gated — hard where nothing else uses them, allow(dead_code) where the unit tests still do.
  • Test modules that need a Windows host are gated as a whole (root-signature blobs, PE round-trips of the test binary itself — an ELF off Windows — and Windows path semantics); their #[test] attributes stay for the Windows run.
  • victory translate refuses --validate and --pipelines off Windows with a message naming what each needs (dxil.dll; a D3D12 host), instead of not building there. A memory-value wait counts as met off Windows, as an unmapped one already does.

Verification

  • Linux: cargo clippy --workspace --all-targets --locked -- -D warnings passes on default features and on --all-features; cargo test --workspace --locked runs 294 tests, 0 failures (rebased on current main, a803c87).
  • Windows: cargo check --target x86_64-pc-windows-msvc --workspace --all-targets (clang-cl 23.1.5) is warning-free, so the CI gates' axis is unchanged.

No formatting changes: the tree is not rustfmt-clean, so the diff stays reviewable (21 files, +168/−63).

Related: #128 (same goal — this is the minimal, no-churn variant), #192 (test-warning subset), #37.

This PR was AI assisted (GLM via OpenCode), directed and verified by the account owner.

@iloveslopware

Copy link
Copy Markdown
Author

Rebased onto current main (c96b4f2), carrying #491's one-commit clippy fix (d28e0dd) underneath so the branch is clippy-clean on the default feature set for x86_64-pc-windows-msvc as well — that dead-code red is main's, not this change's (see #491). Verified on the restack: Linux workspace clippy and tests, and cross-target Windows clippy with default features and --all-features, all green. The commit itself is unchanged. AI-assisted (GLM via OpenCode).

c96b4f2 added placed_filler_twins for the memory line in copystat,
which compiles only on Windows with diagnostics on, so the default-
features clippy lane (the CI gate on main) sees no caller and fails
with -D dead_code. Mark it allowed-dead without the feature, the same
attribute shadow.rs, pipeline.rs and pipeline/host.rs already use for
diagnostics-only items.
The module-level Windows gating in the tree covers most of the workspace;
this closes the rest, so it builds, lints and tests on a Linux host with
zero warnings:

- Items only the Windows host asks for are gated: hard where nothing
  else uses them, `allow(dead_code)` where the tests still do.
- Test modules that need a Windows host (host-serialized root signature
  blobs, PE round-trips of our own test binary — an ELF off Windows —
  and Windows path semantics) are gated as a whole, keeping their
  `#[test]` attributes for the Windows run.
- `victory translate` refuses `--validate` and `--pipelines` off Windows
  with a message naming what each needs (dxil.dll; a D3D12 host) rather
  than failing to build there.
- A memory-value wait counts as met off Windows, as an unmapped one
  already does.

Windows is unchanged: every edit adds cfg or moves code verbatim under
one, and `cargo check --target x86_64-pc-windows-msvc --workspace
--all-targets` stays warning-free. On Linux, both `cargo clippy
--workspace --all-targets --locked -- -D warnings` gates (default and
--all-features) pass and all 292 tests run.
@iloveslopware

Copy link
Copy Markdown
Author

Rebased onto current main (d510ee4) as 01ce676, still carrying #491's one-commit clippy fix underneath so the default-features lane stays consistent.

Verified on the restack (Linux host, cross-target for the Windows lanes):

With this branch the workspace builds, lints, and tests clean off Windows on current main; the remaining win-side clippy reds at this commit belong to main itself.

AI-assisted: the rebase and verification runs were machine-assisted; the diff and its rationale are as described.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant