Skip to content

Conversation

ChayimFriedman2
Copy link
Contributor

In my experience the processing <module> messages make it harder to search for the actual diagnostics, so remove them and instead print the filename only if there is a diagnostic.

Also allow choosing the minimum severity.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 10, 2025
@lnicola
Copy link
Member

lnicola commented Sep 11, 2025

Should we use a progress bar like in analysis-stats? The file names are useful there to track down panics.

@ChayimFriedman2
Copy link
Contributor Author

I don't think our progress bar supports multiple (that is, not overriding-the-previous-) prints, and overall I think the current situation is worse. Panic info we can get from analysis-stats, when I run diagnostics I want to get, well, diagnostics, and in my experience the current interface is pretty unusable.

@lnicola
Copy link
Member

lnicola commented Sep 14, 2025

I don't think our progress bar supports multiple (that is, not overriding-the-previous-) prints

I think we use println! for the diagnostics and the progress bar for the files. But feel free to merge, it's not too important right now.

@ChayimFriedman2
Copy link
Contributor Author

That's what I said, I think each println will override the previous one.

@lnicola
Copy link
Member

lnicola commented Sep 14, 2025

No, I think that's how we print type mismatches in analysis-stats -v.

@ChayimFriedman2
Copy link
Contributor Author

Ooh cool - I'll switch to that then.

In my experience the `processing <module>` messages make it harder to search for the actual diagnostics, so remove them and instead print the filename only if there is a diagnostic.

Also allow choosing the minimum severity.
@ChayimFriedman2
Copy link
Contributor Author

@lnicola Changed the PR do use a progress bar.

@lnicola lnicola changed the title Improve rust-analyzer diagnostics internal: Improve rust-analyzer diagnostics Sep 15, 2025
@lnicola lnicola added this pull request to the merge queue Sep 15, 2025
Merged via the queue into rust-lang:master with commit 6f9a6ba Sep 15, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 15, 2025
@ChayimFriedman2 ChayimFriedman2 deleted the cli-diags branch September 15, 2025 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants