-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Closed
Copy link
Labels
C-bugCategory: bugCategory: bugCommand-installS-needs-infoStatus: Needs more info, such as a reproduction or more background for a feature request.Status: Needs more info, such as a reproduction or more background for a feature request.
Description
Problem
Cargo updates the index repeatedly even though we are installing all the binaries at once.
This seems inefficient and overkill, as it's unlikely that the index would change much between downloading one crate and moving to the next.
See steps section for example.
Steps
Install multiple cargo binary crates at once, like so
cargo install eza bat ripgrep
Example docker run
[1/2] STEP 4/5: RUN cargo install $(cat useful-crates)
Updating crates.io index
Downloading crates ...
Downloaded eza v0.18.3
Updating crates.io index
Downloading crates ...
Downloaded bat v0.24.0
Updating crates.io index
Downloading crates ...
Downloaded zoxide v0.9.3
Updating crates.io index
Downloading crates ...
Downloaded bottom v0.9.6
Updating crates.io index
Downloading crates ...
Downloaded ripgrep v14.1.0
Updating crates.io index
Downloading crates ...
Downloaded xsv v0.13.0
Updating crates.io index
Downloading crates ...
Downloaded fd-find v9.0.0
Updating crates.io index
Downloading crates ...
Downloaded yazi-fm v0.2.3
Updating crates.io index
Downloading crates ...
Downloaded du-dust v0.9.0
Updating crates.io index
Downloading crates ...
Downloaded hexyl v0.14.0
Updating crates.io index
Downloading crates ...
Downloaded bingrep v0.11.0
Updating crates.io index
Downloading crates ...
Downloaded git-delta v0.16.5
Updating crates.io index
Downloading crates ...
Downloaded gitui v0.24.3
Updating crates.io index
Downloading crates ...
Downloaded ouch v0.5.1
Updating crates.io index
Downloading crates ...
Downloaded nu v0.90.1
Updating crates.io index
Downloading crates ...
Downloaded starship v1.17.1
Updating crates.io index
Downloading crates ...
Downloaded watchexec-cli v1.25.1
Installing eza v0.18.3
Updating crates.io index
Downloading crates ...
Downloaded palette_derive v0.7.4
Downloaded idna v0.5.0
Downloaded either v1.10.0
Downloaded base64 v0.21.7
.
.
.
Possible Solution(s)
Update index only once per command invocation?
Notes
No response
Version
cargo 1.76.0 (c84b36747 2024-01-18)
release: 1.76.0
commit-hash: c84b367471a2db61d2c2c6aab605b14130b8a31b
commit-date: 2024-01-18
host: x86_64-unknown-linux-gnu
# The one on latest docker image https://github.com/rust-lang/docker-rust/blob/e5921dbae8fe56407a992307d1e2c2716ba8202d/1.76.0/bookworm/Dockerfile
Metadata
Metadata
Assignees
Labels
C-bugCategory: bugCategory: bugCommand-installS-needs-infoStatus: Needs more info, such as a reproduction or more background for a feature request.Status: Needs more info, such as a reproduction or more background for a feature request.