all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: Input needed: Plan for packaging scala
Date: Sun, 26 Feb 2017 00:08:37 +0100	[thread overview]
Message-ID: <87wpcduave.fsf@elephly.net> (raw)
In-Reply-To: <878touupj6.fsf@gmail.com>

Hi Katherine,

it’s great that you want to take on Scala!

I’ve done a bit of work in the past to get some Java things packaged 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’t 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’s not 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’ve been
using the ant-build-system’s feature to generate a default build.xml to
build some of these dependencies that would usually require Maven to
build them.  I’m 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’t have in Guix.  These
(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

  reply	other threads:[~2017-02-25 23:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-24 14:39 Input needed: Plan for packaging scala Katherine Cox-Buday
2017-02-24 18:45 ` Danny Milosavljevic
2017-02-25 17:51   ` Katherine Cox-Buday
2017-02-25 23:08     ` Ricardo Wurmus [this message]
2017-02-26  7:51       ` Pjotr Prins
2017-02-26 10:18         ` Ricardo Wurmus
2017-02-26  7:01     ` Pjotr Prins
2017-03-14 14:56     ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wpcduave.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=cox.katherine.e@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.