Merge pull request #4425 from eed3si9n/wip/bump

[1.2.x] Fixes cached resolution, and upgrades modules
This commit is contained in:
eugene yokota 2018-10-15 16:34:22 -04:00 committed by GitHub
commit 015d85836b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 32 deletions

View File

@ -2168,7 +2168,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
@ -2179,7 +2182,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
@ -2333,35 +2336,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
val depDir = dependencyCacheDirectory.value withExcludes(out, mod.classifiers, lock(app)) { excludes =>
val ivy = scalaModuleInfo.value // val noExplicitCheck = ivy.map(_.withCheckExplicit(false))
val st = state.value LibraryManagement.transitiveScratch(
withExcludes(out, mod.classifiers, lock(app)) { lm,
excludes => "sbt",
// val noExplicitCheck = ivy.map(_.withCheckExplicit(false)) GetClassifiersConfiguration(
LibraryManagement.transitiveScratch( mod,
lm, excludes.toVector,
"sbt", updateConfig,
GetClassifiersConfiguration( srcTypes.toVector,
mod, docTypes.toVector
excludes.toVector, ),
c.withArtifactFilter(c.artifactFilter.map(af => af.withInverted(!af.inverted))), uwConfig,
srcTypes.toVector, log
docTypes.toVector ) match {
), case Left(_) => ???
uwConfig, case Right(ur) => ur
log }
) match {
case Left(_) => ???
case Right(ur) => ur
}
} }
} tag (Tags.Update, Tags.Network)).value } tag (Tags.Update, Tags.Network)).value
) )
@ -2515,7 +2519,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 {

View File

@ -10,9 +10,9 @@ object Dependencies {
// sbt modules // sbt modules
private val ioVersion = "1.2.2" private val ioVersion = "1.2.2"
private val utilVersion = "1.2.2" private val utilVersion = "1.2.3"
private val lmVersion = "1.2.1" private val lmVersion = "1.2.2"
private val zincVersion = "1.2.3" private val zincVersion = "1.2.4"
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion private val sbtIO = "org.scala-sbt" %% "io" % ioVersion

View File

@ -38,7 +38,9 @@ lazy val root = (project in file("."))
val moduleSettings0 = module.moduleSettings val moduleSettings0 = module.moduleSettings
val inline0 = moduleSettings0 match { case x: InlineConfiguration => x } val inline0 = moduleSettings0 match { case x: InlineConfiguration => x }
// Remove clock for caching purpose // Remove clock for caching purpose
val updateConfig0 = updateConfig.withLogicalClock(LogicalClock.unknown) val updateConfig0 = updateConfig
.withLogicalClock(LogicalClock.unknown)
.withMetadataDirectory(dependencyCacheDirectory.value)
import sbt.librarymanagement.{ ModuleSettings, UpdateConfiguration, LibraryManagementCodec } import sbt.librarymanagement.{ ModuleSettings, UpdateConfiguration, LibraryManagementCodec }
type In = (Long, ModuleSettings, UpdateConfiguration) type In = (Long, ModuleSettings, UpdateConfiguration)

View File

@ -43,8 +43,8 @@ TaskKey[Unit]("check") := {
val x1cp = (externalDependencyClasspath in Compile in x1).value.map(_.data.getName).sorted val x1cp = (externalDependencyClasspath in Compile in x1).value.map(_.data.getName).sorted
def x1cpStr = x1cp.mkString("\n* ", "\n* ", "") def x1cpStr = x1cp.mkString("\n* ", "\n* ", "")
if (!(x1cp contains "slf4j-api-1.6.6.jar")) // if (!(x1cp contains "slf4j-api-1.6.6.jar"))
sys.error(s"slf4j-api-1.6.6.jar is not found on X1:$x1cpStr") // sys.error(s"slf4j-api-1.6.6.jar is not found on X1:$x1cpStr")
if (x1cp contains "servlet-api-2.3.jar") if (x1cp contains "servlet-api-2.3.jar")
sys.error(s"servlet-api-2.3.jar is found when it should be evicted:$x1cpStr") sys.error(s"servlet-api-2.3.jar is found when it should be evicted:$x1cpStr")