-
Notifications
You must be signed in to change notification settings - Fork 381
Try to make filenames in error messages relative to the current directory #5641
Copy link
Copy link
Closed
Description
Problem
Right now filenames in error messages are always absolute. This introduces a lot of noise in error messages.
Happy Case
It would be nice to show filenames relative to the current directory if they are relative to the current directory.
For example, this program:
fn main() {
let _ = 1 + "a";
}currently gives this error:
error: Types in a binary operation should match, but found Field and str<1>
┌─ /Users/asterite/Sandbox/noir_programs/one/src/main.nr:2:13
│
2 │ let _ = 1 + "a";
│ -------
This is when running nargo compile inside /Users/asterite/Sandbox/noir_programs/one. It would be nice if the error message were instead:
error: Types in a binary operation should match, but found Field and str<1>
┌─ src/main.nr:2:13
│
2 │ let _ = 1 + "a";
│ -------
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Would you like to submit a PR for this Issue?
Yes
Support Needs
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels