From 1ca1ba431c81a99948fca7a61357dd2230e580e4 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Tue, 23 Jun 2015 20:39:41 -0400 Subject: [PATCH] Reinstate SNAPSHOT test that was fixed in #1520/#1514 --- .../snapshot-resolution/build.sbt | 7 ++-- .../snapshot-resolution/pending | 35 ------------------- 2 files changed, 5 insertions(+), 37 deletions(-) delete mode 100644 sbt/src/sbt-test/dependency-management/snapshot-resolution/pending diff --git a/sbt/src/sbt-test/dependency-management/snapshot-resolution/build.sbt b/sbt/src/sbt-test/dependency-management/snapshot-resolution/build.sbt index 4aaacae00..0b9106118 100644 --- a/sbt/src/sbt-test/dependency-management/snapshot-resolution/build.sbt +++ b/sbt/src/sbt-test/dependency-management/snapshot-resolution/build.sbt @@ -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") := { diff --git a/sbt/src/sbt-test/dependency-management/snapshot-resolution/pending b/sbt/src/sbt-test/dependency-management/snapshot-resolution/pending deleted file mode 100644 index 85317974a..000000000 --- a/sbt/src/sbt-test/dependency-management/snapshot-resolution/pending +++ /dev/null @@ -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