Apply scalaVersion enforcement to Compile related configs

Fixes #2786. Ref #2634.

sbt 0.13.12 added Ivy mediator that enforces scalaOrganization and
scalaVersion for Scala toolchain artifacts.
This turns out to be a bit too aggressive because Ivy configurations
can be used as an independent dependency graph that does not rely on
the scalaVersion used by Compile configuration. By enforcing
scalaVersion in those graph causes runtime failure.

This change checks if the configuration extends Default, Compile,
Provided, or Optional before enforcing scalaVersion.
This commit is contained in:
Eugene Yokota
2016-11-11 05:15:58 -05:00
parent 55e2b56af9
commit 8d0e4d2ef0
6 changed files with 46 additions and 9 deletions
+9
View File
@@ -0,0 +1,9 @@
### Bug fixes
- Fixes a regression in sbt 0.13.12 that was misfiring Scala version enforcement when configuration does not extend `Compile`. [#2827][2827]/[#2786][2786] by [@eed3si9n][@eed3si9n]
[2786]: https://github.com/sbt/sbt/issues/2786
[2827]: https://github.com/sbt/sbt/pull/2827
[@eed3si9n]: https://github.com/eed3si9n
[@dwijnand]: https://github.com/dwijnand
[@Duhemm]: https://github.com/Duhemm