-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
Diagnostic deduplication breaks with incr comp #162901
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-incr-compArea: Incremental compilationArea: Incremental compilationC-bugCategory: This is a bug.Category: This is a bug.D-diagnostic-infraDiagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-incr-compArea: Incremental compilationArea: Incremental compilationC-bugCategory: This is a bug.Category: This is a bug.D-diagnostic-infraDiagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
tests/ui/allocator/not-an-allocator.rsI expected to see this happen: Both without and with incr comp a single diagnostic.
Instead, this happened: Without incr comp a single diagnostic. With incr comp 4 duplicated diagnostics. With
-Zdeduplicate-diagnostics=noin both cases 4 diagnostics are shown, but with incr comp it misses the message that the diagnostics were deduplicated.Adding some debug prints shows that each diagnostic hashes to a different value with incr comp enabled, yet the debug print of the diagnostics are identical as is the
DiagInner::keys()debug print.Meta
rustc --version --verbose:c999cef