-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix messages leaking via suspended messages
It isn't clear what StoreReporter's purpose is. Is it simply a store of all messages, or is it a store of "real" messages, i.e. messages that aren't suppressed with `@nowarn` or -Wconf (i.e. configurable warnings)? I believe StoreReporter is often used as a way to get programmatic access to the real messages. Typer, with its TyperState, uses StoreReporter as a more general buffer while making typing attempts, such as when trying to apply an implicit conversion. But with configurable warnings, we don't know if a warning is real or not until we've typed all the `@nowarn` annotation in the code, which is why we suspend the messages, on Run. So we add an override for TyperState, so that StoreReporter is used as simply a buffer. When it then unbuffers its messages in flush to the parent context's reporter, it will run through the regular "issueIfNotSuppressed" code (assuming it's not another store reporter).
- Loading branch information
Showing
5 changed files
with
46 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters