Remove eager warning when unneeded transitive dependencies are absent from the classpath#5268
Remove eager warning when unneeded transitive dependencies are absent from the classpath#5268johnynek wants to merge 2 commits intoscala:2.12.xfrom
Conversation
|
Note, huge props to @non who paired with me on this! |
|
I signed the CLA, but somehow it is not showing. Any way to refresh? |
|
actually, I'm not sure why we would ever want this warning. It seems like we should either error if we need the class or stay quiet. Is there a reason we shouldn't just remove the warning branch here? |
|
What does javac do in the same situation? |
|
@retronym javac is silent: now run: #!/bin/sh
javac A.java
javac -cp . B.java
rm A.class
javac -cp . C.java
rm C.class
scalac -cp . C.scalaand note the only output is from the last command: |
|
Other options to consider are to emit under |
|
I think I'm convinced. Let's disable this by warning, but enable it under any of ( |
|
@retronym here is your suggestion. Did I get it right? Seems to compile for me. |
|
Could you leave |
|
@johnynek Assuming the last commit addresses the test failures (if not, |
This is following @retronym 's suggestion
e9d91af to
9d14899
Compare
|
Not really sure what failed here. Looks like some build related issues. |
|
@retronym what does the combined failure mean? Is this ready? |
|
We require all commits in the pull request to pass CI, not just the last. GitHub doesn't directly support this so we add an extra status to the last commit to track whether or not all previous commits have green ticks. The combined error points to the fact that 9d1489 did not pass validation. The failure there looks like a build infrastructure problem: I've seen that before but can't put my finger on the root cause. It's something like we've got the version of the SBT launcher script. I'll investigate, apologies for the friction. |
|
/rebuild |
|
Trying again in #5297 |
This addresses: https://issues.scala-lang.org/browse/SI-9673
This issue becomes acute for people using https://github.com/bazelbuild/bazel and warnings as errors. In bazel, the compile and runtime classpaths are distinct, and a goal is to minimize the compile classpath to the absolute minimum that is needed to compile the target.
According to @retronym (I seem to recall some chat/message I can't find now) this warning is safe to ignore and if it becomes a real issue, there will be an error (which I have also seen in cases where the class is actually required).