[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26166: [PATCH] gnu: cargo: Simplify unpacking.
From: |
Danny Milosavljevic |
Subject: |
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
address@hidden (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?).