-
Notifications
You must be signed in to change notification settings - Fork 496
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
Should scala-steward stop recommending to upgrade Scala 3 minor versions? #2467
Comments
My understanding from https://github.com/scala/scala-lang/blob/5303453ebe4d1597adce544871f6712e217cff19/blog/_posts/2022-01-17-scala-3.1.1-released.md#312-rc1-and-forward-compatibility-improvements is that library authors can use the latest Scala 3 version if they set |
That is an interesting blog post, I was not aware of this new flag. IIRC the |
Here is a new blog post that is relevant for this issue: Long-term compatibility plans for Scala 3 |
In light of the last blog post mentioned by @fthomas I see no reason to build some special handling for Scala version upgrades into Scala Steward. If a project wants to restrict upgrades of Scala 3 it can updates.pin = [
{ groupId = "org.scala-lang", artifactId="scala3-compiler", version = "3.1." },
{ groupId = "org.scala-lang", artifactId="scala3-library", version = "3.1." },
{ groupId = "org.scala-lang", artifactId="scala3-library_sjs1", version = "3.1." }
] (taken from https://github.com/scalameta/mdoc/blob/42fcf08fab1f622ea5c229a77e5b08af2f272a55/.scala-steward.conf#L8-L12) |
Using |
I took a look at the current Steward behaviour and what is possible using the configuration Using pin in updates.pin = [
{ groupId = "org.scala-lang", artifactId="scala3-compiler", version = "3.3." },
{ groupId = "org.scala-lang", artifactId="scala3-library", version = "3.3." },
{ groupId = "org.scala-lang", artifactId="scala3-library_sjs1", version = "3.3." }
] Users that want 3.4 would have to adapt their local The only disadvantage I can see is that there would be no more updates to users on older Scala version ( BUT when trying this out I think I discovered a bug with respect to merging default and local settings. I will open a PR in a minute. |
Scala 3.x is backward compatible, but not forward compatible. For example, this means that a library built with 3.0.2 can be consumed by a library built with 3.1.0, but NOT the other way around (See https://twitter.com/SethTisue/status/1450260785762947076 for some more info). Considering these compatibility semantics, should scala-steward by default stop recommending to upgrade scala versions if they are >= 3?
I think that there will be little disagreement that for library developers, the best practice is to be conservative and indeed use the lowest Scala 3 version as reasonably possible (3.0.2 as of this writing). End-user application developers may have more liberty, but even then I am not sure that the benefits of always using the latest Scala version are that important. Hence, unless there is a way for projects to indicate to scala-steward if they are a library or application, I would recommend that the default behavior should be changed to not upgrade Scala 3 versions beyond the newest patch-level.
The text was updated successfully, but these errors were encountered: