GNU bug report logs -
#38408
[PATCH 0/3] (WIP) Semantic version aware recusive importer for crates
Previous Next
Reported by: Martin Becze <mjbecze <at> riseup.net>
Date: Thu, 28 Nov 2019 00:14:01 UTC
Severity: normal
Tags: patch
Merged with 44560,
44694
Fixed in version 44560
Done: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hi Martin!
> On Dec 1, 2019, at 7:17 PM, Martin Becze <mjbecze <at> riseup.net> wrote:
>
> oh to be more clear. Even with "#:skip-build? #t" on all the rust libs,
> things fail if I omit one optional dependency from somewhere. I'm just
> testing on hello-cli but hello-cli inculdes clap which has alot of
> optional deps. In ./guix/build-systems/cargo.scm on line 186 it says
>
> "Cargo requires all transitive crate dependencies' sources to be
> available
> in its index, even if they are optional (this is so it can generate
> deterministic Cargo.lock files regardless of the target platform or
> enabled
> features). Thus we need all transitive crate dependencies for any cargo
> dev-dependencies, but this is only needed when building/testing a crate
> directly
> (i.e. we will never need transitive dev-dependencies for any dependency
> crates)."
>
> I haven't really dug into the cargo build-system yet but my guess is
> that the problem lies there. Allllsooo i totally could have missed
> something simple.. idk
Yes, this is the primary limitation of packaging rust crates into guix
without manually needing to edit the Cargo.toml definition.
My opinion is that the easiest (to maintain) method for incorporating
rust packages into guix is to bite the bullet and perform a (source)
import of all transitive dependencies that a package might need.
Manually keeping up with tweaking the Cargo.toml file for every single
potential package, across every single published version will make
you go mad :)
Then the challenge would be how to automate the incremental importing
from crates.io <http://crates.io/> (for example, some crates require a specific x.y.z version of
a dependency, some are willing to work with x.y.*, some have ranges, etc.)
and making sure that all packaged crates point to the appropriate dependencies
as they get updated in guix.
—Ivan
[Message part 2 (text/html, inline)]
This bug report was last modified 4 years and 160 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.