From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Input needed: Plan for packaging scala Date: Sun, 26 Feb 2017 00:08:37 +0100 Message-ID: <87wpcduave.fsf@elephly.net> References: <878tovwt43.fsf@gmail.com> <20170224194522.30b2ac58@scratchpost.org> <878touupj6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chlSM-0004Pj-96 for guix-devel@gnu.org; Sat, 25 Feb 2017 18:08:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chlSJ-0004Db-3p for guix-devel@gnu.org; Sat, 25 Feb 2017 18:08:50 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21086) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1chlSI-0004DP-SD for guix-devel@gnu.org; Sat, 25 Feb 2017 18:08:47 -0500 In-reply-to: <878touupj6.fsf@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Katherine Cox-Buday Cc: guix-devel@gnu.org Hi Katherine, it=E2=80=99s great that you want to take on Scala! I=E2=80=99ve done a bit of work in the past to get some Java things package= d and had to stop when I realised that nobody in the Java world seems to build dependencies from source. This makes it very hard for us to construct proper dependency graphs for Java packages. This is the primary reason why we only have a handful of Java packages in Guix. We don=E2=80=99t want to make an exception for Java and accept pre-built binaries just to increase the number of packages. (Luckily for us, Java build artifacts are often quite portable, so there=E2=80=99s n= ot as much urgency to make it work with Guix as there is for applications written in other languages.) The same applies to build systems other than ant. Maven cannot be built without Maven, and its dependencies have dependency cycles. I=E2=80=99ve b= een using the ant-build-system=E2=80=99s feature to generate a default build.xm= l to build some of these dependencies that would usually require Maven to build them. I=E2=80=99m not currently working on Java packaging (though I = still have a couple of patches that are almost ready). >> It seems you already did the hard work of finding out how to bootstrap >> Scala. (I think that writing the package definitions is the easy >> part. Finding the Scala versions that can be compiled by Java and then >> compile the correct newer Scala version using it is the hard part) > > Looks like not quite! After speaking to some friendly scala community > members, it looks[1] like the bootstrapping process is much more > harrowing. The last version of scala which only used Java to compile was > pre 2.0 (for reference the 2.0 commit appears to be here[2]). So we'd be > looking at a chain of scala packages numbering possibly in the hundreds > and going back 10+ years. Oof! Looking at the latest build.xml in the legacy-svn-scala repository the build requires a couple of jars that we don=E2=80=99t have in Guix. Th= ese (and their dependencies, recursively) would have to be built from source first. This alone would be a very demanding task. If we were able to build a version of the Scala compilers and libraries that does not require sbt it is unclear whether this would be a viable path towards a modern version of the language. Sadly, these bootstrapping problems are very common, which prompted some of us to start the Bootstrappable Builds project: http://boostrappable.org (temporarily offline) > For the aforementioned reasons, I'm going to start by just packaging the > source of sbt v0.13, but also the pre-built binary. This should help us > at least bootstrap scala in a sane way, if not immediately > sbt. Hopefully this still sounds OK? sbt (even at version 0.13) is written in Scala, so maybe it would be better to package a version of the Scala libraries and an implementation of scalac first. Or does sbt provide the complete toolchain? Are you aware of any other implementation of the Scala toolchain that we might be able to use for bootstrapping purposes? -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net