Package: wnpp Severity: wishlist Owner: Juan Manuel Méndez Rey <[email protected]>
* Package name : dh-scala Version : 0.1 Upstream Author : Juan Manuel Méndez Rey <[email protected]> URL : https://salsa.debian.org/mendezr/dh-scala License : GPL-3+ Programming Lang: Perl Description : debhelper build system for Scala libraries dh-scala builds Scala libraries for Debian without sbt. A short debian/scala-build file lists, for each artifact and Scala binary version (2.12, 2.13 or 3), the source directories, the compiler options taken from upstream's build and the dependencies, given as Maven coordinates resolved in /usr/share/maven-repo. dh-scala compiles the Scala and Java sources with the Scala compiler from the archive, writes reproducible jars and installs them with maven-repo-helper under their Maven artifact names (such as scala-xml_2.13). The same source builds dh-make-scala, which starts the debian/ directory of a library from its POM on Maven Central and the git tag of the release, and compares the built jars with upstream's. Every Scala library in Debian today needs a hand written build in debian/rules, because sbt is not in the archive. dh-scala replaces that with a declarative file, the way dh-golang and dh-cargo do for Go and Rust. It is written in Perl and has no Scala dependency of its own, so it adds no bootstrap cycle. It was tested by porting scala-xml-2.12 and scala-parser-combinators-2.12 (https://bugs.debian.org/1139712 and https://bugs.debian.org/1139718) to it: the resulting jars contain the same classes, byte for byte, as their hand written builds, and two builds give identical packages. dh-make-scala was then used on scala-xml 2.3.0 (one source built for Scala 2.13 and 3), scala-parallel-collections, geny, portable-scala-reflect and munit (three modules, one of them in Java): every class of upstream's jars is present in the packages built with sbuild. Libraries that generate sources at build time, such as scala-java8-compat, are its current limit, and the comparison with upstream reports it. The libraries sbt 2 needs (12 sources, sbt included) were then packaged with it, not yet uploaded. The package includes a guide for packagers and complete examples taken from these packages. I plan to maintain it within the Debian Java team. The first upload would go to experimental, until more Scala libraries use it.

