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
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:
fnmain(){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
The text was updated successfully, but these errors were encountered:
…ble (#5642)
# Description
## Problem
Resolves#5641
## Summary
It seems `FileMap`'s `name` function was the one that needed that
change.
To avoid doing a syscall to get the current directory every time a name
is needed, `FileMap` gets it at the beginning of the program. I think
this is fine as the current directory can't change while the compilation
is happening.
## Additional Context
None.
## Documentation
Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.
# PR Checklist\*
- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
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:
currently gives this error:
This is when running
nargo compile
inside/Users/asterite/Sandbox/noir_programs/one
. It would be nice if the error message were instead: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
The text was updated successfully, but these errors were encountered: