Skip to content

Commit 79c0db8

Browse files
committed
bugfix: Don't accept files other than .class or .jar as binary deps
Should help with scalacenter#2053 The binary is described as: ``` A binary entry represents either the jar or the concrete class file from which the Scala compiler knows that <code>onBinaryClassName</code> comes from. ```
1 parent 7e4eac6 commit 79c0db8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

backend/src/main/scala/sbt/internal/inc/bloop/internal/BloopAnalysisCallback.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,10 @@ final class BloopAnalysisCallback(
229229
externalSourceDependency(sourceClassName, targetBinaryClassName, api, context)
230230
case None =>
231231
// dependency is some other binary on the classpath
232-
externalBinaryDependency(classFile, onBinaryName, sourceFile)
232+
val name = classFile.toString()
233+
// avoid binary deps which are not one of those
234+
if (name.endsWith(".class") || name.endsWith(".jar"))
235+
externalBinaryDependency(classFile, onBinaryName, sourceFile)
233236
}
234237
}
235238

0 commit comments

Comments
 (0)