sbt 0.13.5+ Technology Previews

sbt 0.13.5+ releases of sbt are technology previews of what’s to come to sbt 1.0 with enhancements like auto plugins, launcher enhacements for sbt server, defined in the sbt-remote-control project, and other necessary API changes.

These releases maintain binary compatibility with plugins that are published against sbt 0.13.0, but add new features in preparation for sbt 1.0. The tech previews allow us to test new ideas like auto plugins and performance improvements on dependency resolution; the build users can try new features without losing the existing plugin resources; and plugin authors can gradually migrate to the new plugin system before sbt 1.0 arrives.

sbt 0.13.17

Improvements

Updates Scala version to 2.10.7 for Java 9 support. #3848 by @eed3si9n

Bug fixes

Backports logging and clean concurrency fix. #2156/#3834 by @dwijnand

concurrency fix. #2156/#3834 by @dwijnand Fixes over-compilation on Java 9 scala.ext.dir . #3142/#3701 by @retronym

. #3142/#3701 by @retronym Fixes addSbtPlugin to use the correct version of sbt. #3393/#3397 by @dwijnand

to use the correct version of sbt. #3393/#3397 by @dwijnand Changes the tuple enrichment deprecation warning messages. #3455 by @olafurpg

Fixes addCompilerPlugin(...) so it can consume compiler plugins published to Ivy repository using sbt 1.x. #3784/#3855 by @eed3si9n

Internal

Fixes the source code to be doc friendly. #3401 by @dwijnand

sbt 0.13.16

Fixes with compatibility implications

Removes the “hit [ENTER] to switch to interactive mode” feature. Run sbt xxx shell to stay in shell after xxx . #3091/#3153 by @dwijnand

Improvements

Improves the new startup messages. See below.

Ports sbt-cross-building’s ^ and ^^ commands for plugin cross building. See below.

and commands for plugin cross building. See below. Adds Zero scope component for sbt 1.0 compatibility. #3179 by @eed3si9n

scope component for sbt 1.0 compatibility. #3179 by @eed3si9n Backports withXXX methods for ModuleID and Artifact for sbt 1.0 compatibility. #3215 by @eed3si9n

Bug fixes

Fixes the new startup messages. See below.

Fixes forward compatibility of Scripted plugin with sbt 1.0.0-RC2. #3329 by @dwijnand

Fixes ScalaTest nested suite test names being reported as ”(It is not a test)”. [#3154][3154] by [@jameskoch][@jameskoch]

Fixes default scalaBinaryVersion for Dotty. #3152 by [@smarter][@smater]

for Dotty. #3152 by [@smarter][@smater] Updates JLine dependency to 2.14.4 to work around ncurses change causing NumberFormatException . #3265 by @Rogach

@jrudolph’s sbt-cross-building is a plugin author’s plugin. It adds cross command ^ and sbtVersion switch command ^^ , similar to + and ++ , but for switching between multiple sbt versions across major versions. sbt 0.13.16 merges these commands into sbt because the feature it provides is useful as we migrate plugins to sbt 1.0.

To switch the sbtVersion in pluginCrossBuild from the shell use:

^^ 1.0.0-RC2

Your plugin will now build with sbt 1.0.0-RC2 (and its Scala version 2.12.2).

If you need to make changes specific to a sbt version, you can now include them into src/main/scala-sbt-0.13 , and src/main/scala-sbt-1.0 , where the binary sbt version number is used as postfix.

To run a command across multiple sbt versions, set:

crossSbtVersions := Vector("0.13.15", "1.0.0-RC2")

Then, run:

^ compile

#3133 by @eed3si9n

Eviction warning presentation

sbt 0.13.16 improves the eviction warning presetation.

Before:

[warn] There may be incompatibilities among your library dependencies. [warn] Here are some of the libraries that were evicted: [warn] * com.google.code.findbugs:jsr305:2.0.1 -> 3.0.0 [warn] Run 'evicted' to see detailed eviction warnings

After:

[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible: [warn] [warn] * com.typesafe.akka:akka-actor_2.12:2.5.0 is selected over 2.4.17 [warn] +- de.heikoseeberger:akka-log4j_2.12:1.4.0 (depends on 2.5.0) [warn] +- com.typesafe.akka:akka-parsing_2.12:10.0.6 (depends on 2.4.17) [warn] +- com.typesafe.akka:akka-stream_2.12:2.4.17 () (depends on 2.4.17) [warn] [warn] Run 'evicted' to see detailed eviction warnings

#3202 by @eed3si9n

Improvements and bug fixes to the startup messages

sbt writes out the sbt.version in project/build.properties if it is missing. sbt 0.13.16 fixes the logging when it happens by using the logger.

We encourage the use of the sbt shell by running sbt , instead of running sbt compile from the terminal repreatedly. The sbt shell keeps the JVM warm, and there is a significant performance improvement gained for your compilation. The startup message that we added in sbt 0.13.15 was a bit too aggressive, so we are toning it down in 0.13.16. It will only be triggered for sbt compile , and it can also be supressed with suppressSbtShellNotification := true .

#3091/#3097/#3147 by @dwijnand

sbt 0.13.15

Fixes with compatibility implications

sbt 0.13.15 removes the Maven version range when possible. See below.

Improvements

Adds preliminary compatibility with JDK 9. Using this requires 0.13.15+ launcher. #2951/143 by @retronym

Adds “local-preloaded” repository for offline installation. See below.

Notifies and enables users to stay in sbt’s shell on the warm JVM by hitting [ENTER] while sbt is running. #2987/#2996 by @dwijnand

while sbt is running. #2987/#2996 by @dwijnand Adds an Append instance to support sourceGenerators += Def.task { ... } , instead of needing .taskValue . #2943 by @eed3si9n

instance to support , instead of needing . #2943 by @eed3si9n Writes out the sbt.version in project/build.properties if it is missing. #754/#3025 by @dwijnand

if it is missing. #754/#3025 by @dwijnand XML generated by JUnitXmlTestsListener now correctly flags ignored, skipped and pending tests. #2198/#2854 by @ashleymercer

When sbt detects that the project is compiled with dotty, it now automatically sets scalaCompilerBridgeSource correctly, this reduces the boilerplate needed to make a dotty project. Note that dotty support in sbt is still considered experimental and not officially supported, see dotty.epfl.ch for more information. #2902 by @smarter

correctly, this reduces the boilerplate needed to make a dotty project. Note that dotty support in sbt is still considered experimental and not officially supported, see dotty.epfl.ch for more information. #2902 by @smarter Updates sbt new’s reference implementation to Giter8 0.7.2.

ScriptedPlugin: Add the ability to paginate scripted tests. It is now possible to run a subset of scripted tests in a directory at once, for example: ` scripted source-dependencies/*1of3 ` Will create three pages and run page 1. This is especially useful when running scripted tests on a CI, to benefit from the available parallelism. 3013 by @smarter

Bug fixes

Fixes .triggeredBy/.storeAs/etc not working when using := and .value macros. #1444/#2908 by @dwijnand

and macros. #1444/#2908 by @dwijnand Fixes Ctrl-C not working on Windows by bumping up JLine. #1855 by @eed3si9n

Fixes regressions in sbt 0.13.11 - 0.13.13 that processed build-level keys incorrectly. #2851/#2460 by @eed3si9n

Fixes a regression in sbt 0.13.12 that was misfiring Scala version enforcement when configuration does not extend Compile . #2827/#2786 by @eed3si9n

. #2827/#2786 by @eed3si9n Fixes Scala binary version checking misfiring on configurations that do not extend Compile . #2828/#1466 by @eed3si9n

. #2828/#1466 by @eed3si9n Fixes script mode ignoring quotation. #2551 by @ekrich

Fixes IllegalStateException that Ivy gets into sometimes. #2827/#2015 by @eed3si9n

Fixes null sourceFile causing NPE. #2766 by @avdv

Fixes version parsing in validation. #3011 by @eed3si9n

Fixes Package.makeJar deleting directory recursively. #3014 by @larsrh

Maven version range improvement

Previously, when the dependency resolver (Ivy) encountered a Maven version range such as [1.3.0,) it would go out to the Internet to find the latest version. This would result to a surprising behavior where the eventual version keeps changing over time even when there’s a version of the library that satisfies the range condition.

Starting sbt 0.13.15, some Maven version ranges would be replaced with its lower bound so that when a satisfactory version is found in the dependency graph it will be used. You can disable this behavior using the JVM flag -Dsbt.modversionrange=false .

#2954 by @eed3si9n

Offline installation

sbt 0.13.15 adds two new repositories called “local-preloaded-ivy” and “local-preloaded” that point to ~/.sbt/preloaded/ . The purpose for the repositories is to preload them with sbt artifacts so the installation of sbt will not require access to the Internet.

This also improves the startup time of sbt when you first run it since the resolution happens off of a local-preloaded repository.

#2993/#145 by @eed3si9n

Notes

No changes should be necessary to your project definition and all plugins published for sbt 0.13.{x|x<14} should still work.

See Migrating from sbt 0.12.x for details on the old operator deprecation.

Special thanks to the contributors for making this release a success. According to git shortlog -sn --no-merges v0.13.13..0.13.15 , compared to 0.13.13, there were 64 (non-merge) commits, by eleven contributors: Eugene Yokota, Dale Wijnand, Guillaume Martres, Jason Zaugg, Lars Hupel, Petro Verkhogliad, Eric Richardson, Claudio Bley, Haochi Chen, Paul Draper, Ashley Mercer. Thank you!

sbt 0.13.14

sbt 0.13.14 did not happen due a bug that was found after the artifact was published.

sbt 0.13.13

Fixes with compatibility implications

Deprecates the old sbt 0.12 DSL, to be removed in sbt 1.0. See below for more details.

The .value method is deprecated for input tasks. Calling .value on an input key returns an InputTask[A] , which is completely unintuitive and often results in a bug. In most cases .evaluated should be called, which returns A by evaluating the task. Just in case InputTask[A] is needed, .inputTaskValue method is now provided. #2709 by @eed3si9n

method is deprecated for input tasks. Calling on an input key returns an , which is completely unintuitive and often results in a bug. In most cases should be called, which returns by evaluating the task. Just in case is needed, method is now provided. #2709 by @eed3si9n sbt 0.13.13 renames the early command --<command> that was added in 0.13.1 to early(<command>) . This fixes the regression #1041. For backward compatibility --error , --warn , --info , and --debug will continue to function during the 0.13 series, but it is strongly encouraged to migrate to the single hyphen options: -error , -warn , -info , and -debug . #2742 by @eed3si9n

that was added in 0.13.1 to . This fixes the regression #1041. For backward compatibility , , , and will continue to function during the 0.13 series, but it is strongly encouraged to migrate to the single hyphen options: , , , and . #2742 by @eed3si9n Improve show when key returns a Seq by showing the elements one per line. Disable with -Dsbt.disable.show.seq=true . #2755 by @eed3si9n

when key returns a by showing the elements one per line. Disable with . #2755 by @eed3si9n Recycles classloaders to be anti-hostile to JIT. Disable with -Dsbt.disable.interface.classloader.cache=true . #2754 by @retronym

Improvements

Adds new command and templateResolverInfos . See below for more details.

command and . See below for more details. Auto plugins can add synthetic subprojects. See below for more details.

Supports wildcard exclusions in POMs #1431/sbt/ivy#22/#2731 by @jtgrabowski

Adds the ability to call aggregateProjects(..) for the current project inside a build sbt file. #2682 by @xuwei-k

for the current project inside a build sbt file. #2682 by @xuwei-k Adds .jvmopts support to the launcher script. sbt/sbt-launcher-package#111 by @fommil

support to the launcher script. sbt/sbt-launcher-package#111 by @fommil Adds .java-version support to the Windows launcher script. sbt/sbt-launcher-package#111 by @fommil

support to the Windows launcher script. sbt/sbt-launcher-package#111 by @fommil The startup log level is dropped to -error in script mode using scalas . #840/#2746 by @eed3si9n

in script mode using . #840/#2746 by @eed3si9n Adds CrossVersion.patch which sits in between CrossVersion.binary and CrossVersion.full in that it strips off any trailing -bin-... suffix which is used to distinguish variant but binary compatible Scala toolchain builds. Most things which are currently CrossVersion.full (eg. Scala compiler plugins, esp. macro-paradise) would be more appropriately depended on as CrossVersion.patch from this release on.

Bug fixes

Fixes a regression in sbt 0.13.12 that wrongly reports build-level keys to be ambiguous. #2707/#2708 by @Duhemm

Fixes a regression in sbt 0.13.12 that was misfiring Scala version enforcement when an alternative scalaOrganization is set. #2703 by @milessabin

is set. #2703 by @milessabin Fixes Tags.ForkedTestGroup . #2677/#2681 by @pauldraper

. #2677/#2681 by @pauldraper Fixes forked tests being reported as successful when the test harness fails. #2442/#2722/#2730 by @eed3si9n/@dwijnand

Fixes incorrect installation path on Windows. sbt/sbt-launcher-package#110 by @dwijnand

new command and templateResolverInfos

sbt 0.13.13 adds a new command, which helps create new build definitions. The new command is extensible via a mechanism called the template resolver. A template resolver pattern matches on the passed in arguments after new , and if it’s a match it will apply the template.

As a reference implementation, template resolver for Giter8 is provided. For instance:

sbt new eed3si9n/hello.g8

will run eed3si9n/hello.g8 using Giter8.

#2705 by @eed3si9n

Synthetic subprojects

sbt 0.13.13 adds support for AutoPlugin s to define subprojects programmatically, by overriding the extraProjects method:

import sbt._, Keys._ object ExtraProjectsPlugin extends AutoPlugin { override def extraProjects: Seq[Project] = List("foo", "bar", "baz") map generateProject def generateProject(id: String): Project = Project(id, file(id)) .settings( name := id ) }

In addition, subprojects may be derived from an existing subproject by overriding derivedProjects :

import sbt._, Keys._ object DerivedProjectsPlugin extends AutoPlugin { // Enable this plugin by default override def requires: Plugins = sbt.plugins.CorePlugin override def trigger = allRequirements override def derivedProjects(proj: ProjectDefinition[_]): Seq[Project] = // Make sure to exclude project extras to avoid recursive generation if (proj.projectOrigin != ProjectOrigin.DerivedProject) { val id = proj.id + "1" Seq( Project(id, file(id)) .enablePlugins(DatabasePlugin) ) } else Nil }

#2532/#2717/#2738 by @eed3si9n

Deprecate old sbt 0.12 DSL

The no-longer-documented operators <<= , <+= , and <++= and tuple enrichments are deprecated, and will be removed in sbt 1.0.

Generally,

task3 <<= (task1, task2) map { (t1, t2) => println(t1 + t2); t1 + t2 }

should migrate to

task3 := { println(task1.value + task2.value) task1.value + task2.value }

Except for source generators, which requires task values:

sourceGenerators in Compile <+= buildInfo

This becomes:

sourceGenerators in Compile += buildInfo.taskValue

Another exception is input task:

run <<= docsRunSetting

This becomes:

run := docsRunSetting.evaluated

See Migrating from sbt 0.12.x for more details.

#2716/#2763/#2764 by @eed3si9n and @dwijnand

sbt 0.13.12

Fixes with compatibility implications

By default the Scala toolchain artifacts are now transitively resolved using the provided scalaVersion and scalaOrganization . Previously a user specified scalaOrganization would not have affected transitive dependencies on, eg. scala-reflect . An Ivy-level mechanism is used for this purpose, and as a consequence the overriding happens early in the resolution process which might improve resolution times, and as a side benefit fixes #2286. The old behavior can be restored by adding ivyScala := { ivyScala.value map {_.copy(overrideScalaVersion = sbtPlugin.value)} } to your build. #2286/#2634 by @milessabin

and . Previously a user specified would not have affected transitive dependencies on, eg. . An Ivy-level mechanism is used for this purpose, and as a consequence the overriding happens early in the resolution process which might improve resolution times, and as a side benefit fixes #2286. The old behavior can be restored by adding to your build. #2286/#2634 by @milessabin The Build trait is deprecated in favor of the .sbt format #2530 by @dwijnand

Improvements

When RecompileOnMacroDef is enabled, sbt will now print out a info level log indicating that some sources are being recompiled because it’s used from a source that contains a macro definition. Can be disabled with incOptions := incOptions.value.withLogRecompileOnMacro(false) #2637/#2659 by @eed3si9n/@dwijnand

is enabled, sbt will now print out a info level log indicating that some sources are being recompiled because it’s used from a source that contains a macro definition. Can be disabled with #2637/#2659 by @eed3si9n/@dwijnand Adds Windows script support and native file extensions on Unix platforms. #2603 by @ekrich

Improves loading time of large builds. #2630 by @eed3si9n

Adds the ability to call dependsOn for the current project inside a .sbt file. #2653 by @anatolydwnld

Bug fixes

Fixes a 0.13.11 regression: dependency resolution hitting Maven Central even with repository overrides. #2519/#2569 by @eed3si9n

Fixes a 0.13.11 regression in incremental compiler: IndexOutOfBoundsException in ExtractAPI #2497/#2557 by @smarter

in ExtractAPI #2497/#2557 by @smarter Fixes merged dependency descriptors dropping configuration specification. #2002/#1500 by @eed3si9n

Fixes merged dependency descriptors creating non-existing artifacts. #2431/#2500 by @Duhemm

Fixes incremental compilation misses when macro expansion references another source. #2560/#2563 by @eed3si9n

Fixes incremental compilation of package objects transitively in name hashing. #2432/#2326 by @gkossakowski

Fixes incremental compilation relying on filename of package objects. #2438 by @Duhemm

Provides a workaround flag incOptions := incOptions.value.withIncludeSynthToNameHashing(true) for name hashing not including synthetic methods. This will not be enabled by default in sbt 0.13. It can also enabled by passing sbt.inc.include_synth=true to JVM. #2537 by @eed3si9n

for name hashing not including synthetic methods. This will not be enabled by default in sbt 0.13. It can also enabled by passing to JVM. #2537 by @eed3si9n Fixes tab completion for tasks defined in AutoPlugin’s buildSettings #2460/#2469 by @Duhemm

Fixes configuration merging during cached resolution. #2435/#2513 by @Duhemm

sbt 0.13.11

Fixes with compatibility implications

JCenter is now opt-in. A new setting useJCenter can be set to true to re-include it, as the first external resolver to find library dependencies. #2217/#2467 by @eed3si9n

can be set to to re-include it, as the first external resolver to find library dependencies. #2217/#2467 by @eed3si9n Adds withInterProjectFirst to the update option, which is enabled by default. When set to true , inter-project resolver will be prioritized above all resolvers and Ivy cache. #1827 by @eed3si9n

to the update option, which is enabled by default. When set to , resolver will be prioritized above all resolvers and Ivy cache. #1827 by @eed3si9n Fixes update option’s withLatestSnapshots so it handles modules without an artifact. This flag will be enabled by default. #1514/#1616/#2313 by @eed3si9n

so it handles modules without an artifact. This flag will be enabled by default. #1514/#1616/#2313 by @eed3si9n No longer passes -J<flag> options to the local Java compiler. #1968/#2272 by @Duhemm

options to the local Java compiler. #1968/#2272 by @Duhemm Fixes auto imports for auto plugins in global configuration files. Because this is not source compatible with 0.13.x, the fix is enabled only when sbt.global.autoimport flag is true . #2120/#2399 by @timcharper

Improvements

Adds configurable compiler bridge. See below.

Adds initial support for Dotty. See below

Adds settings for granular inter-project dependency tracking. See below.

Scala version used by the build is updated to 2.10.6. #2311 by @eed3si9n

If publishMavenStyle is true , update task warns when it sees intransitive dependencies, which do not translate to Maven. #2127 by @jsuereth

is , task warns when it sees intransitive dependencies, which do not translate to Maven. #2127 by @jsuereth Adds Def.settings , which facilitates mixing settings with seq of settings. See below.

, which facilitates mixing settings with seq of settings. See below. sbt Serialization is updated to 0.1.2. #2117 by @dwijnand

Hides the stack trace on compilation error in build definition. #2071/#2091 by @Duhemm

Makes the dummy Logger.Null public. #2094 by @pdalpra

public. #2094 by @pdalpra Uses diagnostic classes to get lines contents in local Java compiler. #2108/#2201 by @fkorotkov

Adds logging of javaOptions. #2087/#2103 by @pdalpra

Warns when javaOptions are defined but fork is set to false. #2041/#2103 by @pdalpra

Adds an Append.Sequence instance for List to allow += / ++= on developers setting. #2107/#2114 by @pdalpra

instance for to allow / on setting. #2107/#2114 by @pdalpra Drops sealed from the typeclasses in Append . #2322 by @dwijnand

from the typeclasses in . #2322 by @dwijnand Fixes compilation warnings in sbt’s codebase, and other clean ups. #2112/#2137/#2139/#2142 by @pdalpra

Adds localIfFile to MavenRepository , to force artifacts to be copied to the cache. #2172 by @dwijnand

to , to force artifacts to be copied to the cache. #2172 by @dwijnand Adds Resolver.bintrayIvyRepo(owner, repo) . #2285 by @dwijnand

. #2285 by @dwijnand Non-static annotation changes are no longer tracked by the incremental compiler. #2343 by @romanowski

Reduces the memory usage of API info extraction in the incremental compiler. #2343 by @adriaanm

Memory-related options can now be overridden individually via the -J options. sbt/sbt-launcher-package#105

Bug fixes

Fixes the false positive of inconsistent duplicate warnings. #1933/#2258 by @Duhemm

Fixes task scheduling performance on large builds by skipping checks in sbt.Execute . #2302/#2303 by @jrudolph

. #2302/#2303 by @jrudolph Fixes changes in value classes by registering signatures of method before and after erasure. #1171/#2261 by @Duhemm

Updated Ivy to merge IVY-1526 fix. sbt/ivy#14/#2118 by @jsuereth

Fixes updateClassifiers downloading updated snapshot sources and docs. #1750/sbt/ivy#17/#2163/sbt/ivy#18/#2186 by @dwijnand

downloading updated snapshot sources and docs. #1750/sbt/ivy#17/#2163/sbt/ivy#18/#2186 by @dwijnand Fixes updateClassifiers on Ivy modules without default configuration. #2264 by @eed3si9n/@Duhemm

on Ivy modules without configuration. #2264 by @eed3si9n/@Duhemm Updated JLine to version 2.13. #1681/#2173

Changing the value of a constant (final-static-primitive) field will now correctly trigger incremental compilation for downstream classes. This is to account for the fact that Java compilers may inline constant fields in downstream classes. #1967/#2085 by @stuhood

Fixes classfile location detection. #2214 by @stuhood

Fixes a few typos in keys descriptions. #2092 by @pdalpra

Avoids the use of ListBuffer#readOnly . #2095 by @adriaanm

. #2095 by @adriaanm Expands transitive dependency exclusions when using sbt-maven-resolver-plugin #2109 by @jsuereth

Fixes incremental compilation of traits by including private members into the API hash. #2155/#2160 by @Duhemm

Fixes name hashing by removing class private members from the hash. #2324/#2325 by @gkossakowski

Fixes name hashing error messages. #2158 by @stuhood

Adds more robustness to tasks and settings command. #2192 by @DavidPerezIngeniero

and command. #2192 by @DavidPerezIngeniero Fixes Java compilation inconsistencies between sbt and javac by always failing if the local Java compiler reported errors. #2228/#2271 by @Duhemm

by always failing if the local Java compiler reported errors. #2228/#2271 by @Duhemm Fixes JavaErrorParser to parse non-compile-errors #2256/#2272 by @Duhemm

to parse non-compile-errors #2256/#2272 by @Duhemm Fixes launcher configuration to add sbt-ivy-snapshots repository to resolve nightly builds. @eed3si9n

repository to resolve nightly builds. @eed3si9n Fixes performance issues during tree traversal in the incremental compiler. #2343 by @adriaanm

Fixes the tracking of self types and F-bounded existential types in the incremental compiler. #2343 by @adriaanm

Avoid CCE when scalac internally uses compileLate . #2453 by @retronym

. #2453 by @retronym Fixes the memory-related options overriding SBT_OPTS . sbt/sbt-launcher-package#101 by @eed3si9n

Configurable Scala compiler bridge

sbt 0.13.11 adds scalaCompilerBridgeSource setting to specify the compiler brigde source. This allows different implementation of the bridge for Scala versions, and also allows future versions of Scala compiler implementation to diverge. The source module will be retrieved using library management configured by bootIvyConfiguration task.

#2106/#2197/#2336 by @Duhemm

Dotty awareness

sbt 0.13.11 will assume that Dotty is used when scalaVersion starts with 0. . The built-in compiler bridge in sbt does not support Dotty, but a separate compiler bridge is being developed at smarter/dotty-bridge and an example project that uses it is available at smarter/dotty-example-project.

#2344 by @smarter

Inter-project dependency tracking

sbt 0.13.11 adds trackInternalDependencies and exportToInternal settings. These can be used to control whether to trigger compilation of a dependent subprojects when you call compile . Both keys will take one of three values: TrackLevel.NoTracking , TrackLevel.TrackIfMissing , and TrackLevel.TrackAlways . By default they are both set to TrackLevel.TrackAlways .

When trackInternalDependencies is set to TrackLevel.TrackIfMissing , sbt will no longer try to compile internal (inter-project) dependencies automatically, unless there are no *.class files (or JAR file when exportJars is true ) in the output directory. When the setting is set to TrackLevel.NoTracking , the compilation of internal dependencies will be skipped. Note that the classpath will still be appended, and dependency graph will still show them as dependencies. The motivation is to save the I/O overhead of checking for the changes on a build with many subprojects during development. Here’s how to set all subprojects to TrackIfMissing .

lazy val root = (project in file(".")). aggregate(....). settings( inThisBuild(Seq( trackInternalDependencies := TrackLevel.TrackIfMissing, exportJars := true )) )

The exportToInternal setting allows the dependee subprojects to opt out of the internal tracking, which might be useful if you want to track most subprojects except for a few. The intersection of the trackInternalDependencies and exportToInternal settings will be used to determine the actual track level. Here’s an example to opt-out one project:

lazy val dontTrackMe = (project in file("dontTrackMe")). settings( exportToInternal := TrackLevel.NoTracking )

#2266/#2354 by @eed3si9n

Using Def.settings it is now possible to nicely define settings as such:

val modelSettings = Def.settings( sharedSettings, libraryDependencies += foo )

#2151 by @dwijnand

sbt 0.13.10

sbt 0.13.10 did not happen due a bug that was found after the artifact was published.

sbt 0.13.9

Fixes with compatibility implications

Starting 0.13.9, crossScalaVersions default value is fixed back to the older 0.12.x behavior. See below for details.

default value is fixed back to the older 0.12.x behavior. See below for details. Starting 0.13.9, the generated POM files no longer include dependencies on source or javadoc jars obtained via withSources() or withJavadoc() . See below for details.

or . See below for details. Scala version is bumped to 2.10.5. This brings in the fix for SI-9027: XML node sequence literal bug. #1666/#2068 by @eed3si9n

Improvements

Adds retrieveManaged related improvements. See below for details.

related improvements. See below for details. Adds -= and --= for settings and tasks, which are the opposites of += and ++= . #1922 by @dwijnand

and for settings and tasks, which are the opposites of and . #1922 by @dwijnand Adds inThisBuild , similar to inConfig , to allow specifying multiple settings in ThisBuild scope. #1847/#1989 by @dwijnand

, similar to , to allow specifying multiple settings in scope. #1847/#1989 by @dwijnand Adds a nicer toString to SimpleCommand to make it more human-friendly. #1998/#2000 by @dwijnand

Adds forceUpdatePeriod key, that takes values of Option[FiniteDuration] . If set, a full update will occur after that amount of time without needing to explicitly run the update task. By @ajsquared

key, that takes values of . If set, a full will occur after that amount of time without needing to explicitly run the task. By @ajsquared Updates ForkError.getMessage() to include exception’s original name. #2028 by @kamilkloch

to include exception’s original name. #2028 by @kamilkloch Adds help message for inspect actual . #1651/#1990 by @dwijnand

. #1651/#1990 by @dwijnand Supports excluding tests in testOnly / testQuick with - , for example -MySpec . #1970 by @matthewfarwell

/ with , for example . #1970 by @matthewfarwell Adds more diagnostic info for underfined settings. #2008/#2009 by @DavidPerezIngeniero

Adds an Extracted.runInputTask helper to assist with imperatively executing input tasks. #2006 by @jroper

helper to assist with imperatively executing input tasks. #2006 by @jroper Renames distinct method on PathFinder to distinctName . #1973 by @eed3si9n

method on to . #1973 by @eed3si9n Adds distinctPath method on PathFinder . #1973 by @eed3si9n

Bug fixes

Fixes memory/performance issue with cached resolution. See below.

Correct incremental compile debug message for invalidated products #1961 by @jroper

Enables forced GC by default. See below.

Fixes Maven compatibility to read maven-metadata.xml . See below.

. See below. Captures errors on help command. #1900/#1940 by @DavidPerezIngeniero

command. #1900/#1940 by @DavidPerezIngeniero Prevents history command(s) from going into an infinite loop #1562 by @PanAeon

Honors overwrite flag when publishing locally. #1960 by @asflierl

Fixes a certain class of pom corruption that can occur in the presence of parent-poms. #1856 by @jsuereth

Adds dependency-level exclusions in the POM for project-level exclusions. #1877/#2035 by @dwijnand

crossScalaVersions default value

As of this fix crossScalaVersions returns to the behaviour present in 0.12.4 whereby it defaults to what scalaVersion is set to, for example if scalaVersion is set to "2.11.6" , crossScalaVersions now defaults to Seq("2.11.6") .

Therefore when upgrading from any version between 0.13.0 and 0.13.8 be aware of this new default if your build setup depended on it.

#1828/#1992 by @dwijnand

POM files no longer include certain source and javadoc jars

When declaring library dependencies using the withSources() or withJavadoc() options, sbt was also including in the pom file, as dependencies, the source or javadoc jars using the default Maven scope. Such dependencies might be erroneously processed as they were regular jars by automated tools

#2001/#2027 by @cunei

retrieveManaged related improvements

sbt 0.13.9 adds retrieveManagedSync key that, when set to true , enables synchronizing retrieved to the current build by removed unneeded files.

It also adds configurationsToRetrieve key, that takes values of Option[Set[Configuration]] . If set, when retrieveManaged is true only artifacts in the specified configurations will be retrieved to the current build.

#1950/#1987 by @ajsquared

Cached resolution fixes

On a larger dependency graph, the JSON file growing to be 100MB+ with 97% of taken up by caller information. To make the matter worse, these large JSON files were never cleaned up.

sbt 0.13.9 filters out artificial or duplicate callers, which fixes OutOfMemoryException seen on some builds. This generally shrinks the size of JSON, so it should make the IO operations faster. Dynamic graphs will be rotated with directories named after yyyy-mm-dd , and stale JSON files will be cleaned up after few days.

sbt 0.13.9 also fixes a correctness issue that was found in the earlier releases. Under some circumstances, libraries that shouldn’t have been evicted was being evicted. This occured when library A1 depended on B2 , but a newer A2 dropped the dependency, and A2 and B1 are also is in the graph. This is fixed by sorting the graph prior to eviction.

#2030/#1721/#2014/#2046/#2097 by @eed3si9n

Force GC

@cunei in #1223 discovered that sbt leaks PermGen when it creates classloaders to call Scala Compilers. sbt 0.13.9 will call GC on a set interval (default: 60s). It will also call GC right before cross building. This behavior can diabled using by setting false to forcegc setting or sbt.task.forcegc flag.

#1773 by @eed3si9n

Maven compatibility fix

To resolve dynamic versions such as SNAPSHOT and version ranges, the dependency resolution engine queries for the list of available versions. For Maven repositories, it was supposed read maven-metadata.xml first, but because sbt customizes the repository layout for cross building, it has been falling back to screen scraping of the Apache directory listing. This problem surfaced as:

Version range not working for artifacts hosted on Bintray. #2005

Potentially other SNAPSHOT related issues.

sbt 0.13.9 fixes this by relaxing the Maven compatiblity check, so it will read maven-metadata.xml . #2075 by @eed3si9n

sbt 0.13.8

Changes with compatibility implications

Disable publishing on implicitly created root project by not enabling IvyPlugin by default ( -Dsbt.root.ivyplugin=true will revert this behavior). #1871/#1869 by @dwijnand

by default ( will revert this behavior). #1871/#1869 by @dwijnand Rolls back XML parsing workaround. See below.

Enables cross-version support for Scala sources. See below.

Improvements

Adds Maven resolver plugin. See below.

Adds project-level dependency exclusions. See below.

Adds sequential tasks. See below.

Discovered main classes will be sorted. #1180 by @kretes

Implemented a new mechanism of forking javac, whereby errors are captured. Also more likely to run in-process. #1702 by @jsuereth

evicted will display all evictions (including the ones not suspected of binary incompatibility). #1615 by @eed3si9n

will display all evictions (including the ones not suspected of binary incompatibility). #1615 by @eed3si9n Better abstration to track new kinds of dependencies for incremental compiler. #1340 by @Duhemm

Source dependency uses --depth 1 for git clone. #1787 by @xuwei-k

for git clone. #1787 by @xuwei-k Facilitate nicer ways of declaring project settings. See below. #1902 by @dwijnand

Fixes

Javac warnings are treated as warnings. #1702/#875 by @jsuereth

compilerReporter is fed to javac during incremental compilation. #1542 by @jsuereth

is fed to javac during incremental compilation. #1542 by @jsuereth Ignores hidden build files from the build. #1746 by @j-keck

Fixes build.sbt parsing of multiple import. #1741 by @ajozwik

Fixes ANSI escape code for overwriting lines on Windows. #1771 by @dwickern

Adds null check in incremental compiler’s type tree extraction. #1754/#1655 by @Duhemm

sbt doesn’t honor Maven’s uniqueVersions (use sbt-maven-resolver to fix). #1322 by @jsuereth

sbt doesn’t see new SNAPSHOT dependency versions in local maven repos (use withLatestSnapshots + sbt-maven-resolver to fix) #321 by @jsuereth

Property in pom’s version field results to wrong dependency resolution (use sbt-maven-resolver to fix). #647 by @jsuereth

Maven local resolver with parent POM (use sbt-maven-resolver). #1616 by @jsuereth

Fixes eviction warning being too noisy. #1615 by @eed3si9n

Issues warning if multiple dependencies to a same library is found with different version. #1634 by @eed3si9n

Removes “No main class detected” warning. #1766 by @eed3si9n

Fixes sporadic ConcurrentModificationException from JUnitXmlTestsListener. #1881 by @aerskine

Fixes handling of ANSI CSI codes. #1885 by @jsuereth

Exempt org.scala-lang:scala-actors-migration and org.scala-lang:scala-pickling from scala binary version checks. #1818/#1899 by @dwijnand

Fixes cached resolution handling of internal depdendencies. #1711 by @eed3si9n

Fixes cached resolution being too verbose. #1752 by @eed3si9n

Fixes cached resolution not evicting modules transitively. #1760 by @eed3si9n

Rolling back XML parsing workaround

sbt 0.13.7 implemented natural whitespace handling by switching build.sbt parsing to use Scala compiler, instead of blank line delimiting. We realized that some build definitions no longer parsed due to the difference in XML handling.

val a = <x/><y/> val b = 0

At the time, we thought adding parentheses around XML nodes could work around this behavior. However, the workaround has caused more issues, and since then we have realized that this is a compiler issue SI-9027, so we have decided to roll back our workaround. In the meantime, if you have consecutive XML elements in your build.sbt, enclose them in <xml:group> tag, or parentheses.

val a = <xml:group><x/><y/></xml:group> val b = 0

#1765 by @ajozwik

Cross-version support for Scala sources

When crossPaths setting is set to true (it is true by default), sbt 0.13.8 will include src/main/scala-<scalaBinaryVersion>/ to the Compile compilation in addition to src/main/scala . For example, it will include src/main/scala-2.11/ for Scala 2.11.5, and src/main/scala-2.9.3 for Scala 2.9.3. #1799 by @indrajitr

Maven resolver plugin

sbt 0.13.8 adds an extension point in the dependency resolution to customize Maven resolvers. This allows us to write sbt-maven-resolver auto plugin, which internally uses Eclipse Aether to resolve Maven dependencies instead of Apache Ivy.

To enable this plugin, add the following to project/maven.sbt (or project/plugin.sbt the file name doesn’t matter):

addMavenResolverPlugin

This will create a new ~/.ivy2/maven-cache directory, which contains the Aether cache of files. You may notice some file will be re-downloaded for the new cache layout. Additionally, sbt will now be able to fully construct maven-metadata.xml files when publishing to remote repositories or when publishing to the local ~/.m2/repository . This should help erase many of the deficiencies encountered when using Maven and sbt together.

Notes and known limitations:

sbt-maven-resolver requires sbt 0.13.8 and above.

The current implementation does not support Ivy-style dynamic revisions, such as “2.10.+” or “latest.snapshot”. This is a fixable situation, but the version range query and Ivy -> Maven version range translation code has not been migrated.

The current implementation does not support Maven-style range revisions if found on transitive dependencies. #1921

#1793 by @jsuereth

Project-level dependency exclusions

sbt 0.13.8 adds experimental project-level dependency exclusions:

excludeDependencies += "org.apache.logging.log4j" excludeDependencies += "com.example" %% "foo"

In the first example, all artifacts from the organization "org.apache.logging.log4j" are excluded from the managed dependency. In the second example, artifacts with the organization "com.example" and the name "foo" cross versioned to the current scalaVersion are excluded.

Note: This feature currently does not translate to pom.xml !

#1748 by @eed3si9n

Sequential tasks

sbt 0.13.8 adds a new Def.sequential function to run tasks under semi-sequential semantics. Here’s an example usage:

lazy val root = project. settings( testFile := target.value / "test.txt", sideEffect0 := { val t = testFile.value IO.append(t, "0") t }, sideEffect1 := { val t = testFile.value IO.append(t, "1") t }, foo := Def.sequential(compile in Compile, sideEffect0, sideEffect1, test in Test).value )

Normally sbt’s task engine will reorder tasks based on the dependencies among the tasks, and run as many tasks in parallel (See Custom settings and tasks for more details on this). Def.sequential instead tries to run the tasks in the specified order. However, the task engine will still deduplicate tasks. For instance, when foo is executed, it will only compile once, even though test in Test depends on compile. #1817/#1001 by @eed3si9n

Nicer ways of declaring project settings

Now a Seq[Setting[_]] can be passed to Project.settings without the needs for “varargs expansion”, ie. : _*

Instead of:

lazy val foo = project settings (sharedSettings: _*)

It is now possible to do:

lazy val foo = project settings sharedSettings

Also, Seq[Setting[_]] can be declared at the same level as individual settings in Project.settings , for instance:

lazy val foo = project settings ( sharedSettings, version := "1.0", someMoreSettings )

#1902 by @dwijnand

Bytecode Enhancers

sbt 0.13.8 adds an extension point whereby users can effectively manipulate java bytecode (.class files) before the incremental compiler attempts to cache the classfile hashes. This allows libraries like ebean to function with sbt without corrupting the compiler cache and rerunning compile every few seconds.

This splits the compile task into several subTasks:

previousCompile : This task returns the previously persisted Analysis object for this project. compileIncremental : This is the core logic of compiling Scala/Java files together. This task actually does the work of compiling a project incrementally, including ensuring a minimum number of source files are compiled. After this method, all .class files that would be generated by scalac + javac will be available. manipulateByteCode : This is a stub task which takes the compileIncremental result and returns it. Plugins which need to manipulate bytecode are expected to override this task with their own implementation, ensuring to call the previous behavior. compile : This task depends on manipulateBytecode and then persists the Analysis object containing all incremental compiler information.

Here’s an example of how to hook the new manipulateBytecode key in your own plugin:

manipulateBytecode in Compile := { val previous = (manipulateBytecode in Compile).value doManipulateBytecode(previous) // Note: This must return a new Compiler.CompileResult with our changes. }

See #1714 for the full details of the implementation.

sbt 0.13.7

Fixes with compatibility implications

Maven artifact dependencies will limit their transitive dependencies to Compile rather than every configuration if no master configuration is found. #1586 by @jsuereth

rather than every configuration if no configuration is found. #1586 by @jsuereth The new natural whitspace handling parser is unable to cope with certain classes of Scala syntax. In particular, top-level pattern matches, or multi-value defintions are no longer supported.

Here are examples:

val x, y = project // BAD val x = project // val y = project // GOOD

Improvements

Natural whitespace handling. See below. #1606 by @rkrzewski, @ajozwik, and others at @WarsawScala

Adds support for publishing to a custom Maven local repository. See below. #1589/#1600 by @topping

Adds circular dependency check. See below. #1601 by @eed3si9n

Adds cached resolution (minigraph caching). See below. #1631 by @eed3si9n

Allows the ”-bin” Scala version suffix to specify a bincompat version. #1573 by @cunei

Adds support for publishing to file repositories specified in ~/.sbt/repositories . #1579 by @copumpkin

. #1579 by @copumpkin Adds support for publishing to a Maven repository with file URLs. #1618 by @jsuereth

URLs. #1618 by @jsuereth Don’t hardcode existing relations in TextAnalysisFormat . #1572 by @Duhemm

. #1572 by @Duhemm Adds developers key. #1590 by @jedesah

key. #1590 by @jedesah Will warn when none or multiple main classes detected. #1648 by @kretes

Bug fixes

Fixes issues with specifying scalaHome / scalaInstance and running tests. #1584 by @jsuereth

/ and running tests. #1584 by @jsuereth Fixes StackOverflow error in dependencies extraction with macro and name hashing. #1563/#1642/#1237/#1544 by @Duhemm

Fixes set every . #1591/#1430 by @cunei

. #1591/#1430 by @cunei Ivy no longer silently flops to HttpClient resolver when httpclient is on the classpath. #1602 by @jsuereth

resolver when httpclient is on the classpath. #1602 by @jsuereth Backports Ivy fix to not throw exceptions when modules are evicted. #1607/#1598 by @jsuereth

When resolving from a Maven repository, and unable to read maven-metadata.xml file (common given the divergence in Maven 3 and Ivy 2), we attempt to use LastModified timestamp in lieu of “published” timestamp. #1611/#1618 by @jsuereth

file (common given the divergence in Maven 3 and Ivy 2), we attempt to use timestamp in lieu of “published” timestamp. #1611/#1618 by @jsuereth Fixes NullPointerException when using ChainResolver and Maven repositories. #1611/#1618 by @jsuereth

and Maven repositories. #1611/#1618 by @jsuereth Fixes Resolver ’s url method dropping descriptorOptional and skipConsistencyCheck . #1621 by @tmandke

’s method dropping and . #1621 by @tmandke Revert useLatestSnapshot on updateOptions to default to false . Reverts chain resolver to previous behavior. #1683 by @jsuereth

Natural whitespace handling

Starting sbt 0.13.7, build.sbt will be parsed using a customized Scala parser. This eliminates the requirement to use blank line as the delimiter between each settings, and also allows blank lines to be inserted at arbitrary position within a block.

This feature can be disabled, if necessary, via the -Dsbt.parser.simple=true flag.

This feature was contributed by Andrzej Jozwik (@ajozwik), Rafał Krzewski (@rkrzewski) and others at @WarsawScala inspired by Typesafe’s @gkossakowski organizing multiple meetups and hackathons on how to patch sbt with the focus on this blank line issue. Dziękujemy! #1606

Custom Maven local repository location

Maven local repository is now resolved from the first of:

<localRepository/> element in ~/.m2/settings.xml

element in <localRepository/> element in $M2_HOME/conf/settings.xml , or

element in , or the default of ~/.m2/repository if neither of those configuration elements exist

If more Maven settings are required to be recovered, the proper thing to do is merge the two possible settings.xml files, then query against the element path of the merge. This code avoids the merge by checking sequentially.

#1589/#1600 by @topping

Circular dependency

By default circular dependencies are warned, but they do not halt the dependency resolution. Using the following setting, circular dependencies can be treated as an error.

updateOptions := updateOptions.value.withCircularDependencyLevel(CircularDependencyLevel.Error)

#1601 by @eed3si9n

Cached resolution (minigraph caching)

sbt 0.13.7 adds a new experimental update option called cached resolution, which replaces consolidated resolution:

updateOptions := updateOptions.value.withCachedResolution(true)

Unlike consolidated resolution, which only consolidated subprojects with identical dependency graph, cached resolution create an artificial graph for each direct dependency (minigraph) for all subprojects, resolves them independently, saves them into json file, and stiches the minigraphs together.

Once the minigraphs are resolved and saved as files, dependency resolution turns into a matter of loading json file from the second run onwards, which should complete in a matter of seconds even for large projects. Also, because the files are saved under a global ~/.sbt/0.13/dependency (or what’s specified by sbt.dependency.base flag), the resolution result is shared across all builds.

Breaking graphs into minigraphs allows partial resolution results to be shared, which scales better for subprojects with similar but slightly different dependencies, and also for making small changes to the dependencies graph over time. See documentation on cached resolution for more details.

#1631 by @eed3si9n

sbt 0.13.6

Fixes with compatibility implications

Maven Central Repository, Java.net Maven 2 Repository, Typesafe Repository, and sbt Plugin repository now defaults to HTTPS. (See below)

ThisProject used to resolve to the root project in a build even when it’s place in subproj/build.sbt . sbt 0.13.6 fixes it to resolve to the sub project. #1194/#1358 by @dansanduleac

used to resolve to the root project in a build even when it’s place in . sbt 0.13.6 fixes it to resolve to the sub project. #1194/#1358 by @dansanduleac Global plugins classpath used to be injected into every build. This will no longer be the case. #1347/#1352 by @dansanduleac

Fixes newer command in scripted. #1419 by @jroper

command in scripted. #1419 by @jroper Name hashing is enabled by default. inc.Analysis.empty also defaults to the one compatible with name hashing. #1546 by @gkossakowski

Improvements

Derived settings can replace previously-defined but non-default settings. #1036 by @dansanduleac

Sorts setting key names in the inspect tree view. #1313 by @2m

Uses separate update caches when cross compiling scala. #1330 by @pvlugter

Ensures sequences in analysis files are read in order. #1346 by @benjyw

Enables tab completion for scripted task. #1383 by @xuwei-k

Allows project reference to to a branch of a local git repository. #1409 by @vn971

Triggered Execution is now aware of rename or move of files. #1401 by @xuwei-k

No longer updates classifiers of projectDependencies . #1366/#1367 by @dansanduleac

. #1366/#1367 by @dansanduleac Selects the first test fingerprint for a test name for forked tests. #1450 by @pvlugter

Allows default auto plugins to be disabled. #1451 by @jsuereth

Allows keys defined inside build.sbt to be used from sbt shell. #1059/#1456

to be used from sbt shell. #1059/#1456 Updates internal Ivy instance to cache the results of dependency exclusion rules. #1476 by @eed3si9n

Adds Resolver.jcenterRepo and Resolver.bintrayRepo(owner, repo) to add Bintray easier. #1405 by @evgeny-goldin

and to add Bintray easier. #1405 by @evgeny-goldin AutoPlugins with no requirements enabled by allRequirements can now be disable dby the user. #1516 by @jsuereth

Bug fixes

Allows auto-generated projects to have overridden organization. #1315/#1378 by @jsuereth

Fixes auto plugins declared without package object. #1423 by @lpiepiora

Fixes plugin command. #1416/#1426 by @lpiepiora

command. #1416/#1426 by @lpiepiora Adds scala-jar to the list of jar artifacts recognized by CustomPomParser. #1400 by @dpratt

to the list of jar artifacts recognized by CustomPomParser. #1400 by @dpratt Fixes cross versioning to recognize version number with mutiple -tags. #1433 by @henrikengstrom

Works around “Not a simple type” breaking -Xfatal-warnings . #1477 by @puffnfresh

. #1477 by @puffnfresh Fixes sLog usage in tandem with the set comamnd #1486 @jsuereth

comamnd #1486 @jsuereth Test suites with whitespace will have prettier filenames #1487 @jsuereth

sbt no longer crashes when run in root directory #1488 by @jsuereth

set no longer removes any ++ scala version setting. #856/#1489 by @jsuereth

scala version setting. #856/#1489 by @jsuereth Fixes Scope.parseScopedKey . #1384 by @eed3si9n

. #1384 by @eed3si9n Fixes build.sbt errors causing ArrayIndexOutOfBoundsException due to invalid source in position. #1181 by @eed3si9n

errors causing due to invalid source in position. #1181 by @eed3si9n Fixes http.proxyPassword showing up in launcher’s update.log. #670 by @eed3si9n

showing up in launcher’s update.log. #670 by @eed3si9n Fixes config-classes leak in loading build files. #1524 by @jsuereth

Fixes name-conflicts in hashed settings class files. #1465 by @jsuereth

Fixes the pom conversion of dynamic revisions like 1.1+ . #1275 by @eed3si9n

. #1275 by @eed3si9n Fixes NullPointerError in tab completion by FileExamples . #1530 by @eed3si9n

in tab completion by . #1530 by @eed3si9n Fixes metabuild downloading unused Scala 2.10.2. #1439 by @eed3si9n

HTTPS related changes

Thanks to Sonatype, HTTPS access to Maven Central Repository is available to public. This is now enabled by default, but if HTTP is required for some reason the following system properties can be used:

-Dsbt.repository.secure=false

Java.net Maven 2 repository, Typesafe repository, and sbt Plugin repository also defaults to HTTPS.

#1494 by @rtyley, #1536 by @benmccann, and #1541 by @eed3si9n.

sbt 0.13.6 now allows enablePlugins and disablePlugins to be written directly in build.sbt . #1213/#1312 by @jsuereth

Unresolved dependencies error

sbt 0.13.6 will try to reconstruct dependencies tree when it fails to resolve a managed dependency. This is an approximation, but it should help you figure out where the problematic dependency is coming from. When possible sbt will display the source position next to the modules:

[warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: foundrylogic.vpp#vpp;2.2.1: not found [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] [warn] Note: Unresolved dependencies path: [warn] foundrylogic.vpp:vpp:2.2.1 [warn] +- org.apache.cayenne:cayenne-tools:3.0.2 [warn] +- org.apache.cayenne.plugins:maven-cayenne-plugin:3.0.2 (/foo/some-test/build.sbt#L28) [warn] +- d:d_2.10:0.1-SNAPSHOT

#528/#1422/#1447 by @eed3si9n

Eviction warnings

sbt 0.13.6 displays eviction warnings when it resolves your project’s managed dependencies via update task. Currently the eviction warnings are categorized into three layers: scalaVersion eviction, direct evictions, and transitive evictions. By default eviction warning on update task will display only scalaVersion evictin and direct evictions.

scalaVersion eviction warns you when scalaVersion is no longer effecitive. This happens when one of your dependency depends on a newer release of scala-library than your scalaVersion . Direct evctions are evictions related to your direct dependencies. Warnings are displayed only when API incompatibility is suspected. For Java libraries, Semantic Versioning is used for guessing, and for Scala libraries Second Segment versioning (second segment bump makes API incompatible) is used.

To display all eviction warnings with caller information, run evicted task.

[warn] There may be incompatibilities among your library dependencies. [warn] Here are some of the libraries that were evicted: [warn] * com.typesafe.akka:akka-actor_2.10:2.1.4 -> 2.3.4 (caller: com.typesafe.akka:akka-remote_2.10:2.3.4, org.w3:banana-sesame_2.10:0.4, org.w3:banana-rdf_2.10:0.4)

#1200/#1467 by @eed3si9n

Latest SNAPSHOTs

sbt 0.13.6 adds a new setting key called updateOptions for customizing the details of managed dependency resolution with update task. One of its flags is called lastestSnapshots , which controls the behavior of the chained resolver. Up until 0.13.6, sbt was picking the first -SNAPSHOT revision it found along the chain. When latestSnapshots is enabled (default: true ), it will look into all resolvers on the chain, and compare them using the publish date.

The tradeoff is probably a longer resolution time if you have many remote repositories on the build or you live away from the severs. So here’s how to disable it:

updateOptions := updateOptions.value.withLatestSnapshots(false)

#1514 by @eed3si9n

updateOptions can also be used to enable consolidated resolution for update task.

updateOptions := updateOptions.value.withConsolidatedResolution(true)

This feature is specifically targeted to address Ivy resolution is beging slow for multi-module projects #413. Consolidated resolution aims to fix this issue by artificially constructing an Ivy dependency graph for the unique managed dependencies. If two subprojects introduce identical external dependencies, both subprojects should consolidate to the same graph, and therefore resolve immediately for the second update . #1454 by @eed3si9n

sbt 0.13.5

sbt 0.13.5 is a technology preview of what’s to come to sbt 1.0 with enhancements like auto plugins and the necessary APIs changes and launcher for “sbt as a server.”, defined in the sbt-remote-control project.