When running `rustup update` and a component fails to download, already downloaded component are redownloaded on subsequent run.
Problem you are trying to solve
When running rustup update and a component fails to download, already downloaded component are redownloaded on subsequent run.
Step to reproduce:
- Have multiple component to updates
- Run
rustup update - Have at least one component successfully download
- Have a component failed to download, for example by disconnecting your internet connection
- Rerun
rustup update - The component that was successfully downloaded is downloaded again
Solution you'd like
When a component is downloaded and another component failed to download, the component that was successfully downloaded should not need to be redownloaded again.
This would be useful for person like me that have a bad internet connection and a lot of targets (and thus components) installed.
Notes
No response
@dzamlo Thanks for filing this issue!
I believe this is already implemented, for instance when I intentionally interrupt my upgrade process, you can see that it is picking up the previous work automatically:
> rustup update
info: syncing channel updates for 'stable-aarch64-apple-darwin'
818.4 KiB / 818.4 KiB (100 %) 207.4 KiB/s in 3s
info: latest update on 2024-10-17, rust version 1.82.0 (f6e511eec 2024-10-15)
info: syncing channel updates for 'nightly-aarch64-apple-darwin'
845.8 KiB / 845.8 KiB (100 %) 326.1 KiB/s in 2s
info: latest update on 2024-11-26, rust version 1.85.0-nightly (7db7489f9 2024-11-25)
info: downloading component 'miri'
1.4 MiB / 1.4 MiB (100 %) 316.0 KiB/s in 3s
info: downloading component 'rust-src'
^C⏎
> rustup update
info: syncing channel updates for 'stable-aarch64-apple-darwin'
info: latest update on 2024-10-17, rust version 1.82.0 (f6e511eec 2024-10-15)
info: syncing channel updates for 'nightly-aarch64-apple-darwin'
845.8 KiB / 845.8 KiB (100 %) 366.8 KiB/s in 3s
info: latest update on 2024-11-26, rust version 1.85.0-nightly (7db7489f9 2024-11-25)
info: downloading component 'miri'
info: downloading component 'rust-src'
2.9 MiB / 2.9 MiB (100 %) 563.7 KiB/s in 6s
info: downloading component 'cargo'
^C⏎
> rustup update
info: syncing channel updates for 'stable-aarch64-apple-darwin'
info: latest update on 2024-10-17, rust version 1.82.0 (f6e511eec 2024-10-15)
info: syncing channel updates for 'nightly-aarch64-apple-darwin'
info: latest update on 2024-11-26, rust version 1.85.0-nightly (7db7489f9 2024-11-25)
info: downloading component 'miri'
info: downloading component 'rust-src'
info: downloading component 'cargo'
6.9 MiB / 6.9 MiB (100 %) 5.2 MiB/s in 1s
info: downloading component 'clippy'
info: downloading component 'rust-docs'
16.6 MiB / 16.6 MiB (100 %) 9.6 MiB/s in 1s
info: downloading component 'rust-std'
24.2 MiB / 24.2 MiB (100 %) 10.5 MiB/s in 2s
info: downloading component 'rustc'
54.6 MiB / 54.6 MiB (100 %) 11.4 MiB/s in 5s
info: downloading component 'rustfmt'
^C⏎
May I ask under what circumstances you believe this feature is not working as intended?
Partially related: https://github.com/rust-lang/rustup/issues/3776