sbt/notes/0.13.8.markdown

3.0 KiB

Fixes with compatibility implications

  • Rolls back XML parsing workaround. See below.

Improvements

  • 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
  • Adds project-level dependency exclusions. See below.

Fixes

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, encose them in <xml:group> tag, or parentheses.

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

[#1765][1765] by @ajozwik

Project-level dependency exclusions

sbt 0.13.8 adds 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. #1748 by @eed3si9n