Skip to content
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

Fix #14576: Ensure unreported warning summaries are also emitted via sbt-bridge #14602

Merged
merged 1 commit into from Mar 3, 2022

Conversation

griggt
Copy link
Collaborator

@griggt griggt commented Mar 2, 2022

The sbt-bridge uses a delegating reporter that overrides the base implementation of printSummary and delegates to the sbt implementation.

However that implementation only provides summary reporting of warning and error counts, and the compiler is responsible for emitting any summary diagnostics regarding unreported warnings.

This commit separates emitting those unreported warning summaries from the base implementation of Reporter#printSummary so as not to be overriden by the DelegatingReporter in sbt-bridge.

Fixes #14576

@griggt griggt requested a review from adpi2 March 2, 2022 07:25
@dwijnand
Copy link
Member

dwijnand commented Mar 2, 2022

Very nice PR!

@som-snytt
Copy link
Contributor

Thanks, I understand why people are grateful when they open a ticket and someone fixes it.

I will make time to study this PR, or I'll wait for the Coursera on "How do I even test this?"

Copy link
Member

@adpi2 adpi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR! I left a small suggestion but otherwise it looks good.

compiler/src/dotty/tools/dotc/reporting/Reporter.scala Outdated Show resolved Hide resolved
The sbt-bridge uses a delegating reporter that overrides the base
implementation of `printSummary` and delegates to the sbt implementation.

However that implementation only provides summary reporting of warning
and error counts, and the _compiler_ is responsible for emitting any
summary diagnostics regarding unreported warnings.

This commit separates emitting those unreported warning summaries from
the base implementation of Reporter#printSummary so as not to be
overriden by the DelegatingReporter in sbt-bridge.
@griggt griggt merged commit 727395c into scala:main Mar 3, 2022
@griggt griggt deleted the fix-14576 branch March 3, 2022 22:34
@Kordyjan Kordyjan added this to the 3.1.3 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No summary feature warning under sbt
5 participants