mirror of https://github.com/sbt/sbt.git
Do not add source dependencies on itself.
Adding source dependency on itself doesn't really bring any value so there's no reason to do it. We avoided recording that kind of dependencies by performing a check in `AnalysisCallback` implementation. However, if we have another implementation like `TestCallback` used for testing we do not benefit from that check. Therefore, the check has been moved to dependency phase were dependencies are collected.
This commit is contained in:
parent
de1c5a4aed
commit
2551eb2a63
|
|
@ -97,7 +97,7 @@ private final class AnalysisCallback(internalMap: File => Option[File], external
|
|||
}
|
||||
|
||||
def sourceDependency(dependsOn: File, source: File, inherited: Boolean) =
|
||||
if(source != dependsOn) {
|
||||
{
|
||||
add(sourceDeps, source, dependsOn)
|
||||
if(inherited) add(inheritedSourceDeps, source, dependsOn)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ final class Dependency(val global: CallbackGlobal) extends LocateClassFile
|
|||
case None => ()
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (onSource.file != sourceFile)
|
||||
callback.sourceDependency(onSource.file, sourceFile, inherited)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue