coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

cargo-install--path-. rebuilds everything from scratch, what's the point to first run cargo-build-release then?

Open laoshaw opened this issue 1 year ago • 3 comments

I built coreutils and then install it per the instructions:

cargo build --release cargo install --path .

I then noticed the second step just recompiles everything, do I still need the first cargo-build step at all?

laoshaw avatar Feb 10 '23 13:02 laoshaw

Those sections in the readme are indeed independent. I can see where the confusion comes from. Do you have a suggestion on how we could make that clearer?

tertsdiepraam avatar Feb 10 '23 15:02 tertsdiepraam

Maybe just the second step? not sure if 'cargo install --path .' implies 'release mode' though. Thanks.

It's really cargo-install's "problem", in that it rebuilds everything on its own, instead of just 'install' the output from 'cargo-build'

laoshaw avatar Feb 10 '23 16:02 laoshaw

Yeah --release is the default for cargo install. I'm sure there are good reasons why cargo install always rebuilds, probably to ensure that you're installing the right thing, or to force rerun build scripts.

tertsdiepraam avatar Feb 10 '23 16:02 tertsdiepraam