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

Compilation should fail when @silent does not suppress anything #28

Closed
Daenyth opened this issue May 23, 2019 · 6 comments
Closed

Compilation should fail when @silent does not suppress anything #28

Daenyth opened this issue May 23, 2019 · 6 comments

Comments

@Daenyth
Copy link

Daenyth commented May 23, 2019

Currently it seems like @silent can be added anywhere, even if it's not needed. This is particularly bothersome when it's applied to classes; a code change could fix the initial warning that's being ignored, but leave @silent in place, opening up accidental regression on further code changes.

@ghik
Copy link
Owner

ghik commented May 23, 2019

That's an interesting idea. I don't think we can make what you propose the default behavior - it could break existing projects. However, we might hide it behind a flag.

@SethTisue
Copy link
Contributor

SethTisue commented May 23, 2019

fwiw, breaking existing projects seems okay to me here. the existing projects are likely to want to remove those stale annotations

@ghik
Copy link
Owner

ghik commented May 24, 2019

@SethTisue what is the last compiler phase that can emit warnings?
Checking whether @silent has actually silenced something must happen after that phase.

@SethTisue
Copy link
Contributor

even the jvm phase can emit warnings. (I don't call it the "last" phase because there's also terminal)

@ghik
Copy link
Owner

ghik commented May 28, 2019

IMO, another reason to not enable this checking by default is that it may be problematic in cross-compiled projects where e.g. Scala 2.12 emits a warning but Scala 2.11 doesn't.

@ghik
Copy link
Owner

ghik commented May 28, 2019

Fixed in 1.4.0

@ghik ghik closed this as completed May 28, 2019
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

No branches or pull requests

3 participants