mirror of https://github.com/sbt/sbt.git
Merge pull request #5005 from eatkins/classloader-performance-regression
Fix performance regression in test classloader
This commit is contained in:
commit
785717c18a
|
|
@ -2041,7 +2041,6 @@ object Classpaths {
|
|||
excludeFilter in unmanagedJars value
|
||||
)
|
||||
).map(exportClasspath) ++ Seq(
|
||||
sbt.nio.Keys.classpathFiles := data(fullClasspath.value).map(_.toPath),
|
||||
sbt.nio.Keys.dependencyClasspathFiles := data(dependencyClasspath.value).map(_.toPath),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,10 @@ private[sbt] object ClassLoaders {
|
|||
*/
|
||||
private[sbt] def testTask: Def.Initialize[Task[ClassLoader]] = Def.task {
|
||||
val si = scalaInstance.value
|
||||
val rawCP = modifiedTimes((outputFileStamps in classpathFiles).value)
|
||||
val cp = fullClasspath.value.map(_.data)
|
||||
val dependencyStamps = modifiedTimes((outputFileStamps in dependencyClasspathFiles).value).toMap
|
||||
def getLm(f: File): Long = dependencyStamps.getOrElse(f, IO.getModifiedTimeOrZero(f))
|
||||
val rawCP = cp.map(f => f -> getLm(f))
|
||||
val fullCP =
|
||||
if (si.isManagedVersion) rawCP
|
||||
else si.libraryJars.map(j => j -> IO.getModifiedTimeOrZero(j)).toSeq ++ rawCP
|
||||
|
|
|
|||
|
|
@ -165,8 +165,6 @@ object Keys {
|
|||
.withRank(Invisible)
|
||||
private[sbt] val dependencyClasspathFiles =
|
||||
taskKey[Seq[Path]]("The dependency classpath for a task.").withRank(Invisible)
|
||||
private[sbt] val classpathFiles =
|
||||
taskKey[Seq[Path]]("The classpath for a task.").withRank(Invisible)
|
||||
private[sbt] val compileOutputs = taskKey[Seq[Path]]("Compilation outputs").withRank(Invisible)
|
||||
private[sbt] val compileSourceFileInputs =
|
||||
taskKey[Map[String, Seq[(Path, FileStamp)]]]("Source file stamps stored by scala version")
|
||||
|
|
|
|||
Loading…
Reference in New Issue