Skip to content
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

Deduplicate compiler warnings based on their source location #6965

Open
TomAFrench opened this issue Jan 6, 2025 · 2 comments
Open

Deduplicate compiler warnings based on their source location #6965

TomAFrench opened this issue Jan 6, 2025 · 2 comments

Comments

@TomAFrench
Copy link
Member

After #6926 we still get a number of cases where multiple instances of the same compiler warning/error is emitted pointing at the same line of source code. This tends to just make the output harder to read for very little benefit so I'm inclined to deduplicate these so that we only print them once.

@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Jan 6, 2025
@jfecher
Copy link
Contributor

jfecher commented Jan 7, 2025

What are some examples of this?

@TomAFrench
Copy link
Member Author

TomAFrench commented Jan 7, 2025

I think the case where this comes up most frequently is on comptime functions. If you run nargo check on aztec-nr then you should see it. For instance I get the below as part of the warnings emitted.

warning: index is private and not visible from the current module
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ ------- index is private
   │

warning: offset is private and not visible from the current module
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ ------- offset is private
   │

warning: length is private and not visible from the current module
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ ------- length is private
   │

warning: index is private and not visible from the current module
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ ------- index is private
   │

warning: offset is private and not visible from the current module
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ ------- offset is private
   │

warning: length is private and not visible from the current module
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ ------- length is private
   │

warning: index is private and not visible from the current module
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ ------- index is private
   │

warning: offset is private and not visible from the current module
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ ------- offset is private
   │

warning: length is private and not visible from the current module
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ ------- length is private
   │

warning: trait `traits::Empty` which provides `empty` is implemented but not in scope, please import it
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ -------
   │

warning: trait `note::note_interface::NoteInterface` which provides `get_note_type_id` is implemented but not in scope, please import it
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ -------
   │

warning: from_field_unsafe is private and not visible from the current module
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ ------- from_field_unsafe is private
   │

warning: from_field_unsafe is private and not visible from the current module
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ ------- from_field_unsafe is private
   │

warning: from_field_unsafe is private and not visible from the current module
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ ------- from_field_unsafe is private
   │

warning: from_field_unsafe is private and not visible from the current module
   ┌─ value-note/src/value_note.nr:21:1
   │
21 │ #[note]
   │ ------- from_field_unsafe is private
   │


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants