New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wconf flag for configurable warnings [ci: last-only #8372
Closed
Closed
Conversation
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 can be handy for retaining source compatibility. Or for when you just know better. Fixes scala/bug#8908
ContextReporter no longer extends Reporter. The ContextReporter is only used in the context, and it reports through Global.reporter. But it's never assigned to Global.reporter. So better keep the two separate. This also saves the inherited fields (ContextReporters are allocated manies, type checking every Apply uses silent). Remove most reporter mixins to get to a linear inheritance structure, no more delegating reporters. Ignore the `force` parameter of `info0`. Some quirks to remain source compatible with the sbt compiler interface. `nsc.reporters.Reporter` only exists for sbt compatibility, Global has a `FilteringReporter`. `-Xreporter` must be a FilteringReporter.
Only works for deprecations, feature, optimizer and unchecked warnings so far. Other warningse are still issued through `reporter.warning`. Need to rewire to use `reporting.issueWarning` and provide the necessary metadata (warning category, warning site). Rework summarized warnings to use these categories. The `-deprecation` / `-feature` / `-unchecked` settings now change `-Wconf` (e.g., add `cat=deprecation:w`).
argh messed up the last only again :-( |
replaced by #8373 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(This PR includes the commits of #8338, I'll rebase once that is merged).
Warnings are assigned a category.
Warnings can be filtered by category, by site where they are issued, and by source path (TODO). Deprecations can additionally be filtered by origin (deprecated definition) and
since
version (TODO).Filtered can be reported as error, warning, info, summary (like deprecations) or silent.