Fixes #1514. Enable latest SNAPSHOT option by default

#1520 originally fixed #1514 by reimplementing part of chain resolver
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)
This commit is contained in:
Eugene Yokota 2015-12-14 16:59:55 -05:00
parent 7645ca5112
commit e6c846db47
3 changed files with 17 additions and 5 deletions

View File

@ -75,7 +75,7 @@ object UpdateOptions {
def apply(): UpdateOptions =
new UpdateOptions(
circularDependencyLevel = CircularDependencyLevel.Warn,
latestSnapshots = false,
latestSnapshots = true,
consolidatedResolution = false,
cachedResolution = false,
resolverConverter = PartialFunction.empty)

View File

@ -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]

View File

@ -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") := {