Skip to content

Disable stub warning by default.#5297

Merged
retronym merged 1 commit intoscala:2.12.xfrom
retronym:review/5268
Jul 26, 2016
Merged

Disable stub warning by default.#5297
retronym merged 1 commit intoscala:2.12.xfrom
retronym:review/5268

Conversation

@retronym
Copy link
Member

When we create a class symbols from a classpath elements, references
to other classes that are absent from the classpath are represented
as references to "stub symbols". This is not a fatal error; for instance
if these references are from the signature of a method that isn't called
from the program being compiled, we don't need to know anything about them.
A subsequent attempt to look at the type of a stub symbols will trigger a
compile error.

Currently, the creation of a stub symbol incurs a warning. This commit
removes that warning on the basis that it isn't something users need
to worry about. javac doesn't emit a comparable warning.

The warning is still issued under any of -verbose / -Xdev / -Ydebug.

Rebase of #5268, both to squash and expand the commit message, and to step away from the transient build failures that seemed to plague that PR 🙏

When we create a class symbols from a classpath elements, references
to other classes that are absent from the classpath are represented
as references to "stub symbols". This is not a fatal error; for instance
if these references are from the signature of a method that isn't called
from the program being compiled, we don't need to know anything about them.
A subsequent attempt to look at the type of a stub symbols will trigger a
compile error.

Currently, the creation of a stub symbol incurs a warning. This commit
removes that warning on the basis that it isn't something users need
to worry about. javac doesn't emit a comparable warning.

The warning is still issued under any of `-verbose` / `-Xdev` / `-Ydebug`.
@retronym
Copy link
Member Author

LGTM (echoing my review from the #5268)

@soc
Copy link
Contributor

soc commented Jul 22, 2016

Would it make sense to have a test with these options enabled to prevent the stub warnings from regressing?

@retronym
Copy link
Member Author

I see your point, but in general we don't bother with test for diagnostic output like that, and I don't think the code in question is likely to be accidentally removed.

@soc
Copy link
Contributor

soc commented Jul 22, 2016

Alright!

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.

5 participants