From 0fca1a9ff4a620bddfdf5d24c1490fe75faf9a6a Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Mon, 14 Dec 2015 16:59:55 -0500 Subject: [PATCH] Fixes #1514. Enable latest SNAPSHOT option by default to check all resolvers to find the latest snapshot artifacts. This behavior did not work well with Maven repositories where sbt was failing to calculate the correct publication dates. Now that #2075 fixes the Maven integration issue we should enable this flag back again. The build user can opt out by: updateOptions := updateOptions.value.withLatestSnapshots(false) --- notes/0.13.10/fix-snapshots.md | 12 ++++++++++++ .../snapshot-resolution/build.sbt | 8 ++++---- 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 notes/0.13.10/fix-snapshots.md diff --git a/notes/0.13.10/fix-snapshots.md b/notes/0.13.10/fix-snapshots.md new file mode 100644 index 000000000..597347526 --- /dev/null +++ b/notes/0.13.10/fix-snapshots.md @@ -0,0 +1,12 @@ + + [@eed3si9n]: https://github.com/eed3si9n + [1514]: https://github.com/sbt/sbt/issues/1514 + +### Fixes with compatibility implications + +### Improvements + +### Bug fixes + +- Turns update option's `withLatestSnapshots` flag `true` by default. + [#1514][1514] by [@eed3si9n][@eed3si9n] 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 0b9106118..4eac19855 100644 --- a/sbt/src/sbt-test/dependency-management/snapshot-resolution/build.sbt +++ b/sbt/src/sbt-test/dependency-management/snapshot-resolution/build.sbt @@ -25,8 +25,8 @@ lazy val common = project. case _ => false // TODO - Handle chain repository? } case _ => true - }), - updateOptions := updateOptions.value.withLatestSnapshots(true) + }) + // updateOptions := updateOptions.value.withLatestSnapshots(true) ) lazy val dependent = project. @@ -37,9 +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) + // updateOptions := updateOptions.value.withLatestSnapshots(true) ) TaskKey[Unit]("dumpResolvers") := {