Skip to content

What will the upgrade process to 3.1 look like? #25

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

Open
martijnhoekstra opened this issue Oct 26, 2020 · 1 comment
Open

What will the upgrade process to 3.1 look like? #25

martijnhoekstra opened this issue Oct 26, 2020 · 1 comment
Labels
meta meta-discussions about the nature and scope of this repo

Comments

@martijnhoekstra
Copy link

At some point the future stdlib 3.1.x with the changes in this library will be released. What will the upgrade process look like for projects depending on this library, keeping in mind that some users may be cross-building for 2.13.x/3.0.x (and 2.12.x?)

When the next version of the stdlib is released, what's the plan for this library? Particularly around versioning, naming, compatibility, and shadowing of names that then are included in the stdlib 3.1.x, and how does a user (cross)building for 3.0.x and 3.1.x use this library?

Relatedly (maybe for a ticket to be spun off?) what kind of compatibility guarantees does the library intend to offer?

@SethTisue SethTisue added the meta meta-discussions about the nature and scope of this repo label Oct 26, 2020
@julienrf
Copy link
Contributor

These are interesting questions. Here is my opinion:

At some point the future stdlib 3.1.x with the changes in this library will be released. What will the upgrade process look like for projects depending on this library, keeping in mind that some users may be cross-building for 2.13.x/3.0.x (and 2.12.x?)

In the case of a library that cross-builds for 2.13 and 3, if we bump the Scala 3 version from 3.0.x to 3.1.0 and keep the dependency to scala-library-next for the 2.13 support, the content of scala-library-next may duplicate/shadow what is already in the scala-library. This may not be a problem in practice but I think it would be better to not have this duplication. I think we can avoid it by conditionally depending on scala-library-next:

libraryDependencies ++= {
  CrossVersion.partialVersion(scalaVersion.value) match {
    case Some((3, n)) if n > 0 => Nil // Omit scala-library-next for Scala >= 3.1
    case _ => List("org.scala-lang.modules" %% "scala-library-next" % "1.0.0")
  }
}

When the next version of the stdlib is released, what's the plan for this library? Particularly around versioning, naming, compatibility, and shadowing of names that then are included in the stdlib 3.1.x, and how does a user (cross)building for 3.0.x and 3.1.x use this library?

I’m expecting Scala to move to the Semantic Versioning scheme (but I might be wrong). In such a case, there is no need to cross-build for 3.0 and 3.1. You would just remove the dependency to scala-library-next from your project (and the import scala.library.next._ lines) when you upgrade from 3.0 to 3.1.

This library is useful only to benefit from the new features of the scala-library without having to wait for Scala 3.1. This library might be useful again with Scala 4, if we end up with a situation where we can provide the Scala 4 “syntax” in Scala 3 (like we did with scala-collection-compat, and Scala 2.12 and 2.13).

Relatedly (maybe for a ticket to be spun off?) what kind of compatibility guarantees does the library intend to offer?

scala-library-next releases will be backward binary compatible. Unless something unexpected happens, there should be only a 1.x series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta meta-discussions about the nature and scope of this repo
Projects
None yet
Development

No branches or pull requests

3 participants