GNU bug report logs - #26166
[PATCH] gnu: cargo: Simplify unpacking.

Previous Next

Package: guix-patches;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Sun, 19 Mar 2017 00:30:02 UTC

Severity: normal

Tags: patch

Done: Danny Milosavljevic <dannym <at> scratchpost.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 26166 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 26166 <at> debbugs.gnu.org
Subject: Re: bug#26166: [PATCH] gnu: cargo: Simplify unpacking.
Date: Fri, 14 Apr 2017 00:20:52 +0200
Hi Ludo,

On Fri, 07 Apr 2017 22:58:32 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:

> It’s not immediately obvious that it’s a simplification.  ;-)

Yeah well.  Simple doesn't mean shorter.  I think it's clearer to understand what it's doing when there a procedures that have names suggesting what it's for. :)

> For clarity it may help to replace the ‘let’ with “internal defines”,

Done.

> I don’t fully understand this file, but if it sounds good to you, we
> should apply it.

Yeah, Rust stuff is definitely not straightforward.

What this does is it sets up dependencies that are required to build cargo - just like cargo-vendor (an extension of cargo) would have set them up.

This avoids another bootstrapping problem (we would have to have cargo-vendor binaries).  But cargo-vendor is an entirely avoidable dependency because the format of their package metadata is stable (and very minimal).

The format of the metadata is stable because cargo-vendor is the official way to bundle libraries with your custom project - we just bundle them on-the-fly to avoid bundling them in the cargo distribution file (like David's version did before) and previously having to distribute our own custom version of cargo.

cargo-vendor is a way that any developer on the world can use to bundle stuff for his Rust project *and check it into his git repository*.  That means that metadata is on git repos Mozilla doesn't control - which means the format has to be stable (or at least backward-compatible).

Now we replace cargo-vendor entirely.  Both cargo-build-system and this cargo package do cargo-vendors job in Guile (that's what install-rust-library does; now I wonder whether I should call it 'bundle-rust-library' instead.  WDYT?).




This bug report was last modified 8 years and 12 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.