all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Overhauling the cargo-build-system
Date: Sun, 17 Nov 2019 09:19:34 +0200	[thread overview]
Message-ID: <20191117071934.GC12423@E5400> (raw)
In-Reply-To: <87imnjtsk3.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 3278 bytes --]

On Sat, Nov 16, 2019 at 10:33:32PM +0100, Ludovic Courtès wrote:
> Hello!
> 
> Martin Becze <mjbecze@riseup.net> skribis:
> 
> > Sorry for digging up and old issue, but i just saw commit
> > 86e443c71d4d19e6f80cad9ca15b9c3a301c738c
> >
> >> It makes for a very large package definition, but we
> > wouldn't have to ensure thousands of other rust libraries built so we
> >
> > The whole point of package management is that you can use module
> > building blocks. By having to specify the sub-dependencies in a top
> > level definition kinda breaks the whole modular thing. In commit
> > 86e443c71d4d19e6f80cad9ca15b9c3a301c738c all the inputs got removed for
> > all the libraries. So if I'm trying to use guix as package manager for a
> > rust project and I want to use one of the rust libraries in
> > crates-io.scm, how am i suppose to do this? I can't just include it as
> > an input to my project because now I have to look up all of it
> > dependencies as well?
> 
> I agree that removing all the dependencies from Rust packages feels
> wrong.
> 
> What I would have liked is to somehow replace the #:cargo-inputs
> argument (which is build-system-specific and thus “opaque”) with regular
> ‘native-inputs’ or ‘inputs’ field.
> 
> I know it’s not that easy with Rust and Cargo, I just never manage to
> fully grasp why :-), but at least that should be our horizon IMO.
> 
> WDYT, Efraim, Martin, and other Rusty people?  :-)
> 

The big problems are the recursive dependencies, the partial
dependencies and the versioning. There are some that are easy to figure
out, serde always needs serde-derive, winapi always needs the
winapi-[i686|x86_64] crates, rayon -> rayon-core, etc. The real problem
is that each crate has a number of features, and only needs certain
inputs based on those features. If we include too few then we're stuck
specifying dependencies anyway. If we include all of them then we're
stuck packaging way more versions of things than we actually need. This
by itself might not be a problem; we could just say "this is what the
importer gave us based on upstream, if you're missing something you're
on your own to add it."

I have one package that I was working on, a custom rust package (which
is unfortunately still missing a license file). In the end I needed
about 70 crates. Before the change I had it building with about 200
packaged crates but the file itself failed to compile with a 'guix pull'
because of all the still unpackaged crates which were referenced by
other packaged crates. I still haven't reached the bottom of that tree,
and I have more than 500 crates that I haven't upstreamed yet.

The current situation definitely could be better. Without opening the
repo there's no way to know which crates are packaged. When updating a
crate there's no way to know which packages will be rebuilt.

I suppose one way to work around some of the issues is to make it so
that the crates "build" by copying the source to %out/share/guix-vendor
or something.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2019-11-17  7:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 15:50 Overhauling the cargo-build-system Efraim Flashner
2019-10-10 22:33 ` Ludovic Courtès
2019-10-11 14:13   ` Efraim Flashner
2019-11-16  6:31     ` Martin Becze
2019-11-16 16:37       ` John Soo
2019-11-16 18:44         ` Martin Becze
2019-11-16 21:33       ` Ludovic Courtès
2019-11-17  2:35         ` Martin Becze
2019-11-17  7:19         ` Efraim Flashner [this message]
2019-11-17 21:22           ` Ludovic Courtès
2019-11-18 10:20             ` Efraim Flashner
2019-11-23 17:27               ` Ludovic Courtès
2019-12-09  4:45           ` Chris Marusich
2019-12-09 20:14             ` Martin Becze
2019-12-19 16:10               ` Ludovic Courtès
2019-12-19 16:09             ` Ludovic Courtès
2019-12-19 17:23               ` John Soo

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=20191117071934.GC12423@E5400 \
    --to=efraim@flashner.co.il \
    --cc=guix-devel@gnu.org \
    --cc=ludo@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.