Re: Re-bootstrapping sbt and modern Scala; the Scala 3 path is now open
David Goodenough <[email protected]> Thu, 11 Jun 2026 10:36:56 +0100
| Newsgroups | gmane.linux.debian.devel.java |
|---|---|
| Message-ID | <4741112.LvFx2qVVIh@continuum> |
This is a multi-part message in MIME format. --nextPart2414201.ElGaqSPkdT Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On Thursday, 11 June 2026 10:12:53 British Summer Time Juan M. M=C3=A9ndez = Rey wrote: > El jueves, 11 de junio de 2026 a las 10:12, Emmanuel Bourg <ebourg@apache= =2Eorg>=20 escribi=C3=B3: > > Hi Juan, > >=20 > > Thank you very much for working on Scala, I gave up years ago and I'm > > glad someone is picking up the ball. >=20 > Thanks Emmanuel, glad to be able to hear your opinions with this, that me= ans > a lot, and what I found probably is related with your experience. > > I see there is a choice about preserving the old version (2.11) or not. > > If you are confident packaging a new version of Scala is achievable, > > then I'd vote for retiring the old version. >=20 > I can't definitely say, but I concur that most of the biggest projects > migrated long ago to Scala 2.12, Scala 2.13. e.g.: Spark, Almond, not sure > how Metals and Joern are in regard of this. > > There is also a decision to make between upgrading the existing scala > > package, or switching to versioned scala-x.y packages (the existing > > scala package could then depend on the latest version, similarly to the > > default-jre package). The key factor here is backward compatibility, how > > stable is Scala nowadays? Do libraries still have to be rebuilt for new > > Scala versions? If so a versioned package might be more appropriate. >=20 > There are also packages depending on Scala 2.11: plm, pilon, latexdraw, > htsjdk, unicycler: they would need to be ported to 2.13 o r think about > retiring them if we would remove 2.11. >=20 > Regarding versioned scala-x.y vs upgrading scala: versioned, for the > compatibility reason you raise. Scala is binary compatible within a minor > (any 2.13.x library works on any 2.13.x) but not across minors, so every > library is cross-compiled per series: e.g.: upstream encodes it in the na= me > (foo_2.12, foo_2.13, foo_3). We can mirror default-jdk: real > scala-2.12/scala-2.13/scala3 plus a thin scala metapackage. scala-2.12 > already exists in that shape; Scala 3 is stable across 3.x and reuses the > 2.13 library, so it slots in. Except that Scala 3 is just in a transition (with 3.8 and the new LTS now i= n RC1 3.9 which=20 abandon the 2.13 library and move to a new library rebuilt with Scala 3. S= orry to throw a=20 spanner in the works. BTW, I am all for getting Scala as a proper debian package. Although actua= lly all that are=20 really needed is sbt and scala-cli and these two will bring in the relevant= libraries for you. =20 sbt is about to go to version 2.0 (which is being built on Scala 3) and sca= la-cli now follows=20 the Scala 3 releases. I have used the DEB files for these two that virtusl= ab release. > > Did you consider bootstrapping Scala 3 directly instead of starting from > > 2.12? Wouldn't that be easier? >=20 > That was my initial question too. Why not bootstrap 3 directly: But I fo= und > this: It doesn't avoid the work: sbt (which 2.13 and 3 both build with) is > itself built with Scala 2.12, Scala 3's stdlib is the 2.13 library, and > Dotty self-bootstraps from a prior Scala 3 too. >=20 > Going straight to 3 would mean front-loading more prebuilt seeds (a 3 > compiler + sbt + a 2.13 STARR), meaning a bigger exemption to defend in > NEW, not a smaller one. The 2.12 seed is the smallest binary that unlocks > the whole chain and drops out after self-host. >=20 > I also factored in all the apps like Spark that still is getting users > everywhere and that is in 2.12/2.13. >=20 > My proposed plan then is: coexistence scala-asm (MR !3) + versioned > toolchain now, retire 2.11 once its rdeps migrate. Although I see it is > open to the team's preference on regard of the metapackage naming. >=20 > Please, Let me know what you think, > Juan --nextPart2414201.ElGaqSPkdT Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8" <html> <head> <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-8"> </head> <body><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0= ;">On Thursday, 11 June 2026 10:12:53 British Summer Time Juan M. M=C3=A9nd= ez Rey wrote:</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; El jueves, 11 de junio de 2026 a las 10:12, Emmanuel Bourg <ebourg@apa= che.org> escribi=C3=B3:</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; > Hi Juan,</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; > </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; > Thank you very much for working on Scala, I gave up years ago and I'= m</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; > glad someone is picking up the ball.</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; Thanks Emmanuel, glad to be able to hear your opinions with this, that me= ans</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; a lot, and what I found probably is related with your experience.</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; > I see there is a choice about preserving the old version (2.11) or n= ot.</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; > If you are confident packaging a new version of Scala is achievable,= </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; > then I'd vote for retiring the old version.</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; I can't definitely say, but I concur that most of the biggest projects</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; migrated long ago to Scala 2.12, Scala 2.13. e.g.: Spark, Almond, not sur= e</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; how Metals and Joern are in regard of this.</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; > There is also a decision to make between upgrading the existing scal= a</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; > package, or switching to versioned scala-x.y packages (the existing<= /p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; > scala package could then depend on the latest version, similarly to = the</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; > default-jre package). The key factor here is backward compatibility,= how</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; > stable is Scala nowadays? Do libraries still have to be rebuilt for = new</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; > Scala versions? If so a versioned package might be more appropriate.= </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; There are also packages depending on Scala 2.11: plm, pilon, latexdraw,</= p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; htsjdk, unicycler: they would need to be ported to 2.13 o r think about</= p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; retiring them if we would remove 2.11.</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; Regarding versioned scala-x.y vs upgrading scala: versioned, for the</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; compatibility reason you raise. Scala is binary compatible within a minor= </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; (any 2.13.x library works on any 2.13.x) but not across minors, so every<= /p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; library is cross-compiled per series: e.g.: upstream encodes it in the na= me</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; (foo_2.12, foo_2.13, foo_3). We can mirror default-jdk: real</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; scala-2.12/scala-2.13/scala3 plus a thin scala metapackage. scala-2.12</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; already exists in that shape; Scala 3 is stable across 3.x and reuses the= </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; 2.13 library, so it slots in.</p> <br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0= ;">Except that Scala 3 is just in a transition (with 3.8 and the new LTS no= w in RC1 3.9 which abandon the 2.13 library and move to a new library rebui= lt with Scala 3. Sorry to throw a spanner in the works.</p> <br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0= ;">BTW, I am all for getting Scala as a proper debian package. Althou= gh actually all that are really needed is sbt and scala-cli and these two w= ill bring in the relevant libraries for you. sbt is about to go to ve= rsion 2.0 (which is being built on Scala 3) and scala-cli now follows the S= cala 3 releases. I have used the DEB files for these two that virtusl= ab release.</p> <br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0= ;">> > Did you consider bootstrapping Scala 3 directly instead of sta= rting from</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; > 2.12? Wouldn't that be easier?</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; That was my initial question too. Why not bootstrap 3 directly: But= I found</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; this: It doesn't avoid the work: sbt (which 2.13 and 3 both build with) i= s</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; itself built with Scala 2.12, Scala 3's stdlib is the 2.13 library, and</= p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; Dotty self-bootstraps from a prior Scala 3 too.</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; Going straight to 3 would mean front-loading more prebuilt seeds (a 3</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; compiler + sbt + a 2.13 STARR), meaning a bigger exemption to defend in</= p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; NEW, not a smaller one. The 2.12 seed is the smallest binary that unlocks= </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; the whole chain and drops out after self-host.</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; I also factored in all the apps like Spark that still is getting users</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; everywhere and that is in 2.12/2.13.</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; My proposed plan then is: coexistence scala-asm (MR !3) + versioned</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; toolchain now, retire 2.11 once its rdeps migrate. Although I see it is</= p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; open to the team's preference on regard of the metapackage naming.</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; Please, Let me know what you think,</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; Juan</p> <br /><br /></body> </html> --nextPart2414201.ElGaqSPkdT--