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

Diagnostics are silently suppressed #13057

Open
som-snytt opened this issue Nov 7, 2024 · 2 comments
Open

Diagnostics are silently suppressed #13057

som-snytt opened this issue Nov 7, 2024 · 2 comments

Comments

@som-snytt
Copy link

Reproduction steps

Scala version: 2.13.15

If a diagnostic is suppressed for any reason, it is suppressed without notice.

There is no mechanism for auditing suppression.

There are many subtle mechanisms of suppression: -Wconf, -nowarn, @nowarn, : Unit, @unchecked.

Diagnostics may be hidden if at the same position. (-Xdev -Vdebug to make that verbose?)

The inline mechanisms are especially dangerous, since it is unthinkable to "comment them out".

It would be nice if suppressions could be summarized by a count, or verbosely listed for a detailed audit.

Problem

If an expected diagnostic doesn't show up in a build, you have to be Stefan Zeiger to figure out why.

@som-snytt
Copy link
Author

Relates to #11631

@som-snytt
Copy link
Author

example

  @nowarn("msg=shadowing a nested class of a parent is deprecated")
  @deprecated("use InternalTreePrinter instead", since = "2.13.4")
  class TreePrinter(out: PrintWriter) extends super.TreePrinter {

Why is it necessary to nowarn a deprecation in a deprecated program element?

I would like to answer that question without debugging the moving parts of reporting.

(And maybe the nowarn was for historical reasons.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants