Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When running rustup update and a component fails to download, already downloaded component are redownloaded on subsequent run. #4100

Open
dzamlo opened this issue Nov 26, 2024 · 2 comments

Comments

@dzamlo
Copy link

dzamlo commented Nov 26, 2024

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:

  1. Have multiple component to updates
  2. Run rustup update
  3. Have at least one component successfully download
  4. Have a component failed to download, for example by disconnecting your internet connection
  5. Rerun rustup update
  6. 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

@rami3l
Copy link
Member

rami3l commented Nov 26, 2024

@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?

@rami3l
Copy link
Member

rami3l commented Nov 29, 2024

Partially related: #3776

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants