GNU bug report logs - #38408
[PATCH 0/3] (WIP) Semantic version aware recusive importer for crates

Previous Next

Package: guix-patches;

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

From: Ivan Petkov <ivanppetkov <at> gmail.com>
To: Martin Becze <mjbecze <at> riseup.net>
Cc: guix-devel <at> gnu.org, 38408 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>
Subject: [bug#38408] [PATCH] WIP patches for the rust importer
Date: Tue, 3 Dec 2019 18:40:37 -0800
[Message part 1 (text/plain, inline)]
Hi Martin,

> On Dec 2, 2019, at 3:10 PM, Martin Becze <mjbecze <at> riseup.net> wrote:
> 
> When you say source import of the transitive dependencies, do you mean
> that all the rust libs should just be source only or do you mean the top
> level package should have to declare all the transitive dependencies?

All rust libs should be source only imports, but each package definition
should only declare dependencies on the crates it consumes directly and
guix should figure out the rest (in other words, I’d expect there to be a 
one-to-one mapping between a Cargo.toml and a package definition).

For example, if crate foo depends on crate bar which depends on crate
baz, I’d expect the definitions to look like:

(define-public rust-foo
  (package
    (name “rust-foo")
    (source-input `((“bar” ,bar)))))

(define-public rust-bar
  (package
    (name “rust-bar")
    (source-input `((“baz” ,baz)))))

(define-public rust-baz
  (package
    (name “rust-baz")))

But while building foo (assuming it is some kind of application), guix
would ensure that bar and baz are available in the build environment.

IMO this direction would be the most maintainable in the long term.

—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.