Subject: bug#26166: [PATCH] gnu: cargo: Simplify unpacking.

From: [email-masked] (Ludovic Courtès)
Date: Wed, 19 Apr 2017 11:54:25 +0200

Hi Danny,

Danny Milosavljevic <[email-masked]> skribis:

> On Fri, 07 Apr 2017 22:58:32 +0200 [email-masked] (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. :)

Right.

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

OK, thanks for the explanation.  If you can think of pointers we can add
in comments to make it easier for future hackers to find out about this,
feel free to add them.

In the meantime, we shouldn’t block this patch any longer, so go ahead!

> 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?).

Dunno, ‘install-rust-library’ sounds good to me.

Thanks,
Ludo’.