You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Preserve expected and found values in constructed type-mismatch diagnostics #1024
WaveError::type_mismatch receives expected/found strings and stores them in the kind/message, but leaves the existing machine-readable expected/found fields empty. A CLI argument mismatch likewise reports types in text while JSON returns expected=[] and found=null; fixing the constructor alone must not be claimed to repair every semantic producer.
Audited canonical Wave 540728c2eb6cc12f5c69c3fb3fdb96e07ba059a4 (0.0.1-alpha-dev), whose tree matches the local checkout. Validation: Inspected constructor and executed current CLI type mismatch as a boundary example. 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
Start with the common constructor and callers that already retain these facts. Populate existing fields directly; do not parse human messages or change the JSON schema. Broader semantic fact plumbing can remain separate if needed.
Completion criteria
The common constructor serializes the supplied expected/found facts.
Covered typed producers preserve their existing messages, spans and diagnostic code.
Tests distinguish constructor coverage from still-text-only semantic paths.
This is a bounded, unassigned task with the starting point and focused checks above. Keep unrelated refactoring out of the change.
I would like to work on this issue. I will add focused regression tests for WaveError::type_mismatch structured expected/found values and existing message/location/code preservation, then update the common constructor without broad semantic-diagnostic plumbing or JSON schema changes. I'll distinguish still-text-only semantic producers in the PR and report test environment limits.
Activity
erenbati commentedon Oct 25, 2026
I would like to work on this issue. I will add focused regression tests for WaveError::type_mismatch structured expected/found values and existing message/location/code preservation, then update the common constructor without broad semantic-diagnostic plumbing or JSON schema changes. I'll distinguish still-text-only semantic producers in the PR and report test environment limits.