What scala-library version is used by which Scala 3 version?

When using a given Scala 3 version (e.g. 3.3.3 or 3.4.2), how can I know what scala-library version does it use? This may be important because of stdlib fixes, but I do not see this information in release notes like Release 3.4.2 · scala/scala3 · GitHub

You may need to check it dynamically from the Properties object: releaseVersion

The version of the Scala runtime, if this is not a snapshot.

Properties

Why is this not published? It seems quite important, definitely not less than some exotic individual fixes in dark corners of higher kinded types handling.

How can I know if I my project is affected by issues like:

Or many other issue shown by Issues · scala/bug · GitHub ?

IIUC, eventually you will be able to specify which version of the stdlib you want to use.

When I check my project in IntellIJ using External Dependencies project view, I see scala-library-2.13.12.jar for all of 3.3.3, 3.4.1, 3.4.2, 3.5.0-RC1

The same can be seen when checking dependencies in Maven central:

https://mvnrepository.com/artifact/org.scala-lang/scala3-library_3/3.5.0-RC1
https://mvnrepository.com/artifact/org.scala-lang/scala3-library_3/3.4.2
https://mvnrepository.com/artifact/org.scala-lang/scala3-library_3/3.4.1
https://mvnrepository.com/artifact/org.scala-lang/scala3-library_3/3.3.3

All depend on https://mvnrepository.com/artifact/org.scala-lang/scala-library/2.13.12

By the same technique I can see 3.0.0 uses 2.13.5.

Can someone confirm this is correct and all those builds really use 2.13.12?

If this is true, what Scala 3 version will start using 2.13.14?

This seems to be defined in scala3/project/Build.scala at main · scala/scala3 · GitHub - is not it time to update to 2.13.14?

  /** scala-library version required to compile Dotty.
   *
   *  Both the non-bootstrapped and bootstrapped version should match, unless
   *  we're in the process of upgrading to a new major version of
   *  scala-library.
   */
  def stdlibVersion(implicit mode: Mode): String = mode match {
    case NonBootstrapped => "2.13.12"
    case Bootstrapped => "2.13.12"
  }

@OndrejSpanel
You can override it if you prefer

libraryDependencies += scalaOrganization.value % "scala-library" % "2.13.14"
2 Likes

Yes. There’s an open PR to upgrade to 2.13.13 but it might have been forgotten: Use Scala 2.13.13 stdlib (was .12) by SethTisue · Pull Request #19791 · scala/scala3 · GitHub

it’s so weird that the forum doesn’t have emoji reactions.

:joy:

The other thread mentioned dotty’s internal “shim” for the library.

It’s natural to expect that there is a versioning dependency of some kind.

That is, how do I know what “patches” have been applied? Probably the current assumption is that everything just works.

2 Likes