-
Notifications
You must be signed in to change notification settings - Fork 928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply scalaVersion enforcement to Compile related configs #2827
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way that that list of config can be made configurable by the build user?
Also I think we should add a little test case, that emulates scalafmt's use case. To avoid this regressing. |
I tried adding testing but I couldn't get it to fail without using 2.12, which requires JDK8. I also tried exposing configurations setting but without a major hack like InlineConfigurationWithExcludes, I don't think we can easily in sbt 0.13. |
Fixes sbt#2786. Ref sbt#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.
79a0639
to
8d0e4d2
Compare
Fixes sbt#2015
Many thanks for dealing with this ... my apologies for not being able to find the time to get to it before you did :-( |
@milessabin no problemo :) |
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. Enforcing
scalaVersion in those graphs causes runtime failure.
This change checks if the configuration extends Default, Compile,
Provided, or Optional before enforcing scalaVersion.
/review @dwijnand