From faf0683a7aaac74f2e4e4d83493f0583770f991b Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sun, 1 May 2016 01:26:18 -0400 Subject: [PATCH 1/8] 0.13.11 notes --- notes/0.13.10.markdown | 126 ----------- ...sbt-ivy-snapshots-to-launchconfig.markdown | 10 - notes/0.13.10/always-honor-api-url.markdown | 10 - notes/0.13.10/bump-scalaversion.md | 10 - notes/0.13.10/dotty-awareness.md | 16 -- ...op-sealed-from-Append-typeclasses.markdown | 10 - ...iler-name-hashing-private-members.markdown | 17 -- notes/0.13.10/fix-snapshots.md | 14 -- .../help-highlighting-windows.markdown | 11 - notes/0.13.10/make-JCenter-opt-in.markdown | 7 - ...-to-fetch-compiler-bridge-sources.markdown | 19 -- notes/0.13.11.markdown | 209 ++++++++++++++++++ 12 files changed, 209 insertions(+), 250 deletions(-) delete mode 100644 notes/0.13.10.markdown delete mode 100644 notes/0.13.10/add-sbt-ivy-snapshots-to-launchconfig.markdown delete mode 100644 notes/0.13.10/always-honor-api-url.markdown delete mode 100644 notes/0.13.10/bump-scalaversion.md delete mode 100644 notes/0.13.10/dotty-awareness.md delete mode 100644 notes/0.13.10/drop-sealed-from-Append-typeclasses.markdown delete mode 100644 notes/0.13.10/fix-inc-compiler-name-hashing-private-members.markdown delete mode 100644 notes/0.13.10/fix-snapshots.md delete mode 100644 notes/0.13.10/help-highlighting-windows.markdown delete mode 100644 notes/0.13.10/make-JCenter-opt-in.markdown delete mode 100644 notes/0.13.10/use-ivyConfiguration-in-updateSbtClassifiers-in-compilers-to-fetch-compiler-bridge-sources.markdown create mode 100644 notes/0.13.11.markdown diff --git a/notes/0.13.10.markdown b/notes/0.13.10.markdown deleted file mode 100644 index 7f1cf76b7..000000000 --- a/notes/0.13.10.markdown +++ /dev/null @@ -1,126 +0,0 @@ - - [@eed3si9n]: https://github.com/eed3si9n - [@jsuereth]: https://github.com/jsuereth - [@dwijnand]: http://github.com/dwijnand - [@Duhemm]: http://github.com/Duhemm - [@gkossakowski]: https://github.com/gkossakowski - [@adriaanm]: https://github.com/adriaanm - [@jrudolph]: https://github.com/jrudolph - [@stuhood]: https://github.com/stuhood - [@pdalpra]: https://github.com/pdalpra - [@fkorotkov]: http://github.com/fkorotkov - [@hgiddens]: https://github.com/hgiddens - [@DavidPerezIngeniero]: https://github.com/DavidPerezIngeniero - [@timcharper]: https://github.com/timcharper - [2302]: https://github.com/sbt/sbt/issues/2302 - [2303]: https://github.com/sbt/sbt/pull/2303 - [1967]: https://github.com/sbt/sbt/issues/1967 - [2085]: https://github.com/sbt/sbt/pull/2085 - [2071]: https://github.com/sbt/sbt/issues/2071 - [2091]: https://github.com/sbt/sbt/pull/2091 - [2092]: https://github.com/sbt/sbt/pull/2092 - [2095]: https://github.com/sbt/sbt/pull/2095 - [2094]: https://github.com/sbt/sbt/pull/2094 - [2112]: https://github.com/sbt/sbt/pull/2112 - [2108]: https://github.com/sbt/sbt/pull/2108 - [2106]: https://github.com/sbt/sbt/pull/2106 - [2041]: https://github.com/sbt/sbt/issues/2041 - [2087]: https://github.com/sbt/sbt/issues/2087 - [2103]: https://github.com/sbt/sbt/pull/2103 - [2107]: https://github.com/sbt/sbt/issues/2107 - [2114]: https://github.com/sbt/sbt/pull/2114 - [2117]: https://github.com/sbt/sbt/pull/2117 - [2109]: https://github.com/sbt/sbt/issues/2109 - [2127]: https://github.com/sbt/sbt/pull/2127 - [14]: https://github.com/sbt/ivy/pull/14 - [2118]: https://github.com/sbt/sbt/issues/2118 - [2137]: https://github.com/sbt/sbt/pull/2137 - [2139]: https://github.com/sbt/sbt/pull/2139 - [2142]: https://github.com/sbt/sbt/pull/2142 - [2155]: https://github.com/sbt/sbt/issues/2155 - [2160]: https://github.com/sbt/sbt/pull/2160 - [2158]: https://github.com/sbt/sbt/pull/2158 - [1681]: https://github.com/sbt/sbt/issues/1681 - [2173]: https://github.com/sbt/sbt/pull/2173 - [JLine2]: https://github.com/jline/jline2 - [2151]: https://github.com/sbt/sbt/pull/2151 - [1750]: https://github.com/sbt/sbt/issues/1750 - [17]: https://github.com/sbt/ivy/pull/17 - [2163]: https://github.com/sbt/sbt/pull/2163 - [18]: https://github.com/sbt/ivy/pull/18 - [2186]: https://github.com/sbt/sbt/pull/2186 - [2197]: https://github.com/sbt/sbt/pull/2197 - [2192]: https://github.com/sbt/sbt/pull/2192 - [2201]: https://github.com/sbt/sbt/pull/2201 - [2214]: https://github.com/sbt/sbt/pull/2214 - [1933]: https://github.com/sbt/sbt/issues/1933 - [2258]: https://github.com/sbt/sbt/pull/2258 - [2228]: https://github.com/sbt/sbt/issues/2228 - [2271]: https://github.com/sbt/sbt/pull/2271 - [2285]: https://github.com/sbt/sbt/pull/2285 - [2256]: https://github.com/sbt/sbt/issues/2256 - [2272]: https://github.com/sbt/sbt/pull/2272 - [1968]: https://github.com/sbt/sbt/issues/1968 - [2264]: https://github.com/sbt/sbt/issues/2264 - [2172]: https://github.com/sbt/sbt/pull/2172 - [2120]: https://github.com/sbt/sbt/issues/2120 - [2399]: https://github.com/sbt/sbt/pull/2399 - -### Fixes with compatibility implications - -- sbt will no longer pass `-J` options to the local Java compiler. [#1968][1968]/[#2272][2272] by [@Duhemm][@Duhemm] - -### Improvements - -- Scala version used by the build is updated to 2.10.6. [#2311][2311] by [@eed3si9n][@eed3si9n] -- If `publishMavenStyle` is `true`, `update` task warns when it sees intransitive dependencies, which do not translate to Maven. [#2127][2127] by [@jsuereth][@jsuereth] -- Adds `Def.settings`, which facilitates mixing settings with seq of settings. See below. -- sbt Serialization is updated to 0.1.2. [2117][#2117] by [@dwijnand][@dwijnand] -- Hides the stack trace on compilation error in build definition. [#2071][2071]/[#2091][2091] by [@Duhemm][@Duhemm] -- Makes the dummy `Logger.Null` public. [#2094][2094] by [@pdalpra][@pdalpra] -- Uses diagnostic classes to get lines contents in local Java compiler. [#2108][2108]/[#2201][2201] by [@fkorotkov][@fkorotkov] -- Logs javaOptions used when forking. [#2087][2087]/[#2103][2103] by [@pdalpra][@pdalpra] -- Warns when javaOptions are defined but fork is set to false. [#2041][2041]/[#2103][2103] by [@pdalpra][@pdalpra] -- Adds an `Append.Sequence` instance for `List` to allow `+=`/`++=` on `developers` setting. [#2107][2107]/[#2114][2114] by [@pdalpra][@pdalpra] -- Fixes warnings, and other clean ups. [#2112][2112]/[#2137][2137]/[#2139][2139]/[#2142][2142] by [@pdalpra][@pdalpra] -- Adds `scalaCompilerBridgeSource` setting to specify the compiler brigde, and uses Ivy to retrieve it. [#2106][2106]/[#2197][2197] by [@Duhemm][@Duhemm] -- Adds `localIfFile` to `MavenRepository`, to force artifacts to be copied to the cache. [#2172][2172] by [@dwijnand][@dwijnand] -- Adds `Resolver.bintrayIvyRepo(owner, repo)`. [#2285][2285] by [@dwijnand][@dwijnand] - -### Bug fixes - -- Fixes the false positive of inconsistent duplicate warnings. [#1933][1933]/[#2258][2258] by - [@Duhemm][@Duhemm] -- Updated Ivy to merge IVY-1526 fix. [sbt/ivy#14][14]/[#2118][2118] by [@jsuereth][@jsuereth] -- Fixes `updateClassifiers` downloading updated snapshot sources and docs. - [#1750][1750]/[sbt/ivy#17][17]/[#2163][2163]/[sbt/ivy#18][18]/[#2186][2186] by [@dwijnand][@dwijnand] -- Fixes `updateClassifiers` on Ivy modules without `default` configuration. - [#2264][2264] by [@eed3si9n][@eed3si9n]/[@Duhemm][@Duhemm] -- Updated [JLine][JLine2] to version 2.13. [#1681][1681]/[#2173][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][1967]/[#2085][2085] by [@stuhood][@stuhood] -- Fixes classfile location detection. [#2214][2214] by [@stuhood][@stuhood] -- Fixes a few typos in keys descriptions. [#2092][2092] by [@pdalpra][@pdalpra] -- Avoids the use of `ListBuffer#readOnly`. [#2095][2095] by [@adriaanm][@adriaanm] -- Expands transitive dependency exclusions when using sbt-maven-resolver-plugin [#2109][2109] by [@jsuereth][@jsuereth] -- Fixes incremental compilation of traits by including private members into the API hash. [#2155][2155]/[#2160][2160] -- Fixes name hashing error messages. [#2158][2158] by [@stuhood][@stuhood] -- Adds more robustness to `tasks` and `settings` command. [#2192][2192] by [@DavidPerezIngeniero][@DavidPerezIngeniero] -- Fixes Java compilation inconsistencies between sbt and `javac` by always failing if the local Java compiler reported errors. [#2228][2228]/[#2271][2271] by [@Duhemm][@Duhemm] -- Fixes `JavaErrorParser` to parse non-compile-errors [#2256][2256]/[#2272][2272] by [@Duhemm][@Duhemm] - -- Fixes task scheduling performance on large builds by skipping checks in `sbt.Execute`. [#2302][2302]/[#2303][2303] by [@jrudolph][@jrudolph] -- Fixes autoImports for AutoPlugins for global configuration files. [#2120][2120]/[#2399][2399] by [@timcharper][@timcharper] - -### Def.settings - -Using `Def.settings` it is now possible to nicely define settings as such: - - val modelSettings = Def.settings( - sharedSettings, - libraryDependencies += foo - ) - -[#2151][2151] by [@dwijnand][@dwijnand]. diff --git a/notes/0.13.10/add-sbt-ivy-snapshots-to-launchconfig.markdown b/notes/0.13.10/add-sbt-ivy-snapshots-to-launchconfig.markdown deleted file mode 100644 index a43c1b001..000000000 --- a/notes/0.13.10/add-sbt-ivy-snapshots-to-launchconfig.markdown +++ /dev/null @@ -1,10 +0,0 @@ - - [@eed3si9n]: https://github.com/eed3si9n - -### Fixes with compatibility implications - -### Improvements - -### Bug fixes - -- Fixes launcher configuration to add `sbt-ivy-snapshots` repository to resolve nightly builds. [@eed3si9n][@eed3si9n] diff --git a/notes/0.13.10/always-honor-api-url.markdown b/notes/0.13.10/always-honor-api-url.markdown deleted file mode 100644 index ef7133b6e..000000000 --- a/notes/0.13.10/always-honor-api-url.markdown +++ /dev/null @@ -1,10 +0,0 @@ -[@jkinkead]: https://github.com/jkinkead -[2262]: https://github.com/sbt/sbt/pull/2262 - -### Fixes with compatibility implications - -### Improvements - -- The setting `apiURL` used to be ignored if `autoAPIMappings` was `false`. It will now be inserted into the built POM file regardless of the value of `autoAPIMappings`. [#2262][2262] by [@jkinkead][@jkinkead] - -### Bug fixes diff --git a/notes/0.13.10/bump-scalaversion.md b/notes/0.13.10/bump-scalaversion.md deleted file mode 100644 index 0c7fcfb19..000000000 --- a/notes/0.13.10/bump-scalaversion.md +++ /dev/null @@ -1,10 +0,0 @@ - - [@eed3si9n]: https://github.com/eed3si9n - -### Fixes with compatibility implications - -### Improvements - -- Updated Scala version used by the build to 2.10.6. - -### Bug fixes diff --git a/notes/0.13.10/dotty-awareness.md b/notes/0.13.10/dotty-awareness.md deleted file mode 100644 index 5660f9bcd..000000000 --- a/notes/0.13.10/dotty-awareness.md +++ /dev/null @@ -1,16 +0,0 @@ - - [Dotty]: https://github.com/lampepfl/dotty - [@smarter]: https://github.com/smarter - -### Fixes with compatibility implications - -### Improvements - -- sbt is now aware of [Dotty][Dotty], it will assume - that Dotty is used when `scalaVersion` starts with `0.`, the sbt - compiler-bridge does not support Dotty but a separate compiler-bridge is being - developed at https://github.com/smarter/dotty-bridge and an example project - that uses it is available at https://github.com/smarter/dotty-example-project - by [@smarter][@smarter]. - -### Bug fixes diff --git a/notes/0.13.10/drop-sealed-from-Append-typeclasses.markdown b/notes/0.13.10/drop-sealed-from-Append-typeclasses.markdown deleted file mode 100644 index 6ad216120..000000000 --- a/notes/0.13.10/drop-sealed-from-Append-typeclasses.markdown +++ /dev/null @@ -1,10 +0,0 @@ - - [1171]: https://github.com/sbt/sbt/issues/1171 - [2322]: https://github.com/sbt/sbt/pull/2322 - -### Fixes with compatibility implications - -### Improvements -- Drops `sealed` from the typeclasses in Append. [#2322][] by [@dwijnand][] - -### Bug fixes diff --git a/notes/0.13.10/fix-inc-compiler-name-hashing-private-members.markdown b/notes/0.13.10/fix-inc-compiler-name-hashing-private-members.markdown deleted file mode 100644 index 1b7600352..000000000 --- a/notes/0.13.10/fix-inc-compiler-name-hashing-private-members.markdown +++ /dev/null @@ -1,17 +0,0 @@ - - [@Duhemm]: http://github.com/Duhemm - [@gkossakowski]: https://github.com/gkossakowski - [2155]: https://github.com/sbt/sbt/issues/2155 - [2160]: https://github.com/sbt/sbt/pull/2160 - [2324]: https://github.com/sbt/sbt/issues/2324 - [2325]: https://github.com/sbt/sbt/pull/2325 - -### Fixes with compatibility implications - -### Improvements - -### Bug fixes - -- Fixes incremental compilation of traits by including private members into the API hash. [#2155][2155]/[#2160][2160] by - [@Duhemm][@Duhemm] -- Fixes name hashing by removing class private members from the hash. [#2324][2324]/[#2325][2325] by [@gkossakowski][@gkossakowski] diff --git a/notes/0.13.10/fix-snapshots.md b/notes/0.13.10/fix-snapshots.md deleted file mode 100644 index 59e946757..000000000 --- a/notes/0.13.10/fix-snapshots.md +++ /dev/null @@ -1,14 +0,0 @@ - - [@eed3si9n]: https://github.com/eed3si9n - [1514]: https://github.com/sbt/sbt/issues/1514 - [1616]: https://github.com/sbt/sbt/issues/1616 - [2313]: https://github.com/sbt/sbt/pull/2313 - -### Fixes with compatibility implications - -- Fixes update option's `withLatestSnapshots` so it handles modules without an artifact. This flag will be enabled by default. - [#1514][1514]/[#1616][1616]/[#2313][2313] by [@eed3si9n][@eed3si9n] - -### Improvements - -### Bug fixes diff --git a/notes/0.13.10/help-highlighting-windows.markdown b/notes/0.13.10/help-highlighting-windows.markdown deleted file mode 100644 index c4de37be1..000000000 --- a/notes/0.13.10/help-highlighting-windows.markdown +++ /dev/null @@ -1,11 +0,0 @@ -[@eamelink]: https://github.com/eamelink -[1982]: https://github.com/sbt/sbt/issues/1982 - -### Changes with compatibility implications - -### Improvements - -### Fixes - -- Highlighting of partial task search results now only uses ANSI color -codes are supported on Windows [#1982][1982] by [@eamelink][@eamelink] diff --git a/notes/0.13.10/make-JCenter-opt-in.markdown b/notes/0.13.10/make-JCenter-opt-in.markdown deleted file mode 100644 index 6ca9bec03..000000000 --- a/notes/0.13.10/make-JCenter-opt-in.markdown +++ /dev/null @@ -1,7 +0,0 @@ - - [@eed3si9n]: https://github.com/eed3si9n - [2217]: https://github.com/sbt/sbt/issues/2217 - -### Fixes with compatibility implications - -- sbt 0.13.10 adds a new setting `useJCenter`, which is set to `false` by default. When set to `true`, JCenter will be placed as the first external resolver to find library dependencies. [#2217][2217] by [@eed3si9n][@eed3si9n] diff --git a/notes/0.13.10/use-ivyConfiguration-in-updateSbtClassifiers-in-compilers-to-fetch-compiler-bridge-sources.markdown b/notes/0.13.10/use-ivyConfiguration-in-updateSbtClassifiers-in-compilers-to-fetch-compiler-bridge-sources.markdown deleted file mode 100644 index f95c35348..000000000 --- a/notes/0.13.10/use-ivyConfiguration-in-updateSbtClassifiers-in-compilers-to-fetch-compiler-bridge-sources.markdown +++ /dev/null @@ -1,19 +0,0 @@ - - [@Duhemm]: http://github.com/Duhemm - [2106]: https://github.com/sbt/sbt/pull/2106 - [2197]: https://github.com/sbt/sbt/pull/2197 - [2336]: https://github.com/sbt/sbt/issues/2336 - -### Fixes with compatibility implications - -### Improvements - -- Adds configurable compiler bridge. See below. - -### Bug fixes - -### Configurable Scala compiler bridge - -sbt 0.13.10 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][2106]/[#2197][2197]/[#2336][2336] by [@Duhemm][@Duhemm] diff --git a/notes/0.13.11.markdown b/notes/0.13.11.markdown new file mode 100644 index 000000000..3b9d369a8 --- /dev/null +++ b/notes/0.13.11.markdown @@ -0,0 +1,209 @@ + + [@eed3si9n]: https://github.com/eed3si9n + [@jsuereth]: https://github.com/jsuereth + [@dwijnand]: http://github.com/dwijnand + [@Duhemm]: http://github.com/Duhemm + [@gkossakowski]: https://github.com/gkossakowski + [@adriaanm]: https://github.com/adriaanm + [@jrudolph]: https://github.com/jrudolph + [@stuhood]: https://github.com/stuhood + [@pdalpra]: https://github.com/pdalpra + [@fkorotkov]: http://github.com/fkorotkov + [@hgiddens]: https://github.com/hgiddens + [@DavidPerezIngeniero]: https://github.com/DavidPerezIngeniero + [@romanowski]: https://github.com/romanowski + [@timcharper]: https://github.com/timcharper + [@smarter]: https://github.com/smarter + [@retronym]: https://github.com/retronym + + [Dotty]: https://github.com/lampepfl/dotty + [JLine2]: https://github.com/jline/jline2 + + [14]: https://github.com/sbt/ivy/pull/14 + [17]: https://github.com/sbt/ivy/pull/17 + [18]: https://github.com/sbt/ivy/pull/18 + + [1171]: https://github.com/sbt/sbt/issues/1171 + [1514]: https://github.com/sbt/sbt/issues/1514 + [1616]: https://github.com/sbt/sbt/issues/1616 + [1681]: https://github.com/sbt/sbt/issues/1681 + [1750]: https://github.com/sbt/sbt/issues/1750 + [1827]: https://github.com/sbt/sbt/issues/1827 + [1933]: https://github.com/sbt/sbt/issues/1933 + [1967]: https://github.com/sbt/sbt/issues/1967 + [1968]: https://github.com/sbt/sbt/issues/1968 + [2041]: https://github.com/sbt/sbt/issues/2041 + [2071]: https://github.com/sbt/sbt/issues/2071 + [2085]: https://github.com/sbt/sbt/pull/2085 + [2087]: https://github.com/sbt/sbt/issues/2087 + [2091]: https://github.com/sbt/sbt/pull/2091 + [2092]: https://github.com/sbt/sbt/pull/2092 + [2094]: https://github.com/sbt/sbt/pull/2094 + [2095]: https://github.com/sbt/sbt/pull/2095 + [2103]: https://github.com/sbt/sbt/pull/2103 + [2106]: https://github.com/sbt/sbt/pull/2106 + [2107]: https://github.com/sbt/sbt/issues/2107 + [2108]: https://github.com/sbt/sbt/pull/2108 + [2109]: https://github.com/sbt/sbt/issues/2109 + [2112]: https://github.com/sbt/sbt/pull/2112 + [2114]: https://github.com/sbt/sbt/pull/2114 + [2117]: https://github.com/sbt/sbt/pull/2117 + [2118]: https://github.com/sbt/sbt/issues/2118 + [2120]: https://github.com/sbt/sbt/issues/2120 + [2127]: https://github.com/sbt/sbt/pull/2127 + [2137]: https://github.com/sbt/sbt/pull/2137 + [2139]: https://github.com/sbt/sbt/pull/2139 + [2142]: https://github.com/sbt/sbt/pull/2142 + [2151]: https://github.com/sbt/sbt/pull/2151 + [2155]: https://github.com/sbt/sbt/issues/2155 + [2158]: https://github.com/sbt/sbt/pull/2158 + [2160]: https://github.com/sbt/sbt/pull/2160 + [2163]: https://github.com/sbt/sbt/pull/2163 + [2172]: https://github.com/sbt/sbt/pull/2172 + [2173]: https://github.com/sbt/sbt/pull/2173 + [2186]: https://github.com/sbt/sbt/pull/2186 + [2192]: https://github.com/sbt/sbt/pull/2192 + [2197]: https://github.com/sbt/sbt/pull/2197 + [2201]: https://github.com/sbt/sbt/pull/2201 + [2214]: https://github.com/sbt/sbt/pull/2214 + [2217]: https://github.com/sbt/sbt/issues/2217 + [2228]: https://github.com/sbt/sbt/issues/2228 + [2256]: https://github.com/sbt/sbt/issues/2256 + [2258]: https://github.com/sbt/sbt/pull/2258 + [2261]: https://github.com/sbt/sbt/pull/2261 + [2264]: https://github.com/sbt/sbt/issues/2264 + [2266]: https://github.com/sbt/sbt/issues/2266 + [2271]: https://github.com/sbt/sbt/pull/2271 + [2272]: https://github.com/sbt/sbt/pull/2272 + [2285]: https://github.com/sbt/sbt/pull/2285 + [2302]: https://github.com/sbt/sbt/issues/2302 + [2303]: https://github.com/sbt/sbt/pull/2303 + [2311]: https://github.com/sbt/sbt/pull/2311 + [2313]: https://github.com/sbt/sbt/pull/2313 + [2322]: https://github.com/sbt/sbt/pull/2322 + [2324]: https://github.com/sbt/sbt/issues/2324 + [2325]: https://github.com/sbt/sbt/pull/2325 + [2336]: https://github.com/sbt/sbt/issues/2336 + [2343]: https://github.com/sbt/sbt/pull/2343 + [2344]: https://github.com/sbt/sbt/pull/2344 + [2354]: https://github.com/sbt/sbt/pull/2354 + [2399]: https://github.com/sbt/sbt/pull/2399 + [2453]: https://github.com/sbt/sbt/pull/2453 + [2467]: https://github.com/sbt/sbt/pull/2467 + [101]: https://github.com/sbt/sbt-launcher-package/pull/101 + [105]: https://github.com/sbt/sbt-launcher-package/pull/105 + +### 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][2217]/[#2467][2467] by [@eed3si9n][@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][1827] by [@eed3si9n][@eed3si9n] +- Fixes update option's `withLatestSnapshots` so it handles modules without an artifact. This flag will be enabled by default. + [#1514][1514]/[#1616][1616]/[#2313][2313] by [@eed3si9n][@eed3si9n] +- No longer passes `-J` options to the local Java compiler. [#1968][1968]/[#2272][2272] by [@Duhemm][@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][2120]/[#2399][2399] by [@timcharper][@timcharper] + +### Improvements + +- Adds configurable compiler bridge. See below. +- Adds initial support for [Dotty][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][2311] by [@eed3si9n][@eed3si9n] +- If `publishMavenStyle` is `true`, `update` task warns when it sees intransitive dependencies, which do not translate to Maven. [#2127][2127] by [@jsuereth][@jsuereth] +- Adds `Def.settings`, which facilitates mixing settings with seq of settings. See below. +- sbt Serialization is updated to 0.1.2. [#2117][2117] by [@dwijnand][@dwijnand] +- Hides the stack trace on compilation error in build definition. [#2071][2071]/[#2091][2091] by [@Duhemm][@Duhemm] +- Makes the dummy `Logger.Null` public. [#2094][2094] by [@pdalpra][@pdalpra] +- Uses diagnostic classes to get lines contents in local Java compiler. [#2108][2108]/[#2201][2201] by [@fkorotkov][@fkorotkov] +- Adds logging of javaOptions. [#2087][2087]/[#2103][2103] by [@pdalpra][@pdalpra] +- Warns when javaOptions are defined but fork is set to false. [#2041][2041]/[#2103][2103] by [@pdalpra][@pdalpra] +- Adds an `Append.Sequence` instance for `List` to allow `+=`/`++=` on `developers` setting. [#2107][2107]/[#2114][2114] by [@pdalpra][@pdalpra] +- Drops `sealed` from the typeclasses in `Append`. [#2322][2322] by [@dwijnand][@dwijnand] +- Fixes compilation warnings in sbt's codebase, and other clean ups. [#2112][2112]/[#2137][2137]/[#2139][2139]/[#2142][2142] by [@pdalpra][@pdalpra] +- Adds `localIfFile` to `MavenRepository`, to force artifacts to be copied to the cache. [#2172][2172] by [@dwijnand][@dwijnand] +- Adds `Resolver.bintrayIvyRepo(owner, repo)`. [#2285][2285] by [@dwijnand][@dwijnand] +- Non-static annotation changes are no longer tracked by the incremental compiler. [#2343][2343] by [@romanowski][@romanowski] +- Reduces the memory usage of API info extraction in the incremental compiler. [#2343][2343] by [@adriaanm][@adriaanm] +- Memory-related options can now be overridden individually via the `-J` options. [sbt/sbt-launcher-package#105][105] + +### Bug fixes + +- Fixes the false positive of inconsistent duplicate warnings. [#1933][1933]/[#2258][2258] by + [@Duhemm][@Duhemm] +- Fixes task scheduling performance on large builds by skipping checks in `sbt.Execute`. [#2302][2302]/[#2303][2303] by [@jrudolph][@jrudolph] +- Fixes changes in value classes by registering signatures of method before and after erasure. [#1171][1171]/[#2261][2261] by [@Duhemm][@Duhemm] +- Updated Ivy to merge IVY-1526 fix. [sbt/ivy#14][14]/[#2118][2118] by [@jsuereth][@jsuereth] +- Fixes `updateClassifiers` downloading updated snapshot sources and docs. + [#1750][1750]/[sbt/ivy#17][17]/[#2163][2163]/[sbt/ivy#18][18]/[#2186][2186] by [@dwijnand][@dwijnand] +- Fixes `updateClassifiers` on Ivy modules without `default` configuration. + [#2264][2264] by [@eed3si9n][@eed3si9n]/[@Duhemm][@Duhemm] +- Updated [JLine][JLine2] to version 2.13. [#1681][1681]/[#2173][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][1967]/[#2085][2085] by [@stuhood][@stuhood] +- Fixes classfile location detection. [#2214][2214] by [@stuhood][@stuhood] +- Fixes a few typos in keys descriptions. [#2092][2092] by [@pdalpra][@pdalpra] +- Avoids the use of `ListBuffer#readOnly`. [#2095][2095] by [@adriaanm][@adriaanm] +- Expands transitive dependency exclusions when using sbt-maven-resolver-plugin [#2109][2109] by [@jsuereth][@jsuereth] +- Fixes incremental compilation of traits by including private members into the API hash. [#2155][2155]/[#2160][2160] by + [@Duhemm][@Duhemm] +- Fixes name hashing by removing class private members from the hash. [#2324][2324]/[#2325][2325] by [@gkossakowski][@gkossakowski] +- Fixes name hashing error messages. [#2158][2158] by [@stuhood][@stuhood] +- Adds more robustness to `tasks` and `settings` command. [#2192][2192] by [@DavidPerezIngeniero][@DavidPerezIngeniero] +- Fixes Java compilation inconsistencies between sbt and `javac` by always failing if the local Java compiler reported errors. [#2228][2228]/[#2271][2271] by [@Duhemm][@Duhemm] +- Fixes `JavaErrorParser` to parse non-compile-errors [#2256][2256]/[#2272][2272] by [@Duhemm][@Duhemm] +- Fixes launcher configuration to add `sbt-ivy-snapshots` repository to resolve nightly builds. [@eed3si9n][@eed3si9n] +- Fixes performance issues during tree traversal in the incremental compiler. [#2343][2343] by [@adriaanm][@adriaanm] +- Fixes the tracking of self types and F-bounded existential types in the incremental compiler. [#2343][2343] by [@adriaanm][@adriaanm] +- Avoid CCE when scalac internally uses `compileLate`. [#2453][2453] by [@retronym][@retronym] +- Fixes the memory-related options overriding `SBT_OPTS`. [sbt/sbt-launcher-package#101][101] by [@eed3si9n][@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][2106]/[#2197][2197]/[#2336][2336] by [@Duhemm][@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](https://github.com/smarter/dotty-bridge) and +an example project that uses it is available at [smarter/dotty-example-project](https://github.com/smarter/dotty-example-project). + +[#2344][2344] by [@smarter][@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][2266]/[#2354][2354] by [@eed3si9n][@eed3si9n] + +### Def.settings + +Using `Def.settings` it is now possible to nicely define settings as such: + + val modelSettings = Def.settings( + sharedSettings, + libraryDependencies += foo + ) + +[#2151][2151] by [@dwijnand][@dwijnand] From b0863600466e1cab1adf319d69362e864cb37ed6 Mon Sep 17 00:00:00 2001 From: Martin Duhem Date: Sun, 31 Jan 2016 17:01:55 +0100 Subject: [PATCH 2/8] Update bridge retrieval in `consoleProject` Fixes sbt/sbt#2428 --- main/src/main/scala/sbt/ConsoleProject.scala | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main/src/main/scala/sbt/ConsoleProject.scala b/main/src/main/scala/sbt/ConsoleProject.scala index c8a3e283b..4158e3364 100644 --- a/main/src/main/scala/sbt/ConsoleProject.scala +++ b/main/src/main/scala/sbt/ConsoleProject.scala @@ -7,7 +7,7 @@ import sbt.util.Logger import java.io.File import sbt.librarymanagement.Resolver import sbt.internal.librarymanagement.{ InlineIvyConfiguration, IvyPaths } -import sbt.internal.inc.{ AnalyzingCompiler, ClasspathOptions, IncrementalCompilerImpl } +import sbt.internal.inc.{ AnalyzingCompiler, ClasspathOptions, IncrementalCompilerImpl, ScalaInstance } object ConsoleProject { def apply(state: State, extra: String, cleanupCommands: String = "", options: Seq[String] = Nil)(implicit log: Logger): Unit = { @@ -15,13 +15,13 @@ object ConsoleProject { val cpImports = new Imports(extracted, state) val bindings = ("currentState" -> state) :: ("extracted" -> extracted) :: ("cpHelpers" -> cpImports) :: Nil val unit = extracted.currentUnit - val localOnly = false - val lock = None - val checksums = Nil - val ivyPaths = new IvyPaths(unit.unit.localBase, bootIvyHome(state.configuration)) - val ivyConfiguration = new InlineIvyConfiguration(ivyPaths, Resolver.withDefaultResolvers(Nil), - Nil, Nil, localOnly, lock, checksums, None, log) - val compiler: AnalyzingCompiler = Compiler.compilers(ClasspathOptions.repl, ivyConfiguration)(state.configuration, log) match { case IncrementalCompilerImpl.Compilers(scalac, _) => scalac } + val (_, ivyConf) = extracted.runTask(Keys.ivyConfiguration, state) + val scalaInstance = { + val scalaProvider = state.configuration.provider.scalaProvider + ScalaInstance(scalaProvider.version, scalaProvider.launcher) + } + val sourcesModule = extracted.get(Keys.scalaCompilerBridgeSource) + val compiler = Compiler.scalaCompiler(scalaInstance, ClasspathOptions.repl, None, ivyConf, sourcesModule)(state.configuration, log) val imports = BuildUtil.getImports(unit.unit) ++ BuildUtil.importAll(bindings.map(_._1)) val importString = imports.mkString("", ";\n", ";\n\n") val initCommands = importString + extra From 447e2f7f8c2300087950f12c1a807e02fbcb6e4a Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Wed, 13 Jan 2016 12:56:28 -0500 Subject: [PATCH 3/8] Inter-project dependency tracking. Fixes #2266 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 ) --- ivy/src/main/scala/sbt/TrackLevel.scala | 33 ++++++++ main/src/main/scala/sbt/Defaults.scala | 75 ++++++++++++++++++- main/src/main/scala/sbt/Keys.scala | 5 ++ notes/0.13.10/internal-tracking.md | 32 ++++++++ .../project/internal-tracking/a/A.scala | 3 + .../project/internal-tracking/b/B.scala | 5 ++ .../project/internal-tracking/build.sbt | 25 +++++++ .../project/internal-tracking/c/C.scala | 3 + .../project/internal-tracking/d/D.scala | 3 + .../sbt-test/project/internal-tracking/test | 11 +++ 10 files changed, 191 insertions(+), 4 deletions(-) create mode 100644 ivy/src/main/scala/sbt/TrackLevel.scala create mode 100644 notes/0.13.10/internal-tracking.md create mode 100644 sbt/src/sbt-test/project/internal-tracking/a/A.scala create mode 100644 sbt/src/sbt-test/project/internal-tracking/b/B.scala create mode 100644 sbt/src/sbt-test/project/internal-tracking/build.sbt create mode 100644 sbt/src/sbt-test/project/internal-tracking/c/C.scala create mode 100644 sbt/src/sbt-test/project/internal-tracking/d/D.scala create mode 100644 sbt/src/sbt-test/project/internal-tracking/test diff --git a/ivy/src/main/scala/sbt/TrackLevel.scala b/ivy/src/main/scala/sbt/TrackLevel.scala new file mode 100644 index 000000000..4c5ae28fc --- /dev/null +++ b/ivy/src/main/scala/sbt/TrackLevel.scala @@ -0,0 +1,33 @@ +package sbt + +/** + * An enumeration defining the tracking of dependencies. A level includes all of the levels + * with id larger than its own id. For example, Warn (id=3) includes Error (id=4). + */ +object TrackLevel { + case object NoTracking extends TrackLevel { + override def id: Int = 0 + } + case object TrackIfMissing extends TrackLevel { + override def id: Int = 1 + } + case object TrackAlways extends TrackLevel { + override def id: Int = 10 + } + + private[sbt] def apply(x: Int): TrackLevel = + x match { + case 0 => NoTracking + case 1 => TrackIfMissing + case 10 => TrackAlways + } + + def intersection(a: TrackLevel, b: TrackLevel): TrackLevel = + if (a.id < b.id) a + else b + def intersectionAll(vs: List[TrackLevel]): TrackLevel = vs reduceLeft intersection +} + +sealed trait TrackLevel { + def id: Int +} diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index 0052042e6..62ee38116 100755 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -115,6 +115,8 @@ object Defaults extends BuildCommon { internalConfigurationMap :== Configurations.internalMap _, credentials :== Nil, exportJars :== false, + trackInternalDependencies :== TrackLevel.TrackAlways, + exportToInternal :== TrackLevel.TrackAlways, retrieveManaged :== false, retrieveManagedSync :== false, configurationsToRetrieve :== None, @@ -1067,6 +1069,9 @@ object Classpaths { unmanagedClasspath <<= unmanagedDependencies, managedClasspath := managedJars(classpathConfiguration.value, classpathTypes.value, update.value), exportedProducts <<= exportProductsTask, + exportedProductsAlways <<= trackedExportedProducts(TrackLevel.TrackAlways), + exportedProductsIfMissing <<= trackedExportedProducts(TrackLevel.TrackIfMissing), + exportedProductsNoTracking <<= trackedExportedProducts(TrackLevel.NoTracking), unmanagedJars := findUnmanagedJars(configuration.value, unmanagedBase.value, includeFilter in unmanagedJars value, excludeFilter in unmanagedJars value) ).map(exportClasspath) @@ -1618,6 +1623,52 @@ object Classpaths { val x2 = copyResources.value classDirectory.value :: Nil } + // This is a variant of exportProductsTask with tracking + private[sbt] def trackedExportedProducts(track: TrackLevel): Initialize[Task[Classpath]] = Def.task { + val art = (artifact in packageBin).value + val module = projectID.value + val config = configuration.value + for { (f, analysis) <- trackedProductsImplTask(track).value } yield APIMappings.store(analyzed(f, analysis), apiURL.value).put(artifact.key, art).put(moduleID.key, module).put(configuration.key, config) + } + private[this] def trackedProductsImplTask(track: TrackLevel): Initialize[Task[Seq[(File, Analysis)]]] = + Def.taskDyn { + val useJars = exportJars.value + val jar = (artifactPath in packageBin).value + val dirs = productDirectories.value + def containsClassFile(fs: List[File]): Boolean = + (fs exists { dir => + (dir ** DirectoryFilter).get exists { d => + (d * "*.class").get.nonEmpty + } + }) + TrackLevel.intersection(track, exportToInternal.value) match { + case TrackLevel.TrackAlways if (useJars) => + Def.task { + Seq((packageBin.value, compile.value)) + } + case TrackLevel.TrackAlways => + Def.task { + products.value map { (_, compile.value) } + } + case TrackLevel.TrackIfMissing if (useJars && !jar.exists) => + Def.task { + Seq((packageBin.value, compile.value)) + } + case TrackLevel.TrackIfMissing if (!useJars && !containsClassFile(dirs.toList)) => + Def.task { + products.value map { (_, compile.value) } + } + case _ => + Def.task { + val analysis = previousCompile.value.analysis + (if (useJars) Seq(jar) + else dirs) map { + (_, analysis) + } + } + } + } + def exportProductsTask: Initialize[Task[Classpath]] = Def.task { val art = (artifact in packageBin).value val module = projectID.value @@ -1633,7 +1684,7 @@ object Classpaths { def constructBuildDependencies: Initialize[BuildDependencies] = loadedBuild(lb => BuildUtil.dependencies(lb.units)) def internalDependencies: Initialize[Task[Classpath]] = - (thisProjectRef, classpathConfiguration, configuration, settingsData, buildDependencies) flatMap internalDependencies0 + (thisProjectRef, classpathConfiguration, configuration, settingsData, buildDependencies, trackInternalDependencies) flatMap internalDependencies0 def unmanagedDependencies: Initialize[Task[Classpath]] = (thisProjectRef, configuration, settingsData, buildDependencies) flatMap unmanagedDependencies0 def mkIvyConfiguration: Initialize[Task[IvyConfiguration]] = @@ -1671,17 +1722,25 @@ object Classpaths { visited.toSeq } def unmanagedDependencies0(projectRef: ProjectRef, conf: Configuration, data: Settings[Scope], deps: BuildDependencies): Task[Classpath] = - interDependencies(projectRef, deps, conf, conf, data, true, unmanagedLibs) + interDependencies(projectRef, deps, conf, conf, data, TrackLevel.TrackAlways, true, unmanagedLibs0) + @deprecated("This is no longer public.", "0.13.10") def internalDependencies0(projectRef: ProjectRef, conf: Configuration, self: Configuration, data: Settings[Scope], deps: BuildDependencies): Task[Classpath] = interDependencies(projectRef, deps, conf, self, data, false, productsTask) + private[sbt] def internalDependencies0(projectRef: ProjectRef, conf: Configuration, self: Configuration, data: Settings[Scope], deps: BuildDependencies, track: TrackLevel): Task[Classpath] = + interDependencies(projectRef, deps, conf, self, data, track, false, productsTask0) + @deprecated("This is no longer public.", "0.13.10") def interDependencies(projectRef: ProjectRef, deps: BuildDependencies, conf: Configuration, self: Configuration, data: Settings[Scope], includeSelf: Boolean, f: (ProjectRef, String, Settings[Scope]) => Task[Classpath]): Task[Classpath] = + interDependencies(projectRef, deps, conf, self, data, TrackLevel.TrackAlways, includeSelf, + { (pr: ProjectRef, s: String, sc: Settings[Scope], tl: TrackLevel) => f(pr, s, sc) }) + private[sbt] def interDependencies(projectRef: ProjectRef, deps: BuildDependencies, conf: Configuration, self: Configuration, data: Settings[Scope], + track: TrackLevel, includeSelf: Boolean, f: (ProjectRef, String, Settings[Scope], TrackLevel) => Task[Classpath]): Task[Classpath] = { val visited = interSort(projectRef, conf, data, deps) val tasks = asScalaSet(new LinkedHashSet[Task[Classpath]]) for ((dep, c) <- visited) if (includeSelf || (dep != projectRef) || (conf.name != c && self.name != c)) - tasks += f(dep, c, data) + tasks += f(dep, c, data, track) (tasks.toSeq.join).map(_.flatten.distinct) } @@ -1725,6 +1784,14 @@ object Classpaths { configurations.find(_.name == conf) def productsTask(dep: ResolvedReference, conf: String, data: Settings[Scope]): Task[Classpath] = getClasspath(exportedProducts, dep, conf, data) + def productsTask0(dep: ResolvedReference, conf: String, data: Settings[Scope], track: TrackLevel): Task[Classpath] = + track match { + case TrackLevel.NoTracking => getClasspath(exportedProductsNoTracking, dep, conf, data) + case TrackLevel.TrackIfMissing => getClasspath(exportedProductsIfMissing, dep, conf, data) + case TrackLevel.TrackAlways => getClasspath(exportedProductsAlways, dep, conf, data) + } + private[sbt] def unmanagedLibs0(dep: ResolvedReference, conf: String, data: Settings[Scope], track: TrackLevel): Task[Classpath] = + unmanagedLibs(dep, conf, data) def unmanagedLibs(dep: ResolvedReference, conf: String, data: Settings[Scope]): Task[Classpath] = getClasspath(unmanagedJars, dep, conf, data) def getClasspath(key: TaskKey[Classpath], dep: ResolvedReference, conf: String, data: Settings[Scope]): Task[Classpath] = @@ -1790,7 +1857,7 @@ object Classpaths { private[this] lazy val internalCompilerPluginClasspath: Initialize[Task[Classpath]] = (thisProjectRef, settingsData, buildDependencies) flatMap { (ref, data, deps) => - internalDependencies0(ref, CompilerPlugin, CompilerPlugin, data, deps) + internalDependencies0(ref, CompilerPlugin, CompilerPlugin, data, deps, TrackLevel.TrackAlways) } lazy val compilerPluginConfig = Seq( diff --git a/main/src/main/scala/sbt/Keys.scala b/main/src/main/scala/sbt/Keys.scala index 94085e6a8..ed0baba92 100644 --- a/main/src/main/scala/sbt/Keys.scala +++ b/main/src/main/scala/sbt/Keys.scala @@ -277,6 +277,9 @@ object Keys { val productDirectories = TaskKey[Seq[File]]("product-directories", "Base directories of build products.", CTask) val exportJars = SettingKey[Boolean]("export-jars", "Determines whether the exported classpath for this project contains classes (false) or a packaged jar (true).", BSetting) val exportedProducts = TaskKey[Classpath]("exported-products", "Build products that go on the exported classpath.", CTask) + val exportedProductsAlways = TaskKey[Classpath]("exported-products-always", "Build products that go on the exported classpath for other projects.", CTask) + val exportedProductsIfMissing = TaskKey[Classpath]("exported-products-if-missing", "Build products that go on the exported classpath if missing.", CTask) + val exportedProductsNoTracking = TaskKey[Classpath]("exported-products-no-tracking", "Just the exported classpath without triggering the compilation.", CTask) val unmanagedClasspath = TaskKey[Classpath]("unmanaged-classpath", "Classpath entries (deep) that are manually managed.", BPlusTask) val unmanagedJars = TaskKey[Classpath]("unmanaged-jars", "Classpath entries for the current project (shallow) that are manually managed.", BPlusTask) val managedClasspath = TaskKey[Classpath]("managed-classpath", "The classpath consisting of external, managed library dependencies.", BMinusTask) @@ -284,6 +287,8 @@ object Keys { val externalDependencyClasspath = TaskKey[Classpath]("external-dependency-classpath", "The classpath consisting of library dependencies, both managed and unmanaged.", BMinusTask) val dependencyClasspath = TaskKey[Classpath]("dependency-classpath", "The classpath consisting of internal and external, managed and unmanaged dependencies.", BPlusTask) val fullClasspath = TaskKey[Classpath]("full-classpath", "The exported classpath, consisting of build products and unmanaged and managed, internal and external dependencies.", BPlusTask) + val trackInternalDependencies = SettingKey[TrackLevel]("track-internal-dependencies", "The level of tracking for the internal (inter-project) dependency.", BSetting) + val exportToInternal = SettingKey[TrackLevel]("export-to-internal", "The level of tracking for this project by the internal callers.", BSetting) val internalConfigurationMap = SettingKey[Configuration => Configuration]("internal-configuration-map", "Maps configurations to the actual configuration used to define the classpath.", CSetting) val classpathConfiguration = TaskKey[Configuration]("classpath-configuration", "The configuration used to define the classpath.", CTask) diff --git a/notes/0.13.10/internal-tracking.md b/notes/0.13.10/internal-tracking.md new file mode 100644 index 000000000..eacdd2dec --- /dev/null +++ b/notes/0.13.10/internal-tracking.md @@ -0,0 +1,32 @@ + + [@eed3si9n]: https://github.com/eed3si9n + [2266]: https://github.com/sbt/sbt/issues/2266 + [2354]: https://github.com/sbt/sbt/pull/2354 + +### Improvements + +- Adds `trackInternalDependencies` and `exportToInternal` keys. See below. + +### Inter-project dependency tracking + +sbt 0.13.10 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][2266]/[#2354][2354] by [@eed3si9n][@eed3si9n] diff --git a/sbt/src/sbt-test/project/internal-tracking/a/A.scala b/sbt/src/sbt-test/project/internal-tracking/a/A.scala new file mode 100644 index 000000000..3f2aea979 --- /dev/null +++ b/sbt/src/sbt-test/project/internal-tracking/a/A.scala @@ -0,0 +1,3 @@ +package a + +object A {} diff --git a/sbt/src/sbt-test/project/internal-tracking/b/B.scala b/sbt/src/sbt-test/project/internal-tracking/b/B.scala new file mode 100644 index 000000000..184707bb1 --- /dev/null +++ b/sbt/src/sbt-test/project/internal-tracking/b/B.scala @@ -0,0 +1,5 @@ +package b + +object B { + println(a.A.toString) +} diff --git a/sbt/src/sbt-test/project/internal-tracking/build.sbt b/sbt/src/sbt-test/project/internal-tracking/build.sbt new file mode 100644 index 000000000..ca1ba256c --- /dev/null +++ b/sbt/src/sbt-test/project/internal-tracking/build.sbt @@ -0,0 +1,25 @@ +lazy val root = (project in file(".")). + aggregate(a, b, c, d). + settings( + inThisBuild(Seq( + scalaVersion := "2.11.7", + trackInternalDependencies := TrackLevel.NoTracking + )) + ) + +lazy val a = (project in file("a")) + +lazy val b = (project in file("b")). + dependsOn(a) + +lazy val c = (project in file("c")). + settings( + exportToInternal := TrackLevel.NoTracking + ) + +lazy val d = (project in file("d")). + dependsOn(c). + settings( + trackInternalDependencies := TrackLevel.TrackIfMissing + ) + diff --git a/sbt/src/sbt-test/project/internal-tracking/c/C.scala b/sbt/src/sbt-test/project/internal-tracking/c/C.scala new file mode 100644 index 000000000..abadf1e84 --- /dev/null +++ b/sbt/src/sbt-test/project/internal-tracking/c/C.scala @@ -0,0 +1,3 @@ +package c + +object C {} diff --git a/sbt/src/sbt-test/project/internal-tracking/d/D.scala b/sbt/src/sbt-test/project/internal-tracking/d/D.scala new file mode 100644 index 000000000..9a2cd3377 --- /dev/null +++ b/sbt/src/sbt-test/project/internal-tracking/d/D.scala @@ -0,0 +1,3 @@ +package d + +object D { println(c.C.toString) } diff --git a/sbt/src/sbt-test/project/internal-tracking/test b/sbt/src/sbt-test/project/internal-tracking/test new file mode 100644 index 000000000..34c7be047 --- /dev/null +++ b/sbt/src/sbt-test/project/internal-tracking/test @@ -0,0 +1,11 @@ +-> b/compile + +> a/compile + +> b/compile + +-> d/compile + +> c/compile + +> d/compile From 78ea2932a44930bbb4b2f9ddb5a26772a6b0326e Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Fri, 5 Feb 2016 08:28:59 -0500 Subject: [PATCH 4/8] Fixes #2427 inter-project dependency interference with sbt-web sbt-web uses exportedProducts key as an extension point. This removes exportedProductsAlways from 0.13.10-RC1, and uses exportedProducts instead. --- main/src/main/scala/sbt/Defaults.scala | 6 +++--- main/src/main/scala/sbt/Keys.scala | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index 62ee38116..e0deb84b0 100755 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -1068,8 +1068,7 @@ object Classpaths { internalDependencyClasspath <<= internalDependencies, unmanagedClasspath <<= unmanagedDependencies, managedClasspath := managedJars(classpathConfiguration.value, classpathTypes.value, update.value), - exportedProducts <<= exportProductsTask, - exportedProductsAlways <<= trackedExportedProducts(TrackLevel.TrackAlways), + exportedProducts <<= trackedExportedProducts(TrackLevel.TrackAlways), exportedProductsIfMissing <<= trackedExportedProducts(TrackLevel.TrackIfMissing), exportedProductsNoTracking <<= trackedExportedProducts(TrackLevel.NoTracking), unmanagedJars := findUnmanagedJars(configuration.value, unmanagedBase.value, includeFilter in unmanagedJars value, excludeFilter in unmanagedJars value) @@ -1669,6 +1668,7 @@ object Classpaths { } } + @deprecated("This is no longer used.", "0.13.10") def exportProductsTask: Initialize[Task[Classpath]] = Def.task { val art = (artifact in packageBin).value val module = projectID.value @@ -1788,7 +1788,7 @@ object Classpaths { track match { case TrackLevel.NoTracking => getClasspath(exportedProductsNoTracking, dep, conf, data) case TrackLevel.TrackIfMissing => getClasspath(exportedProductsIfMissing, dep, conf, data) - case TrackLevel.TrackAlways => getClasspath(exportedProductsAlways, dep, conf, data) + case TrackLevel.TrackAlways => getClasspath(exportedProducts, dep, conf, data) } private[sbt] def unmanagedLibs0(dep: ResolvedReference, conf: String, data: Settings[Scope], track: TrackLevel): Task[Classpath] = unmanagedLibs(dep, conf, data) diff --git a/main/src/main/scala/sbt/Keys.scala b/main/src/main/scala/sbt/Keys.scala index ed0baba92..fc8302b3b 100644 --- a/main/src/main/scala/sbt/Keys.scala +++ b/main/src/main/scala/sbt/Keys.scala @@ -277,7 +277,6 @@ object Keys { val productDirectories = TaskKey[Seq[File]]("product-directories", "Base directories of build products.", CTask) val exportJars = SettingKey[Boolean]("export-jars", "Determines whether the exported classpath for this project contains classes (false) or a packaged jar (true).", BSetting) val exportedProducts = TaskKey[Classpath]("exported-products", "Build products that go on the exported classpath.", CTask) - val exportedProductsAlways = TaskKey[Classpath]("exported-products-always", "Build products that go on the exported classpath for other projects.", CTask) val exportedProductsIfMissing = TaskKey[Classpath]("exported-products-if-missing", "Build products that go on the exported classpath if missing.", CTask) val exportedProductsNoTracking = TaskKey[Classpath]("exported-products-no-tracking", "Just the exported classpath without triggering the compilation.", CTask) val unmanagedClasspath = TaskKey[Classpath]("unmanaged-classpath", "Classpath entries (deep) that are manually managed.", BPlusTask) From e3a06b72c0a1a232bb58be0f7dda443a39ebbd01 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sun, 1 May 2016 03:06:26 -0400 Subject: [PATCH 5/8] Use 0.13.11 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 817bc38df..43b8278c6 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.9 +sbt.version=0.13.11 From 296758e159fdc3ca188c6b1e7ed73e25ff3a75b6 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Fri, 22 Apr 2016 02:30:31 -0400 Subject: [PATCH 6/8] Fix #2519. Fixes Maven Central getting included even with repo override --- main/src/main/scala/sbt/Defaults.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index e0deb84b0..cf7620bd8 100755 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -1182,12 +1182,15 @@ object Classpaths { externalResolvers <<= (externalResolvers.task.?, resolvers, appResolvers, useJCenter) { case (Some(delegated), Seq(), _, _) => delegated case (_, rs, Some(ars), uj) => task { ars ++ rs } - case (_, rs, _, uj) => task { Resolver.withDefaultResolvers(rs, uj, true) } + case (_, rs, _, uj) => task { Resolver.withDefaultResolvers(rs, uj, mavenCentral = true) } }, appResolvers := { val ac = appConfiguration.value val uj = useJCenter.value - appRepositories(ac) map { ars => Resolver.reorganizeAppResolvers(ars, uj, true) } + appRepositories(ac) map { ars => + val useMavenCentral = ars contains DefaultMavenRepository + Resolver.reorganizeAppResolvers(ars, uj, useMavenCentral) + } }, bootResolvers <<= appConfiguration map bootRepositories, fullResolvers <<= (projectResolver, externalResolvers, sbtPlugin, sbtResolver, bootResolvers, overrideBuildResolvers) map { (proj, rs, isPlugin, sbtr, boot, overrideFlag) => From ab43ec51d83c19ed1c8c49e7546450b9a93f68ae Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sun, 24 Apr 2016 14:23:48 -0400 Subject: [PATCH 7/8] Adds a scripted test that tests repo override --- .travis.yml | 2 + build.sbt | 40 +++++++++++++++++-- project/Scripted.scala | 10 +++-- .../default-resolvers/build.sbt | 11 +++++ .../default-resolvers/test | 1 + sbt/src/repo-override-test/repo.config | 3 ++ 6 files changed, 60 insertions(+), 7 deletions(-) create mode 100644 sbt/src/repo-override-test/dependency-management/default-resolvers/build.sbt create mode 100644 sbt/src/repo-override-test/dependency-management/default-resolvers/test create mode 100644 sbt/src/repo-override-test/repo.config diff --git a/.travis.yml b/.travis.yml index 486022e06..4a9e3a500 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,8 @@ env: - SBT_CMD="scripted source-dependencies/*3of3" - SBT_CMD="scripted tests/*" - SBT_CMD="scripted project-load/*" + - SBT_CMD="checkBuildScala211" + - SBT_CMD="repoOverrideTest:scripted dependency-management/*" notifications: email: diff --git a/build.sbt b/build.sbt index 5d0032ed2..59dc41b35 100644 --- a/build.sbt +++ b/build.sbt @@ -202,16 +202,21 @@ lazy val sbtProj = (project in sbtPath). def scriptedTask: Def.Initialize[InputTask[Unit]] = Def.inputTask { val result = scriptedSource(dir => (s: State) => Scripted.scriptedParser(dir)).parsed publishAll.value + // These two projects need to be visible in a repo even if the default + // local repository is hidden, so we publish them to an alternate location and add + // that alternate repo to the running scripted test (in Scripted.scriptedpreScripted). + // (altLocalPublish in interfaceProj).value + // (altLocalPublish in compileInterfaceProj).value Scripted.doScripted((sbtLaunchJar in bundledLauncherProj).value, (fullClasspath in scriptedSbtProj in Test).value, (scalaInstance in scriptedSbtProj).value, - scriptedSource.value, scriptedBufferLog.value, result, scriptedPrescripted.value) + scriptedSource.value, scriptedBufferLog.value, result, scriptedPrescripted.value, scriptedLaunchOpts.value) } def scriptedUnpublishedTask: Def.Initialize[InputTask[Unit]] = Def.inputTask { val result = scriptedSource(dir => (s: State) => Scripted.scriptedParser(dir)).parsed Scripted.doScripted((sbtLaunchJar in bundledLauncherProj).value, (fullClasspath in scriptedSbtProj in Test).value, (scalaInstance in scriptedSbtProj).value, - scriptedSource.value, scriptedBufferLog.value, result, scriptedPrescripted.value) + scriptedSource.value, scriptedBufferLog.value, result, scriptedPrescripted.value, scriptedLaunchOpts.value) } lazy val publishLauncher = TaskKey[Unit]("publish-launcher") @@ -233,11 +238,40 @@ def otherRootSettings = Seq( scripted <<= scriptedTask, scriptedUnpublished <<= scriptedUnpublishedTask, scriptedSource := (sourceDirectory in sbtProj).value / "sbt-test", + // scriptedPrescripted := { addSbtAlternateResolver _ }, + scriptedLaunchOpts := List("-XX:MaxPermSize=256M", "-Xmx1G"), publishAll := { val _ = (publishLocal).all(ScopeFilter(inAnyProject)).value }, aggregate in bintrayRelease := false -) +) ++ inConfig(Scripted.RepoOverrideTest)(Seq( + scriptedPrescripted := { _ => () }, + scriptedLaunchOpts := { + List("-XX:MaxPermSize=256M", "-Xmx1G", "-Dsbt.override.build.repos=true", + s"""-Dsbt.repository.config=${ scriptedSource.value / "repo.config" }""") + }, + scripted <<= scriptedTask, + scriptedUnpublished <<= scriptedUnpublishedTask, + scriptedSource := (sourceDirectory in sbtProj).value / "repo-override-test" +)) + +// def addSbtAlternateResolver(scriptedRoot: File) = { +// val resolver = scriptedRoot / "project" / "AddResolverPlugin.scala" +// if (!resolver.exists) { +// IO.write(resolver, s"""import sbt._ +// |import Keys._ +// | +// |object AddResolverPlugin extends AutoPlugin { +// | override def requires = sbt.plugins.JvmPlugin +// | override def trigger = allRequirements +// | +// | override lazy val projectSettings = Seq(resolvers += alternativeLocalResolver) +// | lazy val alternativeLocalResolver = Resolver.file("$altLocalRepoName", file("$altLocalRepoPath"))(Resolver.ivyStylePatterns) +// |} +// |""".stripMargin) +// } +// } + lazy val docProjects: ScopeFilter = ScopeFilter( inAnyProject -- inProjects(sbtRoot, sbtProj, scriptedSbtProj, scriptedPluginProj), inConfigurations(Compile) diff --git a/project/Scripted.scala b/project/Scripted.scala index a3e71a94f..a821ff446 100644 --- a/project/Scripted.scala +++ b/project/Scripted.scala @@ -25,10 +25,12 @@ trait ScriptedKeys { lazy val scriptedSource = SettingKey[File]("scripted-source") lazy val scriptedPrescripted = TaskKey[File => Unit]("scripted-prescripted") lazy val scriptedBufferLog = SettingKey[Boolean]("scripted-buffer-log") + lazy val scriptedLaunchOpts = SettingKey[Seq[String]]("scripted-launch-opts", "options to pass to jvm launching scripted tasks") } object Scripted { lazy val MavenResolverPluginTest = config("mavenResolverPluginTest") extend Compile + lazy val RepoOverrideTest = config("repoOverrideTest") extend Compile import sbt.complete._ import DefaultParsers._ @@ -83,14 +85,14 @@ object Scripted { launchOpts: Array[String], prescripted: java.util.List[File]): Unit } - def doScripted(launcher: File, scriptedSbtClasspath: Seq[Attributed[File]], scriptedSbtInstance: ScalaInstance, - sourcePath: File, bufferLog: Boolean, args: Seq[String], prescripted: File => Unit): Unit = { + def doScripted(launcher: File, scriptedSbtClasspath: Seq[Attributed[File]], + scriptedSbtInstance: ScalaInstance, sourcePath: File, bufferLog: Boolean, + args: Seq[String], prescripted: File => Unit, launchOpts: Seq[String]): Unit = { System.err.println(s"About to run tests: ${args.mkString("\n * ", "\n * ", "\n")}") val noJLine = new classpath.FilteredLoader(scriptedSbtInstance.loader, "jline." :: Nil) val loader = classpath.ClasspathUtilities.toLoader(scriptedSbtClasspath.files, noJLine) val bridgeClass = Class.forName("sbt.test.ScriptedRunner", true, loader) val bridge = bridgeClass.newInstance.asInstanceOf[SbtScriptedRunner] - val launcherVmOptions = Array("-XX:MaxPermSize=256M", "-Xmx1G") // increased after a failure in scripted source-dependencies/macro try { // Using java.util.List to encode File => Unit. val callback = new java.util.AbstractList[File] { @@ -101,7 +103,7 @@ object Scripted { def get(x: Int): sbt.File = ??? def size(): Int = 0 } - bridge.run(sourcePath, bufferLog, args.toArray, launcher, launcherVmOptions, callback) + bridge.run(sourcePath, bufferLog, args.toArray, launcher, launchOpts.toArray, callback) } catch { case ite: java.lang.reflect.InvocationTargetException => throw ite.getCause } } } diff --git a/sbt/src/repo-override-test/dependency-management/default-resolvers/build.sbt b/sbt/src/repo-override-test/dependency-management/default-resolvers/build.sbt new file mode 100644 index 000000000..7984b34c7 --- /dev/null +++ b/sbt/src/repo-override-test/dependency-management/default-resolvers/build.sbt @@ -0,0 +1,11 @@ +lazy val check = taskKey[Unit]("") + +lazy val root = (project in file(".")). + settings( + autoScalaLibrary := false, + check := { + val ar = appResolvers.value.get + assert(!(ar exists { _.name == "jcenter" })) + assert(!(ar exists { _.name == "public" })) + } + ) diff --git a/sbt/src/repo-override-test/dependency-management/default-resolvers/test b/sbt/src/repo-override-test/dependency-management/default-resolvers/test new file mode 100644 index 000000000..15675b169 --- /dev/null +++ b/sbt/src/repo-override-test/dependency-management/default-resolvers/test @@ -0,0 +1 @@ +> check diff --git a/sbt/src/repo-override-test/repo.config b/sbt/src/repo-override-test/repo.config new file mode 100644 index 000000000..f3301bb9f --- /dev/null +++ b/sbt/src/repo-override-test/repo.config @@ -0,0 +1,3 @@ +[repositories] + local + typesafe-ivy-releases: https://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext] From 89a17c79d6e671b9c6383555bc2b93068e006d5a Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Mon, 2 May 2016 00:32:35 -0400 Subject: [PATCH 8/8] Adjust to changes --- ivy/src/main/scala/sbt/TrackLevel.scala | 33 ------------------------- main/src/main/scala/sbt/Defaults.scala | 11 +++++---- main/src/main/scala/sbt/Keys.scala | 1 + sbt/src/main/scala/Import.scala | 2 ++ 4 files changed, 9 insertions(+), 38 deletions(-) delete mode 100644 ivy/src/main/scala/sbt/TrackLevel.scala diff --git a/ivy/src/main/scala/sbt/TrackLevel.scala b/ivy/src/main/scala/sbt/TrackLevel.scala deleted file mode 100644 index 4c5ae28fc..000000000 --- a/ivy/src/main/scala/sbt/TrackLevel.scala +++ /dev/null @@ -1,33 +0,0 @@ -package sbt - -/** - * An enumeration defining the tracking of dependencies. A level includes all of the levels - * with id larger than its own id. For example, Warn (id=3) includes Error (id=4). - */ -object TrackLevel { - case object NoTracking extends TrackLevel { - override def id: Int = 0 - } - case object TrackIfMissing extends TrackLevel { - override def id: Int = 1 - } - case object TrackAlways extends TrackLevel { - override def id: Int = 10 - } - - private[sbt] def apply(x: Int): TrackLevel = - x match { - case 0 => NoTracking - case 1 => TrackIfMissing - case 10 => TrackAlways - } - - def intersection(a: TrackLevel, b: TrackLevel): TrackLevel = - if (a.id < b.id) a - else b - def intersectionAll(vs: List[TrackLevel]): TrackLevel = vs reduceLeft intersection -} - -sealed trait TrackLevel { - def id: Int -} diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index cf7620bd8..15fa89681 100755 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -47,7 +47,7 @@ import sbt.util.InterfaceUtil.{ f1, o2m } import sbt.internal.util.Types._ import sbt.internal.io.WatchState -import sbt.io.{ AllPassFilter, FileFilter, GlobFilter, HiddenFileFilter, IO, NameFilter, NothingFilter, Path, PathFinder, SimpleFileFilter } +import sbt.io.{ AllPassFilter, FileFilter, GlobFilter, HiddenFileFilter, IO, NameFilter, NothingFilter, Path, PathFinder, SimpleFileFilter, DirectoryFilter } import Path._ import Keys._ @@ -1632,7 +1632,7 @@ object Classpaths { val config = configuration.value for { (f, analysis) <- trackedProductsImplTask(track).value } yield APIMappings.store(analyzed(f, analysis), apiURL.value).put(artifact.key, art).put(moduleID.key, module).put(configuration.key, config) } - private[this] def trackedProductsImplTask(track: TrackLevel): Initialize[Task[Seq[(File, Analysis)]]] = + private[this] def trackedProductsImplTask(track: TrackLevel): Initialize[Task[Seq[(File, CompileAnalysis)]]] = Def.taskDyn { val useJars = exportJars.value val jar = (artifactPath in packageBin).value @@ -1662,10 +1662,11 @@ object Classpaths { } case _ => Def.task { - val analysis = previousCompile.value.analysis + val analysisOpt = previousCompile.value.analysis (if (useJars) Seq(jar) - else dirs) map { - (_, analysis) + else dirs) map { x => + (x, if (analysisOpt.isDefined) analysisOpt.get + else Analysis.empty(true)) } } } diff --git a/main/src/main/scala/sbt/Keys.scala b/main/src/main/scala/sbt/Keys.scala index fc8302b3b..ad21453b3 100644 --- a/main/src/main/scala/sbt/Keys.scala +++ b/main/src/main/scala/sbt/Keys.scala @@ -42,6 +42,7 @@ import sbt.librarymanagement.{ Resolver, ScalaVersion, ScmInfo, + TrackLevel, UpdateOptions, UpdateReport } diff --git a/sbt/src/main/scala/Import.scala b/sbt/src/main/scala/Import.scala index 2916a3c53..d8d293a35 100644 --- a/sbt/src/main/scala/Import.scala +++ b/sbt/src/main/scala/Import.scala @@ -322,6 +322,8 @@ object Import { type SshBasedRepository = sbt.librarymanagement.SshBasedRepository val SshRepository = sbt.librarymanagement.SshRepository type SshRepository = sbt.librarymanagement.SshRepository + type TrackLevel = sbt.librarymanagement.TrackLevel + val TrackLevel = sbt.librarymanagement.TrackLevel val URLRepository = sbt.librarymanagement.URLRepository type URLRepository = sbt.librarymanagement.URLRepository val UpdateOptions = sbt.librarymanagement.UpdateOptions