unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: randomlooser@riseup.net, Pjotr Prins <pjotr.public12@thebird.nl>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Idea: a meta language for (language) build systems - npm, Racket, Rust cargo
Date: Tue, 01 Jun 2021 17:22:15 +0200	[thread overview]
Message-ID: <0c426aa1977266992380948480b3fd9dddc7a44b.camel@student.tugraz.at> (raw)
In-Reply-To: <603e88c833f7160b3010a1c5bedceff4fd25491c.camel@riseup.net>

Am Dienstag, den 01.06.2021, 13:28 +0200 schrieb Adriano Peluso:
> Il giorno mar, 01/06/2021 alle 13.03 +0200, Leo Prikler ha scritto:
> > Am Dienstag, den 01.06.2021, 12:52 +0200 schrieb Adriano Peluso:
> > > Il giorno mar, 01/06/2021 alle 11.11 +0200, Leo Prikler ha
> > > scritto:
> > > > > [...]
> > > Probably the Fractal package will depend on some others, so it's
> > > gonna be a collection 🤷️
> > > 
> > > Doesn't that happen already for traditional tarballs ?
> > We don't stuff tarball collections into packages.  We stuff inputs
> > into
> > packages and one input equals one tarball.
> > 
> > > >   We already drop all
> > > > vendored dependencies from tarballs, that aren't created by
> > > > Rust
> > > > et
> > > > al., this does the exact opposite.
> > > 
> > > I'm not sure I understand
> > > 
> > > This does the opposite ?
> > > 
> > > How so ?
> > Let's assume we form this sexp-pack and use it as input to some
> > package.  What happens?
> 
> we wouldn't use a sexp-pack as an input to a guix package in the same
> way as, as you noticed, we don't feed tarballs as inputs to guix
> packages
> 
> A Guix package doesn't depend on some tarballs. It depends on some
> other Guix packages
That's only half-true.  You can stuff origins into inputs and people do
that.
> In the same way, a Guix package wouldn't depend on a sexp-pack.
> 
> You can think of sexp-pack as an alternative format to tarball
> 
> With, maybe, some more metadata
Tarball + metadata is a standard of package management.[1]
> For example, a sexp-pack could contain a hash of itself and hashes of
> other _sexp-packs_ it depends on
> 
> Similarly to how, for example, python packages on pypi express
> dependecies on other packages in pypi
> 
> The difference is that, as far as I understand, python packages
> (those in pypi, not those in Guix) express dependencies in a somewhat
> loose way
> 
> Guix packages are stricter
> 
> sexp-packs could be stricter too, bringing part of the data
> reconciliation outside of Guix
I don't see the benefit here.  At best, sexp-packs are actual packages,
at worst they're closer to origins.  When bringing "dependencies" into
the mix, one might want to implement them as packages with near-empty
build, that have propagated-inputs.

I'm really struggling to see the use case here.  Packages are useful
abstractions to both developers and maintainers – the former need not
really care about the build step if all they want is an environment.

> A Guix importer could recursively import sexp-packs the same way the
> python importer...
You do know we can already import packages from JSON, right?

> I'm assuming that a Rust package can be built in a sane way, with
> dependencies properly sorted out.
> 
> I know that's possible for javascript packages, I'm not sure about
> Rust
The mathematical term you're seeking is "conjecture".

> Such a data/packages collection could be used by mainstream linux
> distributions too, as far as I understand 🤷️
Guess what, distros already use it.  Not the hypothetical data
collection you want to establish, the ones that actually exist as
published by pip, cpan, npm, cargo…

Whatever fancy intermediate format you want to think up, the fact that
this won't make anyone's lives easier follows from the data processing
inequality.  In other words, how you decide to lay out that data *does
not matter* as long as it can somehow be parsed (and remember that your
own tools will also need to parse it) and you don't omit anything – at
best importing data from your layout will be as good as importing it
from the original source.

In order to improve this situation, you would either need to improve
the tools in question (e.g. make it so that cargo actually produces
shared libraries) or replace them with technologies, that have the
properties we want (perhaps cargo by ninja).  If you furthermore want a
ubiquitous solution, guess what, that'd be Guix itself.  So you're
looking for something that's either similar to Guix or more
accommodating to Guix, that will get accepted by some language
community.  Note, that you can't really sell that solution on the same
grounds as Guix – as otherwise Guix would already be used instead – and
you will also have to compete against whatever technology already
exists, e.g. cargo or npm.

W.r.t. npm, I think an npm importer would already be a great
improvement.  IIUC the biggest problem with npm is the sheer number of
inputs.  We might also try to deduplicate dependencies, but alas, let's
not get ahead of ourselves.

Regards,
Leo

[1] https://xkcd.com/927/



  reply	other threads:[~2021-06-01 15:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-30  8:38 Idea: a meta language for (language) build systems - npm, Racket, Rust cargo Pjotr Prins
2021-05-30 19:17 ` Konrad Hinsen
2021-05-31 17:47   ` Pjotr Prins
2021-06-01  5:50     ` Adriano Peluso
2021-06-01  6:24     ` Leo Prikler
2021-06-01  7:23       ` Pjotr Prins
2021-06-01  8:12         ` Leo Prikler
2021-06-01  8:59       ` Adriano Peluso
2021-06-01  9:11         ` Leo Prikler
2021-06-01 10:52           ` Adriano Peluso
2021-06-01 11:03             ` Leo Prikler
2021-06-01 11:28               ` Adriano Peluso
2021-06-01 15:22                 ` Leo Prikler [this message]
2021-06-01  7:56     ` Konrad Hinsen
2021-06-01 23:35       ` Joshua Branson
2021-06-08 13:11     ` Ludovic Courtès
2021-06-14 14:29       ` Pjotr Prins
2021-06-14 22:04         ` Leo Prikler
2021-06-15  8:48           ` Pjotr Prins
2021-06-15 10:08           ` Ricardo Wurmus
2021-06-20 15:46         ` Ludovic Courtès

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=0c426aa1977266992380948480b3fd9dddc7a44b.camel@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=guix-devel@gnu.org \
    --cc=pjotr.public12@thebird.nl \
    --cc=randomlooser@riseup.net \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).