Emit structured compiler diagnostics in JSON output#3128
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
14613e1 to
0e4ad80
Compare
428836e to
4cc3d88
Compare
| } | ||
| } | ||
|
|
||
| pub fn check(&mut self, db: &dyn Database, sink: &mut impl StructuredDiagnosticsSink) -> bool { |
There was a problem hiding this comment.
Can this be upstreamed to the compiler?
There was a problem hiding this comment.
Yes - this whole file is written in such a way to be copied-over directly without modifications once we verify we want to go forward with this approach.
There was a problem hiding this comment.
(that's why there's the StructuredDiagnosticsSink abstraction present here)
0e4ad80 to
84cad29
Compare
4cc3d88 to
cb4f82b
Compare
84cad29 to
fcffdb8
Compare
cb4f82b to
f1b1f10
Compare
fcffdb8 to
e5a6b47
Compare
f1b1f10 to
f8bceaa
Compare
e5a6b47 to
91b68f5
Compare
f8bceaa to
74f4fac
Compare
wawel37
left a comment
There was a problem hiding this comment.
Other than some nits seems fine
| fn build_structured_diagnostic_message<'db, TEntry: DiagnosticEntry<'db>>( | ||
| db: &'db dyn Database, | ||
| entry: &TEntry, | ||
| file_notes: &PluginFileDiagnosticNotes<'db>, | ||
| ) -> Option<StructuredDiagnosticMessage> { |
There was a problem hiding this comment.
Correct me if im wrong, but this function never returns None right? If so change the return type
| found |= group.check_error_free().is_err(); | ||
| } | ||
| } | ||
| found |
There was a problem hiding this comment.
Doesn't check_error_free check the whole group? If so whats the point of running it every time in loop. Once at the end is enough i think
No description provided.