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
Fix Scala version enforcement #2055
Conversation
Fixes coursier#2054 Problem ------- Currently `forceScalaVersionOpt` option, which by default is set to true when a Scala version is present, conflates the notion of overriding the Scala standard modules (such as scala-library, scala-reflect) and overriding the cross building full suffix of any libraries. This ignores the user's specification of dependency such as `"org.typelevel" % "macro-compat_2.13.0-RC2" % "1.1.1"` and substitutes it with `"macro-compat_2.13.5"` etc. Solution -------- Create a new option specifically to override the full suffix, and make it opt-in. Scala modules should continue to enjoy the Scala version overriding.
2c0dde7
to
b3773c7
Compare
e7b3cf9
to
41e0276
Compare
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.
Thanks @eed3si9n, and sorry for the late review :|
I pushed a few more commits to merge with the current master, and make sure the ResolutionParams
hash computation in tests doesn't change in spite of the additional field.
If the CI is green, and if you're ok with it, I'll probably merge from a different branch after rebasing, and merging the "Clean-up" / "Bintray" / "NIT" commits in yours (unless you want to handle that yourself?)
Sounds good to me :) |
Merged via #2104. |
@alexarchambault Could you release a new version of Coursier with this patch please? |
The release workflow of coursier needs to be fixed… I should have a bit of time for it later this week. |
Fixes #2054 / sbt/sbt#6439
Problem
Currently
forceScalaVersionOpt
option, which by default is set to truewhen a Scala version is present, conflates the notion of overriding the
Scala standard modules (such as scala-library, scala-reflect) and
overriding the cross building full suffix of any libraries.
This ignores the user's specification of dependency such as
"org.typelevel" % "macro-compat_2.13.0-RC2" % "1.1.1"
and substitutes it with
"macro-compat_2.13.5"
etc.Side note: Maybe this was convenient feature when Typelevel had its own Scala compiler? Today, it's more common to want to use a Scala plugin with different Scala full suffix (for debugging purpose or because plugin is not available yet) than using third-party compiler implementation.
Solution
Create a new option specifically to override the full suffix, and make it opt-in.
Scala modules should continue to enjoy the Scala version overriding.