Skip to content

Commit c9441e5

Browse files
authored
Merge pull request #2311 from dotty-staging/fix/inc-deps
Fix incremental compilation dependency tracking
2 parents 2f85c86 + ca883f6 commit c9441e5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Names._, NameOps._, StdNames._
88

99
import scala.collection.{Set, mutable}
1010

11-
import dotty.tools.io.{AbstractFile, Path, PlainFile, ZipArchive}
11+
import dotty.tools.io.{AbstractFile, Path, ZipArchive}
1212
import java.io.File
1313

1414
import java.util.{Arrays, Comparator}
@@ -101,14 +101,15 @@ class ExtractDependencies extends Phase {
101101
val classSegments = Path(ze.path).segments
102102
binaryDependency(zipFile, className(classSegments))
103103
}
104-
case pf: PlainFile =>
104+
case pf: scala.reflect.io.PlainFile =>
105105
val packages = dep.ownersIterator
106106
.filter(x => x.is(PackageClass) && !x.isEffectiveRoot).length
107107
// We can recover the fully qualified name of a classfile from
108108
// its path
109109
val classSegments = pf.givenPath.segments.takeRight(packages + 1)
110110
binaryDependency(pf.file, className(classSegments))
111111
case _ =>
112+
ctx.warning(s"sbt-deps: Ignoring dependency $depFile of class ${depFile.getClass}")
112113
}
113114
} else if (depFile.file != currentSourceFile) {
114115
ctx.sbtCallback.sourceDependency(depFile.file, currentSourceFile, context)

0 commit comments

Comments
 (0)