Wave icon indicating copy to clipboard operation
Wave copied to clipboard

Define absolute-right and drive precedence for path_join2

Open LunaStev opened this issue 1 month ago • 0 comments

Motivation

On Linux path_join2("/left", "/right") returns /left/right. This is consistent with raw concatenation, but the API does not state whether an absolute right operand replaces the left. Windows drive-relative/root-relative and UNC inputs need the same explicit distinction.

Starting point: std/path/copy.wave:32.

Validation

Audited canonical Wave 540728c2eb6cc12f5c69c3fb3fdb96e07ba059a4 (0.0.1-alpha-dev), whose tree matches the local checkout. Validation: Executed current Linux join behavior at O0/O2 and inspected cross-target path rules. 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.

Scope

Choose concatenation-versus-resolution semantics, keeping the Unix separator defect #855 separate and preserving bounded destination handling.

Related: #855, #946. 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

  • [ ] POSIX absolute-right and Windows drive/UNC/root-relative examples have agreed outcomes.
  • [ ] Buffer-too-small failures and existing normalization guarantees remain unchanged.
  • [ ] Examples clearly distinguish joining components from resolving an absolute path.

LunaStev avatar Oct 24 '26 11:10 LunaStev