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

2.13.2 regression: enabling -Ymacro-annotations defangs -Wunused:imports #11978

Closed
SethTisue opened this issue May 6, 2020 · 2 comments · Fixed by scala/scala#8962
Closed

Comments

@SethTisue
Copy link
Member

SethTisue commented May 6, 2020

% cat S.scala                                           
import java.util.List
% scalac --scala-version 2.13.2 -Wunused:imports S.scala
S.scala:1: warning: Unused import
import java.util.List
                 ^
1 warning
% scalac --scala-version 2.13.2 -Wunused:imports -Ymacro-annotations S.scala
%

the import is unused, but adding -Ymacro-annotations prevents that from being reported

this regressed in 2.13.2; if you do the above on 2.13.1 it's fine

(reported by @Billzabob on Gitter; great catch!)

(note that --scala-version comes from scala-runners, though that's not important to the bug)

@SethTisue
Copy link
Member Author

attn @som-snytt @lrytz

@som-snytt som-snytt self-assigned this May 6, 2020
@som-snytt
Copy link

Probably because Namers must makeImportContext after scala/scala#8801

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

Successfully merging a pull request may close this issue.

2 participants