Wave icon indicating copy to clipboard operation
Wave copied to clipboard

Read wave-test metadata consistently for CR-only source lines

Open LunaStev opened this issue 3 weeks ago • 0 comments

Problem

The compiler accepts CR-only physical lines, but the tools metadata reader treats the directive plus program as a single line and rejects otherwise valid metadata.

Reproduction and evidence

Audited canonical master 69a67c6e0fb700f37ee6114f5a66d37ee13771a5 (0.0.1-alpha-dev). Matching checkout-built compiler/std were used for compiler probes on Linux amd64 with Rust 1.89.0 and LLVM 21.1.8. Artifact inspection, mocked/projection checks and foreign-target object emission are identified below and are not native execution on those operating systems.

from pathlib import Path
Path("repro.wave").write_bytes(b"// wave-test: mode=check\rfun main(){}\r")
target/debug/wavec check repro.wave
target/debug/wave-tools test --wavec target/debug/wavec --target-id linux-amd64 --source repro.wave

The compiler exits 0; the runner fails while parsing metadata (invalid mode/runner/runtime). This occurs before the separate check-mode command-vector defect.

Scope

Use the same physical-line handling for LF, CRLF and CR source directives. Do not normalize literal stdin/expected-output payload bytes globally.

Starting points: tools/src/runner.rs:83.

Completion criteria

  • [ ] Equivalent directives have equal parsed metadata under all three line endings.
  • [ ] Malformed directives retain useful source locations.
  • [ ] Compiler-accepted CR-only cases reach their intended runner mode.

This is a bounded newcomer task with the starting point and focused negative/positive checks above.

Related: #598. Related broad trackers or completed implementations are context, not claims that their entire scope is unfinished.

LunaStev avatar Nov 12 '26 12:11 LunaStev