Skip to content

Commit

Permalink
Fix binary dependency from tasty
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Jun 5, 2023
1 parent ac4d40e commit e545d54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,12 @@ class ExtractDependencies extends Phase {
if (depFile != null) {
// Cannot ignore inheritance relationship coming from the same source (see sbt/zinc#417)
def allowLocal = dep.context == DependencyByInheritance || dep.context == LocalDependencyByInheritance
if (depFile.isClass) {
val depClassFile =
if depFile.isClass then depFile
else depFile.resolveSibling(dep.to.binaryClassName + ".class")
if (depClassFile != null) {
// Dependency is external -- source is undefined
processExternalDependency(depFile, dep.to.binaryClassName)
// } else if (depFile.isTasty) {
// val depClassFile = depFile.resolveSibling(dep.to.binaryClassName + ".class")
// if depClassFile != null then
// processExternalDependency(depClassFile, dep.to.binaryClassName)
processExternalDependency(depClassFile, dep.to.binaryClassName)
} else if (allowLocal || depFile.file != sourceFile) {
// We cannot ignore dependencies coming from the same source file because
// the dependency info needs to propagate. See source-dependencies/trait-trait-211.
Expand Down
2 changes: 1 addition & 1 deletion sbt-test/source-dependencies/binary/test
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
$ sleep 2000

$ copy-file changes/Break.scala dep/A.scala
# FIXME -> use/compile
-> use/compile

0 comments on commit e545d54

Please sign in to comment.