mirror of https://github.com/sbt/sbt.git
Set withMetadataDirectory by default
This partly fixes cached resolution. Ref https://github.com/sbt/sbt/issues/3761
This commit is contained in:
parent
1f8e9c9657
commit
f70ce9bab0
|
|
@ -2239,7 +2239,10 @@ object Classpaths {
|
||||||
val is = ivySbt.value
|
val is = ivySbt.value
|
||||||
val lm = new DependencyResolution(new IvyDependencyResolution(is))
|
val lm = new DependencyResolution(new IvyDependencyResolution(is))
|
||||||
val mod = (classifiersModule in updateClassifiers).value
|
val mod = (classifiersModule in updateClassifiers).value
|
||||||
val c = updateConfiguration.value
|
val updateConfig0 = updateConfiguration.value
|
||||||
|
val updateConfig = updateConfig0
|
||||||
|
.withMetadataDirectory(dependencyCacheDirectory.value)
|
||||||
|
.withArtifactFilter(updateConfig0.artifactFilter.map(af => af.withInverted(!af.inverted)))
|
||||||
val app = appConfiguration.value
|
val app = appConfiguration.value
|
||||||
val srcTypes = sourceArtifactTypes.value
|
val srcTypes = sourceArtifactTypes.value
|
||||||
val docTypes = docArtifactTypes.value
|
val docTypes = docArtifactTypes.value
|
||||||
|
|
@ -2250,7 +2253,7 @@ object Classpaths {
|
||||||
GetClassifiersConfiguration(
|
GetClassifiersConfiguration(
|
||||||
mod,
|
mod,
|
||||||
excludes.toVector,
|
excludes.toVector,
|
||||||
c.withArtifactFilter(c.artifactFilter.map(af => af.withInverted(!af.inverted))),
|
updateConfig,
|
||||||
// scalaModule,
|
// scalaModule,
|
||||||
srcTypes.toVector,
|
srcTypes.toVector,
|
||||||
docTypes.toVector
|
docTypes.toVector
|
||||||
|
|
@ -2410,32 +2413,36 @@ object Classpaths {
|
||||||
val s = streams.value
|
val s = streams.value
|
||||||
val is = ivySbt.value
|
val is = ivySbt.value
|
||||||
val mod = classifiersModule.value
|
val mod = classifiersModule.value
|
||||||
val c = updateConfiguration.value
|
val updateConfig0 = updateConfiguration.value
|
||||||
|
val updateConfig = updateConfig0
|
||||||
|
.withMetadataDirectory(dependencyCacheDirectory.value)
|
||||||
|
.withArtifactFilter(
|
||||||
|
updateConfig0.artifactFilter.map(af => af.withInverted(!af.inverted))
|
||||||
|
)
|
||||||
val app = appConfiguration.value
|
val app = appConfiguration.value
|
||||||
val srcTypes = sourceArtifactTypes.value
|
val srcTypes = sourceArtifactTypes.value
|
||||||
val docTypes = docArtifactTypes.value
|
val docTypes = docArtifactTypes.value
|
||||||
val log = s.log
|
val log = s.log
|
||||||
val out = is.withIvy(log)(_.getSettings.getDefaultIvyUserDir)
|
val out = is.withIvy(log)(_.getSettings.getDefaultIvyUserDir)
|
||||||
val uwConfig = (unresolvedWarningConfiguration in update).value
|
val uwConfig = (unresolvedWarningConfiguration in update).value
|
||||||
withExcludes(out, mod.classifiers, lock(app)) {
|
withExcludes(out, mod.classifiers, lock(app)) { excludes =>
|
||||||
excludes =>
|
// val noExplicitCheck = ivy.map(_.withCheckExplicit(false))
|
||||||
// val noExplicitCheck = ivy.map(_.withCheckExplicit(false))
|
LibraryManagement.transitiveScratch(
|
||||||
LibraryManagement.transitiveScratch(
|
lm,
|
||||||
lm,
|
"sbt",
|
||||||
"sbt",
|
GetClassifiersConfiguration(
|
||||||
GetClassifiersConfiguration(
|
mod,
|
||||||
mod,
|
excludes.toVector,
|
||||||
excludes.toVector,
|
updateConfig,
|
||||||
c.withArtifactFilter(c.artifactFilter.map(af => af.withInverted(!af.inverted))),
|
srcTypes.toVector,
|
||||||
srcTypes.toVector,
|
docTypes.toVector
|
||||||
docTypes.toVector
|
),
|
||||||
),
|
uwConfig,
|
||||||
uwConfig,
|
log
|
||||||
log
|
) match {
|
||||||
) match {
|
case Left(_) => ???
|
||||||
case Left(_) => ???
|
case Right(ur) => ur
|
||||||
case Right(ur) => ur
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} tag (Tags.Update, Tags.Network)).value
|
} tag (Tags.Update, Tags.Network)).value
|
||||||
)
|
)
|
||||||
|
|
@ -2592,7 +2599,9 @@ object Classpaths {
|
||||||
}
|
}
|
||||||
|
|
||||||
// logical clock is folded into UpdateConfiguration
|
// logical clock is folded into UpdateConfiguration
|
||||||
conf1.withLogicalClock(LogicalClock(state0.hashCode))
|
conf1
|
||||||
|
.withLogicalClock(LogicalClock(state0.hashCode))
|
||||||
|
.withMetadataDirectory(dependencyCacheDirectory.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
val evictionOptions = Def.taskDyn {
|
val evictionOptions = Def.taskDyn {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue