Skip to content

fix: gate Unix-only test helpers on Windows - #94

Merged
ORESoftware merged 6 commits into
mainfrom
fix/windows-develop-shell-test-cfg
Aug 4, 2026
Merged

fix: gate Unix-only test helpers on Windows#94
ORESoftware merged 6 commits into
mainfrom
fix/windows-develop-shell-test-cfg

Conversation

@ORESoftware

@ORESoftwareORESoftware commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Problem

The exact Ubuntu/macOS/Windows static-mise certification found existing portability defects in test-only Unix fixtures. All 10 static environment unit tests and all 4 real mise_environment_cli tests passed on Windows, but cargo clippy --all-targets -- -D warnings then exposed:

  1. Unix-only imports/helpers in tests/develop_shell_edge_cases.rs compiled as unused/dead code on Windows.
  2. Shell-script executable fixtures in tests/e2e.rs imported Unix permission APIs or depended on /bin/sh without a target guard.

Fix

Apply matching #[cfg(unix)] boundaries only to test code that already requires Unix behavior:

  • BTreeMap, OsStr / OsString, assert_success, and stdout in develop_shell_edge_cases;
  • the executable writer, shell-script bin fixture/consumer helper, copy-mode hoisted-bin test, and install-dir shell fixture in e2e.

No production code or runtime behavior changes:

  • Unix continues compiling and running the complete shell and executable-bin matrices.
  • Windows continues compiling and running the platform-neutral parser, security, installation, and environment tests.
  • All-target Clippy no longer compiles Unix permission APIs on Windows or reports intentionally absent Unix-only helpers as dead code.

Validation completed

A native windows-2025 materialization run passed:

  • cargo fmt --all --check;
  • git diff --check;
  • cargo test --locked --test develop_shell_edge_cases;
  • cargo test --locked --test e2e --no-run; and
  • cargo clippy --locked --all-targets -- -D warnings.

The temporary materializer has been removed. The PR now contains exactly two ordinary test files with nine additive #[cfg(unix)] attributes. Normal repository CI, development-shell, OCI, policy, hardening, formal review, and polyglot workflows are rerunning on the cleaned exact head f6fa80f3866754c6a36089bb3b44d62ebee636b9.

Dependency chain

Found by: zed-pkg-test/zed-pkg-e2e#7
Static CLI candidate: #91
Linear: DEN-1439, DEN-1449

@ORESoftwareORESoftware changed the title fix: gate Unix-only develop-shell test helpers on Windowsfix: gate Unix-only test helpers on WindowsAug 4, 2026
@ORESoftware
ORESoftware marked this pull request as ready for review August 4, 2026 04:12
@ORESoftware
ORESoftware merged commit 26d7a62 into mainAug 4, 2026
24 checks passed
@linear-code

Copy link
Copy Markdown

DEN-1607

Sign up for freeto 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

@ORESoftware