Wave icon indicating copy to clipboard operation
Wave copied to clipboard

Define Windows environment key matching independently from POSIX byte matching

Open LunaStev opened this issue 1 month ago • 0 comments

Motivation

The shared _env_match_key helper matches Path and rejects PATH against a Path=value block. The Windows provider preserves key spelling in the UTF-8 block, while Windows environment lookup is case-insensitive. Wave currently uses the shared byte-exact path.

Starting point: std/env/parse.wave:34.

Validation

Audited canonical Wave 540728c2eb6cc12f5c69c3fb3fdb96e07ba059a4 (0.0.1-alpha-dev), whose tree matches the local checkout. Validation: Executed shared key matcher at O0/O2 and inspected Windows provider; no native Windows run. Executed compiler probes use the matching checkout-built compiler and std on Linux amd64 (Rust 1.89.0 / LLVM 21.1.8). Source/header or mocked checks are not native execution on another OS.

Microsoft environment-variable guidance distinguishes Windows from case-sensitive Linux/macOS variable names.

Scope

Decide the Windows key-comparison/Unicode contract while preserving POSIX case sensitivity. This concerns lookup after environment conversion, not the completed UTF-16 conversion work.

Related: #526. These links do not claim those broader or completed scopes are unfinished.

Design discussion required

This issue records a proposal or an unresolved contract; it is not approval to choose new semantics. Please mention @LunaStev to discuss the design before starting implementation.

Completion criteria

  • [ ] Path/PATH and mixed-case queries follow the approved Windows contract.
  • [ ] Unicode and hidden drive entries have explicit behavior.
  • [ ] POSIX matching remains case-sensitive and native Windows amd64/arm64 tests cover the facade.

LunaStev avatar Oct 24 '26 11:10 LunaStev