In 2.4.0-Beta1, I noticed that multiple diagnostics reported at the same location with the same name but different messages (for example - multiple different issues) now only print the first one (though both are hit in the debugger). Is this intentional behavior and plugins should merge the messages their-side or is this a bug I should report?
d
dmitriy.novozhilov
04/02/2026, 7:06 AM
Yes, it is expected.
In 2.4.0 we started using DeduplicatingDiagnosticReporter not only for frontend, but for backends too. So two diagnostics on the same source element with the same diagnostic factory are considered duplicated everywhere.
z
Zac Sweers
04/02/2026, 5:29 PM
gotcha. Do you have thoughts on deduping by message too? Metro uses a pattern in a few places of reporting errors from anywhere and then exiting processing if any were reported during analysis
d
dmitriy.novozhilov
04/02/2026, 7:02 PM
It's not that easy. The message does not exists until it was explicitly asked to generate.
Did you consider using different diagnostic factories for different errors?
z
Zac Sweers
04/02/2026, 7:24 PM
Generally yes, but sometimes it's multiple instances of the same diagnostic but different messages. For example, multiple missing bindings from a graph where the only location we have to report is the graph itself