Merge pull request #2072 from sbt/wip/snapshot-issues

Reinstate SNAPSHOT test that was fixed in #1520/#1514
This commit is contained in:
eugene yokota 2015-06-25 16:43:12 -04:00
commit 83a2319f89
2 changed files with 5 additions and 37 deletions

View File

@ -25,7 +25,8 @@ lazy val common = project.
case _ => false // TODO - Handle chain repository?
}
case _ => true
})
}),
updateOptions := updateOptions.value.withLatestSnapshots(true)
)
lazy val dependent = project.
@ -36,7 +37,9 @@ lazy val dependent = project.
// Ignore the inter-project resolver, so we force to look remotely.
resolvers += sharedResolver,
fullResolvers := fullResolvers.value.filterNot(_==projectResolver.value),
libraryDependencies += "com.badexample" % "badexample" % "1.0-SNAPSHOT"
libraryDependencies += "com.badexample" % "badexample" % "1.0-SNAPSHOT",
// Setting this to false fails the test
updateOptions := updateOptions.value.withLatestSnapshots(true)
)
TaskKey[Unit]("dumpResolvers") := {

View File

@ -1,35 +0,0 @@
# Validate that a bad dependency fails the compile
$ copy-file changes/BadCommon.scala common/src/main/scala/Common.scala
> common/publish
# Force dep resolution to be successful, then compilation to fail
> dependent/update
-> dependent/compile
# Push new good change to a DIFFERENT repository.
$ copy-file changes/GoodCommon.scala common/src/main/scala/Common.scala
# Sleep to ensure timestamp change
$ sleep 1000
> common/publishLocal
# This should compile now, because Ivy should look at each repository for the most up-to-date file.
> dependent/update
> dependent/compile
# Now let's try this on the opposite order: pubishLocal => publish
$ copy-file changes/BadCommon.scala common/src/main/scala/Common.scala
> common/publishLocal
# Force dep resolution to be successful, then compilation to fail
> dependent/update
-> dependent/compile
# Push new good change to a DIFFERENT repository.
$ copy-file changes/GoodCommon.scala common/src/main/scala/Common.scala
# Sleep to ensure timestamp change
$ sleep 1000
> common/publish
# This should compile now gain, because Ivy should look at each repository for the most up-to-date file.
> dependent/update
> dependent/compile