Also, even if you manage to do this, consider that to compile scala 2.12.8, you need all of its dependencies, including https://github.com/scala/scala-asm and https://github.com/scala/scala-xml (not 100% sure if this is one is actually required for the build ?) which both have an sbt-based build.
The structure of the sbt build hasnât deviated much from the ant build. It shouldnât be that hard to make the old scripts work again. But as long as you only need it to get sbt out of the way I wouldnât bother. Building the compiler and standard library is really quite simple. You could do it with a few lines of code in a shell script. The sbt build is so big (and the old ant build was even bigger) because it does many things you donât want or need for building a simple bootstrapping compiler (dependency management, incremental builds, packaging, source generation, testing, scaladoc/REPL/etc.). Itâs probably the same for sbt.
scala-asm and scala-xml shouldnât pose any problems. scala-asm is a fork of asm, written in Java and built with ant. If you can build asm, you should be able to build scala-asm. scala-xml is still needed to compile 2.12 but itâs just another source folder that you have to compile to a JAR, same as scala-library, scala-reflect and scala-compiler.
Of course, none of this matters if you donât have the right Scala binaries to start the bootstrapping process.
Excuse my total ignorance on this, but Iâm confused what your requirements are. Certainly you need some kind of compiler to get any kind of binaries regardless of the language? So what exactly does it mean to bootstrap?
Would it be legitimate if could you decompile the compiler to Java to get compiler source code you could compile with a Java compiler? Or simply claim that Java byte code is a kind of source code?
If theyâve been compiling Scala 2.11 in Debian, it seems like they have the modules and the dependencies figured out already. See the dependencies in the package pages:
- https://packages.debian.org/source/sid/scala
- https://packages.debian.org/sid/scala-asm
- https://packages.debian.org/sid/scala-xml
There probably werenât many significant changes in 2.12 to the build besides switching from ant to sbt.