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
Pin Scala compiler version in Gradle #5299
Comments
If I'm reading the documentation correctly, then we are already pinning the Scala version. The Scala Plugin documentation says:
This is confirmed by this StackOverflow answer. So I think we're already pinning the Scala version to 2.13.5. What makes you think that it's using 2.13.10? |
I should take my own medicine and report back with something reproducible. |
|
Plausible guess:
|
TLDR, I've worked out how to fix this and will submit a PR. But in the spirit of "teach a man to fish", here's an explanation of what's going on: It looks like your guess is correct. You can see the dependency tree for a Gradle project with
If we add the Coursier dependency, then we get:
You can see that:
The reason for this is that Gradle is apparently allowed to "optimistically upgrade" simple version numbers. The solution is to add
Which gives the following dependency tree (note the
Of course, it's possible that using Coursier with an older version of the Scala library than it's been developed against might result in problems, so this isn't entirely risk-free. |
... And ordinarily a patch level increase should not result in breaking changes... but it does for us :( (In Scala 2.13.6 or whatever). |
On my machine, gradle took the liberty to install Scala 2.13.10, but that will not work due to a bug in introduced in Scala 2.13.6 (?)
How can we pin the Scala version?
The text was updated successfully, but these errors were encountered: