all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pjotr Prins <pjotr.public12@thebird.nl>
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 07:01:43 +0000	[thread overview]
Message-ID: <20170226070143.GA15812@mail.thebird.nl> (raw)
In-Reply-To: <878touupj6.fsf@gmail.com>

On Sat, Feb 25, 2017 at 11:51:57AM -0600, Katherine Cox-Buday wrote:
> 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.

Maybe we can skip quite a few - it is expected that a Scala compiler
will compile with much older versions of Scala. But it is forensic
work and it is sad that the project itself does not care. I know, for
example, that the D community is aware and wants to make sure there is
a sane bootstrap path to support different backends.

The good news that if the compiler compiles and tests pass you should
be good - one advantage of strong typing. So you could automate
testing compilers and going forward in time from the earliest
versions. It would be an interesting exercise.

> >> The build for scala 2.9.2 attempts to pull some libraries from a
> >> remote
> >> source, so I'm assuming I'll need to also package those?
> >
> > Yes please.
> >
> >> I do, however, want to confirm that this is a sane plan
> >> before I set out on this journey. 
> >
> > Sounds good.
> >
> >> It would be easier if I could just do
> >> a binary package to bootstrap the toolchain and back-fill when I
> >> have
> >> more experience, but I wasn't sure if that is acceptable.
> >
> > It's acceptable. You should make sure to eventually do a reproducable
> > build - but it's OK to start with a binary package as a builder for
> > the time being.

Yes. And if Guix does not accept it on master you can provide an
alternative package repository and publishing host. This is possible
today and with the planned 'guix channnels' feature it will get even
easier for users to use that.

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22629

> 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?
> 
> > The question is whether it's actually easier that way. Guix uses
> > non-standard locations (for good reasons) - so a random executable you
> > download won't run because it won't find any libraries. The situation
> > is not that bad if it's in Java, though - you can always specify the
> > classpath when invoking the VM.

sbt is much like Java ant and Ruby bundler that it pulls in
dependencies as binary blobs. Circumventing that behaviour is possible
by providing local jar files - so sbt can find them - but they have to
be in place. I.e., they have been built earlier. To be honest, I never
liked sbt because there was too much 'magic' going on. Only good thing
about sbt is that the definitions are not XML but plain Scala ;). What
should really be a simple Makefile has become a system to deal with
development dependencies. A job much better left to a proper
deployment system such as Guix. That is why I wrote about Ruby being
in that boat and getting rid of rvm, rbenv and bundler:

  https://github.com/pjotrp/guix-notes/blob/master/RUBY.org#getting-rid-of-rvm-rbenv-and-bundler

Same goes for Python virtualenv etc. Essentially these tools are
solving the wrong problem. But then, they were not using Guix! Poor
man's dependency resolution.

In Guix we do not use Ruby bundler. The ruby-build-system is based on
Ruby gem to build gem's locally - that is possible because the gems
contain the full ruby source of the gem. For sbt may eventually need
something similar. Take a look at

  ./guix/build-system/ruby.scm 
  ./guix/build/ruby-build-system.scm 

Don't worry about this too much now. I remember we wrote the
ruby-build-system fairly quickly once you decide what solution to
pursue. Key is to decide where to get the sources of Scala projects,
compile them as packages using the scala-build-system and tell sbt to
use these without trying to pull in jars.

Ricardo and friends have achieved this for other JVM tools.

Pj.

  parent reply	other threads:[~2017-02-26  7:05 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
2017-02-26  7:51       ` Pjotr Prins
2017-02-26 10:18         ` Ricardo Wurmus
2017-02-26  7:01     ` Pjotr Prins [this message]
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=20170226070143.GA15812@mail.thebird.nl \
    --to=pjotr.public12@thebird.nl \
    --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.