Re: Re-bootstrapping sbt and modern Scala; the Scala 3 path is now open
David Goodenough <[email protected]> Fri, 12 Jun 2026 11:59:56 +0100
| Newsgroups | gmane.linux.debian.devel.java |
|---|---|
| Message-ID | <3048718.e9J7NaK4W3@continuum> |
This is a multi-part message in MIME format. --nextPart3416205.aeNJFYEL58 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On Thursday, 11 June 2026 23:18:11 British Summer Time Juan M. M=C3=A9ndez = Rey wrote: > Hi David, >=20 > Thanks for coming into discussion specially if it helps on > simplifying the process! I had a look to the VirtusLab approach. >=20 > So, please,let me see if what I gathered clarifies, then a question, > because I think that option is not fully possible for > the Debian approach. >=20 > 1. The 3.9 library: noted, thanks. I'd been assuming "Scala 3 =3D the 2.13 > stdlib", which holds to 3.8 but not 3.9's own _3 library. > It only affects the future Scala 3 layer; but for 2.12/2.13 and its > ecosystem are unchanged. I think that 3.8 also uses the scala_3 library. 3.8 was a kind of RC for 3= =2E9 so they wanted to=20 make the breaking changes first before jumping to what it an LTS release. >=20 > 2. On "sbt + scala-cli bring the libraries": >=20 > As far as I can see that works because they fetch deps from Maven Central > via Coursier > (https://scala-cli.virtuslab.org/docs/guides/introduction/dependencies/). >=20 > The Debian archive build targets must not attempt network access, so I > believe this path is not possible. >=20 > If we were to package sbt/scala-cli that still needs every library packag= ed > from source under /usr/share/maven-repo; that download model > is exactly what would prevent VirtusLab's .debs out of the archive, > hence why I suggested the approach proposed in this thread. >=20 > Question: can you confirm the VirtusLab .debs work that way. Like, they r= ely > on Coursier pulling dependencies at first use, rather than shipping them > from the archive? SBT and Scala-CLI will always use the cached versions of the libraries it f= inds from Maven=20 (or which ever repository you specify), and if you update the dependencies = on your build=20 file or script it will always go and fetch the new version from the reposit= ory. The cache=20 lives in the user's directory, and I don't think there is a system wide cac= he that debian=20 packages could populate. This also applies to the compiler and all its support libraries. So yes, the virtuslabs .debs do not try to package libraries, just the sbt = and scalacli. =20 Because that is the way the scala build system works. Packaging the compiler and the libraries is only of use if you want to run = them manually,=20 and no-one does that. =20 >=20 > Just want to be sure I'm describing them accurately. >=20 > Best, > Juan --nextPart3416205.aeNJFYEL58 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 23:18:11 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;">>= ; Hi David,</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 for coming into discussion specially if it helps on</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; simplifying the process! I had a look to the VirtusLab approach.</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;">>= ; So, please,let me see if what I gathered clarifies, then a question,</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; because I think that option is not fully possible for</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; the Debian approach.</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;">>= ; 1. The 3.9 library: noted, thanks. I'd been assuming "Scala 3 =3D th= e 2.13</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; stdlib", which holds to 3.8 but not 3.9's own _3 library.</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; It only affects the future Scala 3 layer; but for 2.12/2.13 and its</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; ecosystem are unchanged.</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I t= hink that 3.8 also uses the scala_3 library. 3.8 was a kind of RC for= 3.9 so they wanted to make the breaking changes first before jumping to wh= at it an LTS release.</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;">>= ; 2. On "sbt + scala-cli bring the libraries":</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;">>= ; As far as I can see that works because they fetch deps from Maven Central= </p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; via Coursier</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; (https://scala-cli.virtuslab.org/docs/guides/introduction/dependencies/).= </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;">>= ; The Debian archive build targets must not attempt network access, so I</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; believe this path is not possible.</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;">>= ; If we were to package sbt/scala-cli that still needs every library packag= ed</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; from source under /usr/share/maven-repo; that download model</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; is exactly what would prevent VirtusLab's .debs out of the archive,</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; hence why I suggested the approach proposed in this thread.</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;">>= ; Question: can you confirm the VirtusLab .debs work that way. Like, they r= ely</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; on Coursier pulling dependencies at first use, rather than shipping them<= /p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; from the archive?</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">SBT= and Scala-CLI will always use the cached versions of the libraries it find= s from Maven (or which ever repository you specify), and if you update the = dependencies on your build file or script it will always go and fetch the n= ew version from the repository. The cache lives in the user's directo= ry, and I don't think there is a system wide cache that debian packages cou= ld populate.</p> <br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0= ;">This also applies to the compiler and all its support libraries.</p> <br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0= ;">So yes, the virtuslabs .debs do not try to package libraries, just the s= bt and scalacli. Because that is the way the scala build system works= =2E</p> <br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0= ;">Packaging the compiler and the libraries is only of use if you want to r= un them manually, and no-one does that. </p> <br /><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;">>= ; Just want to be sure I'm describing them accurately.</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;">>= ; Best,</p> <p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>= ; Juan</p> <br /><br /></body> </html> --nextPart3416205.aeNJFYEL58--