sbt/notes/0.13.6.md

8.6 KiB

Changes since 0.13.6-M1

Fixes with compatibility implications

  • 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
  • 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

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
  • 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
  • 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

Bug fixes

enablePlugins/disablePlugins

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:

[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
[warn]        +- d:d_2.10:0.1-SNAPSHOT

#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

Consolidated resolution

sbt 0.13.6 adds a new setting key called updateOptions, which can 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