From 116c1e1e8b9386facef645161f398f91c1967e18 Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Sun, 26 Apr 2015 17:05:20 +0100 Subject: [PATCH 1/3] Fix crossScalaVersions default, derived from scalaVersion. Fixes #1828. --- main/src/main/scala/sbt/Defaults.scala | 2 +- notes/0.13.9/cross-scala-versions-default.markdown | 12 ++++++++++++ .../project/cross-scala-versions-default/build.sbt | 6 ++++++ .../project/cross-scala-versions-default/test | 1 + 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 notes/0.13.9/cross-scala-versions-default.markdown create mode 100644 sbt/src/sbt-test/project/cross-scala-versions-default/build.sbt create mode 100644 sbt/src/sbt-test/project/cross-scala-versions-default/test diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index 5dc348471..190b35b5a 100755 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -238,7 +238,7 @@ object Defaults extends BuildCommon { javacOptions :== Nil, scalacOptions :== Nil, scalaVersion := appConfiguration.value.provider.scalaProvider.version, - crossScalaVersions := Seq(scalaVersion.value), + derive(crossScalaVersions := Seq(scalaVersion.value)), derive(compilersSetting), derive(scalaBinaryVersion := binaryScalaVersion(scalaVersion.value)) )) diff --git a/notes/0.13.9/cross-scala-versions-default.markdown b/notes/0.13.9/cross-scala-versions-default.markdown new file mode 100644 index 000000000..2bded7c1e --- /dev/null +++ b/notes/0.13.9/cross-scala-versions-default.markdown @@ -0,0 +1,12 @@ + + [@dwijnand]: http://github.com/dwijnand + [1828]: https://github.com/sbt/sbt/issues/1828 + [1922]: https://github.com/sbt/sbt/pull/1992 + +### Fixes with compatibility implications + +### Improvements + +### Bug fixes + +- Fix `crossScalaVersions` default, now correctly derives from the configured `scalaVersion`. [#1828][1828]/[#1992][1992] by [@dwijnand][@dwijnand] diff --git a/sbt/src/sbt-test/project/cross-scala-versions-default/build.sbt b/sbt/src/sbt-test/project/cross-scala-versions-default/build.sbt new file mode 100644 index 000000000..f791d581e --- /dev/null +++ b/sbt/src/sbt-test/project/cross-scala-versions-default/build.sbt @@ -0,0 +1,6 @@ +scalaVersion := "2.11.6" + +TaskKey[Unit]("check") := { + assert(crossScalaVersions.value == Seq("2.11.6"), + s"""crossScalaVersions should be Seq("2.11.6") but is ${crossScalaVersions.value}""") +} diff --git a/sbt/src/sbt-test/project/cross-scala-versions-default/test b/sbt/src/sbt-test/project/cross-scala-versions-default/test new file mode 100644 index 000000000..15675b169 --- /dev/null +++ b/sbt/src/sbt-test/project/cross-scala-versions-default/test @@ -0,0 +1 @@ +> check From efe4fdf9e4b905a19b61d624ea5fd5337e8dc6f3 Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Tue, 28 Apr 2015 22:51:07 +0100 Subject: [PATCH 2/3] Move "New crossScalaVersions default value" to fix with compatibility implications. --- notes/0.13.9/cross-scala-versions-default.markdown | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/notes/0.13.9/cross-scala-versions-default.markdown b/notes/0.13.9/cross-scala-versions-default.markdown index 2bded7c1e..17c2c9543 100644 --- a/notes/0.13.9/cross-scala-versions-default.markdown +++ b/notes/0.13.9/cross-scala-versions-default.markdown @@ -1,12 +1,22 @@ [@dwijnand]: http://github.com/dwijnand [1828]: https://github.com/sbt/sbt/issues/1828 - [1922]: https://github.com/sbt/sbt/pull/1992 + [1992]: https://github.com/sbt/sbt/pull/1992 ### Fixes with compatibility implications +- New `crossScalaVersions` default value, now correctly derives from what `scalaVersion` is set to. See below for more info. + ### Improvements ### Bug fixes -- Fix `crossScalaVersions` default, now correctly derives from the configured `scalaVersion`. [#1828][1828]/[#1992][1992] by [@dwijnand][@dwijnand] +### New `crossScalaVersions` default value + +As of this fix `crossScalaVersions` returns to the behaviour present in `0.12.4` whereby it defaults to what `scalaVersion` +is set to, for example if `scalaVersion` is set to `"2.11.6"`, `crossScalaVersions` now defaults to `Seq("2.11.6")`. + +Therefore when upgrading from any version between `0.13.0` and `0.13.8` please be aware of this new default if your build +setup depended on it. + +[#1828][1828]/[#1992][1992] by [@dwijnand][@dwijnand] From 3d85c7c9e25c7368bfe298b54d9ebe1212a96053 Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Wed, 29 Apr 2015 13:05:04 +0100 Subject: [PATCH 3/3] Tweak crossScalaVersions default notes. --- notes/0.13.9/cross-scala-versions-default.markdown | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/notes/0.13.9/cross-scala-versions-default.markdown b/notes/0.13.9/cross-scala-versions-default.markdown index 17c2c9543..dc0c691f1 100644 --- a/notes/0.13.9/cross-scala-versions-default.markdown +++ b/notes/0.13.9/cross-scala-versions-default.markdown @@ -5,18 +5,20 @@ ### Fixes with compatibility implications -- New `crossScalaVersions` default value, now correctly derives from what `scalaVersion` is set to. See below for more info. +- Starting 0.13.9, `crossScalaVersions` default value is fixed back to the older 0.12.x behavior. See below for + details ### Improvements ### Bug fixes -### New `crossScalaVersions` default value +### `crossScalaVersions` default value -As of this fix `crossScalaVersions` returns to the behaviour present in `0.12.4` whereby it defaults to what `scalaVersion` -is set to, for example if `scalaVersion` is set to `"2.11.6"`, `crossScalaVersions` now defaults to `Seq("2.11.6")`. +As of this fix `crossScalaVersions` returns to the behaviour present in `0.12.4` whereby it defaults to what +`scalaVersion` is set to, for example if `scalaVersion` is set to `"2.11.6"`, `crossScalaVersions` now defaults +to `Seq("2.11.6")`. -Therefore when upgrading from any version between `0.13.0` and `0.13.8` please be aware of this new default if your build -setup depended on it. +Therefore when upgrading from any version between `0.13.0` and `0.13.8` be aware of this new default if +your build setup depended on it. [#1828][1828]/[#1992][1992] by [@dwijnand][@dwijnand]