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;">&gt=
; Hi David,</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; </p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; 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;">&gt=
; 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;">&gt=
; </p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; 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;">&gt=
; 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;">&gt=
; the Debian approach.</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; </p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; 1. The 3.9 library: noted, thanks. I'd been assuming &quot;Scala 3 =3D th=
e 2.13</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; stdlib&quot;, 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;">&gt=
; 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;">&gt=
; 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.&nbsp; 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;">&gt=
; </p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; 2. On &quot;sbt + scala-cli bring the libraries&quot;:</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; </p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; 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;">&gt=
; via Coursier</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; (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;">&gt=
; </p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; 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;">&gt=
; believe this path is not possible.</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; </p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; 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;">&gt=
; 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;">&gt=
; 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;">&gt=
; 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;">&gt=
; </p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; 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;">&gt=
; 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;">&gt=
; 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.&nbsp; 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.&nbsp; 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.&nbsp; </p>
<br /><p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0=
;">&gt; </p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; 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;">&gt=
; </p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; Best,</p>
<p style=3D"margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt=
; Juan</p>
<br /><br /></body>
</html>
--nextPart3416205.aeNJFYEL58--