- Notifications
You must be signed in to change notification settings - Fork3.1k
Unused warnings: for macros, by default, look for usages in expansion#10693
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
c2a6c08 to4a77a23Comparesom-snytt commentedFeb 18, 2024
The missing interpolator lint should be in refchecks. The new motivation is that it only warns when the literal is typechecked, not after macro expansion. Since refchecks can check the expandee, it can warn more consistently. |
4a77a23 tob638a21CompareSethTisue commentedMar 5, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@som-snytt (now that we have an approval from Lukas, let's turn to the matter of documentation) is there migration advice that could be in the PR description? as in, I am a Scala user, what do I do now? |
som-snytt commentedMar 5, 2024
That is what everyone is asking themselves. Let me know the results of the next community build. |
som-snytt commentedMay 15, 2024
I wonder if this PR ever saw that community build. I updated the description to include the "missing interpolator" lint seen by some users of assert macros. |
Uh oh!
There was an error while loading.Please reload this page.
By default,
-Wunusedcan be satisfied by a usage introduced by a macro expansion.This is the revised behavior under
-Wmacros:default. Previously, the default setting was-Wmacros:before, to lint only before any macros are expanded. The new behavior may reduce the need to suppress warnings.Previously,
-Wmacros:aftercould be used to lint only the expansion, but if the expansion introduces more unused definitions, then those will generate warnings under that mode.Note that linting the macro expansion will also warn for
-Xlint:missing-interpolator, since 2.13.14. Macros for test assertions that capture interpolations as regular string literals will warn. For example, if a macro transformsinto
Fixesscala/bug#12953