From a9c41a19cde7a97f6acb54be8aae05eb7137d98e Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Mon, 2 Feb 2015 11:07:55 -0500 Subject: [PATCH 1/7] Merge notes --- notes/0.13.8.markdown | 109 +++++++++++++++++- notes/0.13.8/aether-resolvers.markdown | 44 ------- notes/0.13.8/cached-resolution-fixes.markdown | 13 --- .../0.13.8/enhance-bytecode-feature.markdown | 35 ------ notes/0.13.8/eviction-warning-fix.markdown | 15 --- notes/0.13.8/inconsistent-duplicates.markdown | 13 --- notes/0.13.8/no-mainclass.markdown | 13 --- notes/0.13.8/sequential-task.markdown | 40 ------- 8 files changed, 106 insertions(+), 176 deletions(-) delete mode 100644 notes/0.13.8/aether-resolvers.markdown delete mode 100644 notes/0.13.8/cached-resolution-fixes.markdown delete mode 100644 notes/0.13.8/enhance-bytecode-feature.markdown delete mode 100644 notes/0.13.8/eviction-warning-fix.markdown delete mode 100644 notes/0.13.8/inconsistent-duplicates.markdown delete mode 100644 notes/0.13.8/no-mainclass.markdown delete mode 100644 notes/0.13.8/sequential-task.markdown diff --git a/notes/0.13.8.markdown b/notes/0.13.8.markdown index 5b2566c2c..49dbed9bf 100644 --- a/notes/0.13.8.markdown +++ b/notes/0.13.8.markdown @@ -7,17 +7,30 @@ [@dwickern]: https://github.com/dwickern [@kretes]: https://github.com/kretes [@j-keck]: https://github.com/j-keck - + [SI-9027]: https://issues.scala-lang.org/browse/SI-9027 + [Custom-Settings0]: http://www.scala-sbt.org/0.13/tutorial/Custom-Settings.html + [647]: https://github.com/sbt/sbt/issues/647 + [679]: https://github.com/sbt/sbt/issues/679 [875]: https://github.com/sbt/sbt/issues/875 + [1001]: https://github.com/sbt/sbt/issues/1001 [1180]: https://github.com/sbt/sbt/issues/1180 + [1322]: https://github.com/sbt/sbt/issues/1322 [1542]: https://github.com/sbt/sbt/issues/1542 + [1615]: https://github.com/sbt/sbt/issues/1615 + [1616]: https://github.com/sbt/sbt/issues/1616 + [1634]: https://github.com/sbt/sbt/pull/1634 + [1676]: https://github.com/sbt/sbt/issues/1676 [1702]: https://github.com/sbt/sbt/pull/1702 + [1714]: https://github.com/sbt/sbt/issues/1714 [1738]: https://github.com/sbt/sbt/issues/1738 [1741]: https://github.com/sbt/sbt/pull/1741 [1746]: https://github.com/sbt/sbt/pull/1746 [1748]: https://github.com/sbt/sbt/issues/1748 + [1752]: https://github.com/sbt/sbt/pull/1752 + [1766]: https://github.com/sbt/sbt/pull/1766 [1771]: https://github.com/sbt/sbt/pull/1771 - [SI-9027]: https://issues.scala-lang.org/browse/SI-9027 + [1793]: https://github.com/sbt/sbt/pull/1793 + [1817]: https://github.com/sbt/sbt/pull/1817 ### Fixes with compatibility implications @@ -25,9 +38,12 @@ ### Improvements +- Adds Maven resolver plugin. See below. [#1793][1793] by [@jsuereth][@jsuereth] +- Adds project-level dependency exclusions. See below. [#1748][1748] by [@eed3si9n][@eed3si9n] +- Adds sequential tasks. See below. [#1817][1817]/[#1001][1001] by [@eed3si9n][@eed3si9n] - Discovered main classes will be sorted. [#1180][1180] by [@kretes][@kretes] - Implemented a new mechanism of forking javac, whereby errors are captured. Also more likely to run in-process. [#1702][1702] by [@jsuereth][@jsuereth] -- Adds project-level dependency exclusions. See below. +- `evicted` will display all evictions (including the ones not suspected of binary incompatibility). [#1615][1615] by [@eed3si9n][@eed3si9n] ### Fixes @@ -36,6 +52,14 @@ - Ignores hidden build files from the build. [#1746][1746] by [@j-keck][@j-keck] - Fixes build.sbt parsing of multiple import. [#1741][1741] by [@ajozwik][@ajozwik] - Fixes ANSI escape code for overwriting lines on Windows. [#1771][1771] by [@dwickern][@dwickern] +- sbt doesn't honor Maven's uniqueVersions (use sbt-maven-resolver to fix). [#1322][1322] by [@jsuereth][@jsuereth] +- sbt doesn't see new SNAPSHOT dependency versions in local maven repos (use withLatestSnapshots + sbt-maven-resolver to fix) [#321][321] by [@jsuereth][@jsuereth] +- Property in pom's version field results to wrong dependency resolution (use sbt-maven-resolver to fix). [#647][647] by [@jsuereth][@jsuereth] +- Maven local resolver with parent POM (use sbt-maven-resolver). [#1616][1616] by [@jsuereth][@jsuereth] +- Fixes cached resolution being too verbose. [#1752][1752] by [@eed3si9n][@eed3si9n] +- Fixes eviction warning being too noisy. [#1615][1615] by [@eed3si9n][@eed3si9n] +- Issues warning if multiple dependencies to a same library is found with different version. [#1634][1634] by [@eed3si9n][@eed3si9n] +- Removes "No main class detected" warning. [#1766][1766] by [@eed3si9n][@eed3si9n] ### Rolling back XML parsing workaround @@ -51,6 +75,31 @@ At the time, we thought adding parentheses around XML nodes could work around th [#1765][1765] by [@ajozwik][@ajozwik] +### 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): + + libraryDependencies += Defaults.sbtPluginExtra("org.scala-sbt" % "sbt-maven-resolver" % sbtVersion.value, + sbtBinaryVersion.value, scalaBinaryVersion.value) + +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. + +[#1793][1793] by [@jsuereth][@jsuereth] + ### Project-level dependency exclusions sbt 0.13.8 adds project-level dependency exclusions: @@ -60,3 +109,57 @@ sbt 0.13.8 adds project-level dependency exclusions: 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][1748] by [@eed3si9n][@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][Custom-Settings0] 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][1817]/[#1001][1001] by [@eed3si9n][@eed3si9n] + +### 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: + +1. `previousCompile`: This task returns the previously persisted `Analysis` object for this project. +2. `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. +3. `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. +4. `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][1714] for the full details of the implementation. diff --git a/notes/0.13.8/aether-resolvers.markdown b/notes/0.13.8/aether-resolvers.markdown deleted file mode 100644 index 9d58d7db6..000000000 --- a/notes/0.13.8/aether-resolvers.markdown +++ /dev/null @@ -1,44 +0,0 @@ - [@jsuereth]: https://github.com/jsuereth - [1676]: https://github.com/sbt/sbt/issues/1676 - [1322]: https://github.com/sbt/sbt/issues/1322 - [679]: https://github.com/sbt/sbt/issues/679 - [647]: https://github.com/sbt/sbt/issues/647 - [1616]: https://github.com/sbt/sbt/issues/1616 - -### Fixes with compatibility implications - -### Improvements - -### 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): - - libraryDependencies += Defaults.sbtPluginExtra("org.scala-sbt" % "sbt-maven-resolver" % sbtVersion.value, - sbtBinaryVersion.value, scalaBinaryVersion.value) - -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. - -### Bug fixes - -- sbt doesn't honor Maven's uniqueVersions (use sbt-maven-resolver to fix). [#1322][1322] by [@jsuereth][@jsuereth] -- sbt doesn't see new SNAPSHOT dependency versions in local maven repos (use withLatestSnapshots + sbt-maven-resolver to fix) [#321][321] by [@jsuereth][@jsuereth] -- Property in pom's version field results to wrong dependency resolution (use sbt-maven-resolver to fix). [#647][647] by [@jsuereth][@jsuereth] -- Maven local resolver with parent POM (use sbt-maven-resolver). [#1616][1616] by [@jsuereth][@jsuereth] - -// Possibly fixed, need verification. -- 1676 - SNAPSHOT dependency not updated ??? -- 679 - Incorrect Maven Snapshot file resolution ???? diff --git a/notes/0.13.8/cached-resolution-fixes.markdown b/notes/0.13.8/cached-resolution-fixes.markdown deleted file mode 100644 index 730f2ec75..000000000 --- a/notes/0.13.8/cached-resolution-fixes.markdown +++ /dev/null @@ -1,13 +0,0 @@ - [@cunei]: https://github.com/cunei - [@eed3si9n]: https://github.com/eed3si9n - [@gkossakowski]: https://github.com/gkossakowski - [@jsuereth]: https://github.com/jsuereth - [1752]: https://github.com/sbt/sbt/pull/1752 - -### Fixes with compatibility implications - -### Improvements - -### Bug fixes - -- Fixes cached resolution being too verbose. [#1752][1752] diff --git a/notes/0.13.8/enhance-bytecode-feature.markdown b/notes/0.13.8/enhance-bytecode-feature.markdown deleted file mode 100644 index 3525f1638..000000000 --- a/notes/0.13.8/enhance-bytecode-feature.markdown +++ /dev/null @@ -1,35 +0,0 @@ - [1714]: https://github.com/sbt/sbt/issues/1714 - - -### Fixes with compatibility implications - -### Improvements - -### 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: - -1. `previousCompile`: This task returns the previously persisted `Analysis` object for this project. -2. `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. -3. `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. -4. `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][1714] for the full details of the implementation. - -### Bug fixes diff --git a/notes/0.13.8/eviction-warning-fix.markdown b/notes/0.13.8/eviction-warning-fix.markdown deleted file mode 100644 index a0c2b2818..000000000 --- a/notes/0.13.8/eviction-warning-fix.markdown +++ /dev/null @@ -1,15 +0,0 @@ - [@cunei]: https://github.com/cunei - [@eed3si9n]: https://github.com/eed3si9n - [@gkossakowski]: https://github.com/gkossakowski - [@jsuereth]: https://github.com/jsuereth - [1615]: https://github.com/sbt/sbt/issues/1615 - -### Fixes with compatibility implications - -### Improvements - -- `evicted` will display all evictions (including the ones not suspected of binary incompatibility). [#1615][1615] by [@eed3si9n][@eed3si9n] - -### Bug fixes - -- Fixes eviction warning being too noisy. [#1615][1615] by [@eed3si9n][@eed3si9n] diff --git a/notes/0.13.8/inconsistent-duplicates.markdown b/notes/0.13.8/inconsistent-duplicates.markdown deleted file mode 100644 index f16deabfb..000000000 --- a/notes/0.13.8/inconsistent-duplicates.markdown +++ /dev/null @@ -1,13 +0,0 @@ - [@cunei]: https://github.com/cunei - [@eed3si9n]: https://github.com/eed3si9n - [@gkossakowski]: https://github.com/gkossakowski - [@jsuereth]: https://github.com/jsuereth - [1634]: https://github.com/sbt/sbt/pull/1634 - -### Fixes with compatibility implications - -### Improvements - -### Bug fixes - -- Issues warning if multiple dependencies to a same library is found with different version. [#1634][1634] by [@eed3si9n][@eed3si9n] diff --git a/notes/0.13.8/no-mainclass.markdown b/notes/0.13.8/no-mainclass.markdown deleted file mode 100644 index d38f70ff7..000000000 --- a/notes/0.13.8/no-mainclass.markdown +++ /dev/null @@ -1,13 +0,0 @@ - [@cunei]: https://github.com/cunei - [@eed3si9n]: https://github.com/eed3si9n - [@gkossakowski]: https://github.com/gkossakowski - [@jsuereth]: https://github.com/jsuereth - [1766]: https://github.com/sbt/sbt/pull/1766 - -### Fixes with compatibility implications - -### Improvements - -### Bug fixes - -- Removes "No main class detected" warning. [#1766][1766] by [@eed3si9n][@eed3si9n] diff --git a/notes/0.13.8/sequential-task.markdown b/notes/0.13.8/sequential-task.markdown deleted file mode 100644 index aeeecab91..000000000 --- a/notes/0.13.8/sequential-task.markdown +++ /dev/null @@ -1,40 +0,0 @@ - [@cunei]: https://github.com/cunei - [@eed3si9n]: https://github.com/eed3si9n - [@gkossakowski]: https://github.com/gkossakowski - [@jsuereth]: https://github.com/jsuereth - [1817]: https://github.com/sbt/sbt/pull/1817 - [1001]: https://github.com/sbt/sbt/issues/1001 - [Custom-Settings0]: http://www.scala-sbt.org/0.13/tutorial/Custom-Settings.html - -### Fixes with compatibility implications - -### Improvements - -### Bug fixes - -### 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][Custom-Settings0] 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][1817]/[#1001][1001] by [@eed3si9n][@eed3si9n] From 292b2a4ef7d592e7baf6f6572a4f69d2b8c6f73b Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Mon, 2 Feb 2015 11:18:36 -0500 Subject: [PATCH 2/7] Adds a note for #1340 --- notes/0.13.8.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/notes/0.13.8.markdown b/notes/0.13.8.markdown index 49dbed9bf..8d5162025 100644 --- a/notes/0.13.8.markdown +++ b/notes/0.13.8.markdown @@ -2,9 +2,10 @@ [@eed3si9n]: https://github.com/eed3si9n [@gkossakowski]: https://github.com/gkossakowski [@jsuereth]: https://github.com/jsuereth - + [@ajozwik]: https://github.com/ajozwik [@dwickern]: https://github.com/dwickern + [@Duhemm]: https://github.com/Duhemm [@kretes]: https://github.com/kretes [@j-keck]: https://github.com/j-keck [SI-9027]: https://issues.scala-lang.org/browse/SI-9027 @@ -15,6 +16,7 @@ [1001]: https://github.com/sbt/sbt/issues/1001 [1180]: https://github.com/sbt/sbt/issues/1180 [1322]: https://github.com/sbt/sbt/issues/1322 + [1340]: https://github.com/sbt/sbt/pull/1340 [1542]: https://github.com/sbt/sbt/issues/1542 [1615]: https://github.com/sbt/sbt/issues/1615 [1616]: https://github.com/sbt/sbt/issues/1616 @@ -44,6 +46,7 @@ - Discovered main classes will be sorted. [#1180][1180] by [@kretes][@kretes] - Implemented a new mechanism of forking javac, whereby errors are captured. Also more likely to run in-process. [#1702][1702] by [@jsuereth][@jsuereth] - `evicted` will display all evictions (including the ones not suspected of binary incompatibility). [#1615][1615] by [@eed3si9n][@eed3si9n] +- Better abstration to track new kinds of source dependencies. [#1340][1340] by [@Duhemm][@Duhemm] ### Fixes From aecbcbad0c89d3759993903c016722a5f2403726 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Mon, 2 Feb 2015 13:16:06 -0500 Subject: [PATCH 3/7] Add a note for #1787 --- notes/0.13.8.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/notes/0.13.8.markdown b/notes/0.13.8.markdown index 8d5162025..9dc6076b1 100644 --- a/notes/0.13.8.markdown +++ b/notes/0.13.8.markdown @@ -8,6 +8,7 @@ [@Duhemm]: https://github.com/Duhemm [@kretes]: https://github.com/kretes [@j-keck]: https://github.com/j-keck + [@xuwei-k]: https://github.com/xuwei-k [SI-9027]: https://issues.scala-lang.org/browse/SI-9027 [Custom-Settings0]: http://www.scala-sbt.org/0.13/tutorial/Custom-Settings.html [647]: https://github.com/sbt/sbt/issues/647 @@ -31,6 +32,7 @@ [1752]: https://github.com/sbt/sbt/pull/1752 [1766]: https://github.com/sbt/sbt/pull/1766 [1771]: https://github.com/sbt/sbt/pull/1771 + [1787]: https://github.com/sbt/sbt/pull/1787 [1793]: https://github.com/sbt/sbt/pull/1793 [1817]: https://github.com/sbt/sbt/pull/1817 @@ -46,7 +48,8 @@ - Discovered main classes will be sorted. [#1180][1180] by [@kretes][@kretes] - Implemented a new mechanism of forking javac, whereby errors are captured. Also more likely to run in-process. [#1702][1702] by [@jsuereth][@jsuereth] - `evicted` will display all evictions (including the ones not suspected of binary incompatibility). [#1615][1615] by [@eed3si9n][@eed3si9n] -- Better abstration to track new kinds of source dependencies. [#1340][1340] by [@Duhemm][@Duhemm] +- Better abstration to track new kinds of dependencies for incremental compiler. [#1340][1340] by [@Duhemm][@Duhemm] +- Source dependency uses `--depth 1` for git clone. [#1787][1787] by [@xuwei-k][@xuwei-k] ### Fixes From 3e48db9d1b7cdf7131a75b44f75661503bd5fe20 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Mon, 2 Feb 2015 13:41:54 -0500 Subject: [PATCH 4/7] Add a note for #1799 --- notes/0.13.8.markdown | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/notes/0.13.8.markdown b/notes/0.13.8.markdown index 9dc6076b1..1ba37e9be 100644 --- a/notes/0.13.8.markdown +++ b/notes/0.13.8.markdown @@ -7,6 +7,7 @@ [@dwickern]: https://github.com/dwickern [@Duhemm]: https://github.com/Duhemm [@kretes]: https://github.com/kretes + [@indrajitr]: https://github.com/indrajitr [@j-keck]: https://github.com/j-keck [@xuwei-k]: https://github.com/xuwei-k [SI-9027]: https://issues.scala-lang.org/browse/SI-9027 @@ -36,15 +37,16 @@ [1793]: https://github.com/sbt/sbt/pull/1793 [1817]: https://github.com/sbt/sbt/pull/1817 -### Fixes with compatibility implications +### Changes with compatibility implications - Rolls back XML parsing workaround. See below. +- Enables cross-version support for Scala sources. See below. ### Improvements -- Adds Maven resolver plugin. See below. [#1793][1793] by [@jsuereth][@jsuereth] -- Adds project-level dependency exclusions. See below. [#1748][1748] by [@eed3si9n][@eed3si9n] -- Adds sequential tasks. See below. [#1817][1817]/[#1001][1001] by [@eed3si9n][@eed3si9n] +- 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][1180] by [@kretes][@kretes] - Implemented a new mechanism of forking javac, whereby errors are captured. Also more likely to run in-process. [#1702][1702] by [@jsuereth][@jsuereth] - `evicted` will display all evictions (including the ones not suspected of binary incompatibility). [#1615][1615] by [@eed3si9n][@eed3si9n] @@ -81,6 +83,13 @@ At the time, we thought adding parentheses around XML nodes could work around th [#1765][1765] by [@ajozwik][@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-/` 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][1799] by [@indrajitr][@indrajitr] + ### Maven resolver plugin sbt 0.13.8 adds an extension point in the dependency resolution to customize Maven resolvers. From 71978ffffd7cbf881908d57f9a59ae0ea7ad4d2c Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Mon, 2 Feb 2015 13:46:08 -0500 Subject: [PATCH 5/7] Add a note for #1655/#1754 --- notes/0.13.8.markdown | 3 +++ 1 file changed, 3 insertions(+) diff --git a/notes/0.13.8.markdown b/notes/0.13.8.markdown index 1ba37e9be..daa0dcbcf 100644 --- a/notes/0.13.8.markdown +++ b/notes/0.13.8.markdown @@ -23,6 +23,7 @@ [1615]: https://github.com/sbt/sbt/issues/1615 [1616]: https://github.com/sbt/sbt/issues/1616 [1634]: https://github.com/sbt/sbt/pull/1634 + [1655]: https://github.com/sbt/sbt/issues/1655 [1676]: https://github.com/sbt/sbt/issues/1676 [1702]: https://github.com/sbt/sbt/pull/1702 [1714]: https://github.com/sbt/sbt/issues/1714 @@ -31,6 +32,7 @@ [1746]: https://github.com/sbt/sbt/pull/1746 [1748]: https://github.com/sbt/sbt/issues/1748 [1752]: https://github.com/sbt/sbt/pull/1752 + [1754]: https://github.com/sbt/sbt/pull/1754 [1766]: https://github.com/sbt/sbt/pull/1766 [1771]: https://github.com/sbt/sbt/pull/1771 [1787]: https://github.com/sbt/sbt/pull/1787 @@ -60,6 +62,7 @@ - Ignores hidden build files from the build. [#1746][1746] by [@j-keck][@j-keck] - Fixes build.sbt parsing of multiple import. [#1741][1741] by [@ajozwik][@ajozwik] - Fixes ANSI escape code for overwriting lines on Windows. [#1771][1771] by [@dwickern][@dwickern] +- Adds null check in incremental compiler's type tree extraction. [#1754][1754]/[#1655][1655] by [@Duhemm][@Duhemm] - sbt doesn't honor Maven's uniqueVersions (use sbt-maven-resolver to fix). [#1322][1322] by [@jsuereth][@jsuereth] - sbt doesn't see new SNAPSHOT dependency versions in local maven repos (use withLatestSnapshots + sbt-maven-resolver to fix) [#321][321] by [@jsuereth][@jsuereth] - Property in pom's version field results to wrong dependency resolution (use sbt-maven-resolver to fix). [#647][647] by [@jsuereth][@jsuereth] From 69171f40b30eb4aecced2f4ec6ad1c4b72e4e2cc Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Mon, 2 Feb 2015 14:56:13 -0500 Subject: [PATCH 6/7] Auto style fix --- util/collection/src/main/scala/sbt/Settings.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/collection/src/main/scala/sbt/Settings.scala b/util/collection/src/main/scala/sbt/Settings.scala index 326ebc9c5..38d2c2f5f 100644 --- a/util/collection/src/main/scala/sbt/Settings.scala +++ b/util/collection/src/main/scala/sbt/Settings.scala @@ -31,7 +31,7 @@ private final class Settings0[Scope](val data: Map[Scope, AttributeMap], val del def set[T](scope: Scope, key: AttributeKey[T], value: T): Settings[Scope] = { - val map = data getOrElse(scope, AttributeMap.empty) + val map = data getOrElse (scope, AttributeMap.empty) val newData = data.updated(scope, map.put(key, value)) new Settings0(newData, delegates) } From f42419bdd4cd6d9237e2603a248583fbabb6109d Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Mon, 2 Feb 2015 14:57:25 -0500 Subject: [PATCH 7/7] Adds addMavenResolverPlugin. #1808/#1793 --- build.sbt | 3 +-- main/src/main/scala/sbt/Defaults.scala | 6 ++++++ notes/0.13.8.markdown | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index f72038ecd..2cffb3cd8 100644 --- a/build.sbt +++ b/build.sbt @@ -468,8 +468,7 @@ def otherRootSettings = Seq( Scripted.scriptedPrescripted := { f => val inj = f / "project" / "maven.sbt" if (!inj.exists) { - IO.write(inj, """libraryDependencies += Defaults.sbtPluginExtra("org.scala-sbt" % "sbt-maven-resolver" % sbtVersion.value, - |sbtBinaryVersion.value, scalaBinaryVersion.value)""".stripMargin) + IO.write(inj, "addMavenResolverPlugin") // sLog.value.info(s"""Injected project/maven.sbt to $f""") } } diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index 5c66c1c1c..7206c8673 100755 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -1778,6 +1778,12 @@ trait BuildExtra extends BuildCommon with DefExtra { Seq(compose(onLoad, add), compose(onUnload, remove)) } + /** + * Adds Maven resolver plugin. + */ + def addMavenResolverPlugin: Setting[Seq[ModuleID]] = + libraryDependencies += sbtPluginExtra(ModuleID("org.scala-sbt", "sbt-maven-resolver", sbtVersion.value), sbtBinaryVersion.value, scalaBinaryVersion.value) + /** * Adds `dependency` as an sbt plugin for the specific sbt version `sbtVersion` and Scala version `scalaVersion`. * Typically, use the default values for these versions instead of specifying them explicitly. diff --git a/notes/0.13.8.markdown b/notes/0.13.8.markdown index daa0dcbcf..c85da9dd7 100644 --- a/notes/0.13.8.markdown +++ b/notes/0.13.8.markdown @@ -101,8 +101,7 @@ 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): - libraryDependencies += Defaults.sbtPluginExtra("org.scala-sbt" % "sbt-maven-resolver" % sbtVersion.value, - sbtBinaryVersion.value, scalaBinaryVersion.value) + 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.