-
Notifications
You must be signed in to change notification settings - Fork 928
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
Fix over-compilation bug with Java 9, scala.ext.dir #3701
Conversation
Before:
After:
|
The second commit fixes this particular issue. The first would be relevant on non-OpenJDK based JVMs (prior to Java 9), but is otherwise not relevant as the SBT launcher doesn't use |
I've added an extra commit that works around a similar overcompilation bug when using the upcoming Scala 2.10.7 or 2.11.12 as the project scala version, assuming that the next version of SBT will no longer set |
Build failure seems spurious:
|
e2791f3
to
aac9747
Compare
@@ -63,7 +63,7 @@ final class Dependency(val global: CallbackGlobal) extends LocateClassFile with | |||
case Some((f, className, inOutDir)) => | |||
if (inOutDir && on.isJavaDefined) registerTopLevelSym(on) | |||
f match { | |||
case ze: ZipArchive#Entry => for (zip <- ze.underlyingSource; zipFile <- Option(zip.file)) binaryDependency(zipFile, className) | |||
case ze: ZipArchive#Entry => for (zip <- ze.underlyingSource; zipFile <- Option(zip.file).filterNot(_.isDirectory)) binaryDependency(zipFile, className) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is worth a comment in the source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like:
// This skips the Zip entry whose underlying source is a directory to make 2.10 compilation consistent with 2.12
// See https://github.com/sbt/sbt/issues/3142#issuecomment-340947086
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pushed a comment.
Forward port sbt/sbt#3701, JDK9/Scala 2.{10,11} overcompilation
Fixes #3142