-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed assertions in macros are reported in the comptime code, but not the annotation #6272
Comments
In #6277 it'll be like this: Does that look good? |
Certainly an improvement! However, even when running just This annotation can potentially be used in a lot of functions and the actual comptime fn is probably defined in a different place, which makes the error a lot less useful. |
@asterite I'll also note that if a user doesn't know to bring up the error list (I had to google it) then they may not know there is even more context to see to begin with. When I first tried in neovim as well I didn't see any change due to the lack of a details list. |
What do you mean? Here's the error I currently get:
The last lines show the callstack, and from it you can see where it was called from. Or do you mean something like this? #5842 |
Should each call stack frame be reported as a separate error then? |
Possibly? I'm not sure if it'd be confusing or excessive for large call stacks. |
The problem is that if you have multiple macro errors, if they are reported separately you wouldn't know how to related all of them. I think showing them as related to the main error is better. |
# Description ## Problem Errors shown in LSP didn't show the "secondaries" we capture, nor the notes. Resolves #6272 ## Summary Now secondaries and notes are shown as details to the primary error, like in Rust Analyzer: ![lsp-related-information-1](https://github.com/user-attachments/assets/bc307cb0-e314-4e40-97a2-a5a57abed717) ![lsp-related-information-2](https://github.com/user-attachments/assets/a79e379e-dc06-4f74-ab51-8c4b4f868899) ## Additional Context ## 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.
Aim
Given:
I would like a hint in the
main
function that the attribute that failed to run wasthis_has_to_run_after
Expected Behavior
LSP should show a squiggly red line on
#[this_has_to_run_after]
Bug
LSP shows the error at the failed assertion
To Reproduce
Use the example above
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
Nice-to-have
Blocker Context
No response
Nargo Version
No response
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: