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

Switch from sync to a tokio runtime #3367

Merged
merged 49 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
616ba09
Convert main to using a tokio runtime always
rbtcollins May 29, 2023
cf615ba
Make maybe_trace_rustup async
rbtcollins May 29, 2023
56853bd
Remove maybe_trace_rustup runtime setup
rbtcollins May 29, 2023
d1f5c55
Make run_rustup async
rbtcollins May 29, 2023
2277b8b
Convert run_rustup_inner to async
rbtcollins May 29, 2023
d8e7293
Make rustup_mode::main async
rbtcollins May 29, 2023
da291bb
Make download_with_backend async
rbtcollins May 29, 2023
eab53a5
Make download_to_path_with_backend async
rbtcollins May 29, 2023
0db19d1
Make download_file_ async
rbtcollins May 29, 2023
0fe714e
Make download_file_with_resume async
rbtcollins May 29, 2023
53b17f7
Make DownloadCfg::download async
rbtcollins May 29, 2023
b51b7c4
Make download_file async
rbtcollins May 30, 2023
ca0c797
Make try_install_msvc async
rbtcollins May 30, 2023
7f2123a
Make self_update::install async
rbtcollins May 30, 2023
b82e5f1
Make setup_mode::main async
rbtcollins Aug 15, 2023
b6cf2d7
Make get_available_rustup_version async
rbtcollins Aug 15, 2023
ab7346d
Make prepare_update async
rbtcollins Aug 15, 2023
4dde84b
Make check_rustup_update async
rbtcollins Aug 15, 2023
e639114
Make self_update::update async
rbtcollins Aug 15, 2023
dd0c9a2
Make DownloadCfg::download_hash async
rbtcollins Aug 15, 2023
e21aa20
Make DownloadCfg::download_and_check async
rbtcollins Aug 15, 2023
dcd0b36
Make download retries async
rbtcollins Aug 15, 2023
8fe45fb
Make manifestation::update async
rbtcollins Aug 15, 2023
5fd593c
Make common::self_update async
rbtcollins Aug 15, 2023
9f37164
Make dist::dl_*_manifest async
rbtcollins Aug 15, 2023
9a08ea9
Make update_v1 async
rbtcollins Aug 15, 2023
2a173cc
Make try_update_from_dist_ async
rbtcollins Aug 15, 2023
e70d7bc
Make update_from_dist_ async
rbtcollins Aug 15, 2023
c8db16c
Make update_from_dist async
rbtcollins Aug 15, 2023
e6b6f20
Make InstallMethod::run async
rbtcollins Aug 15, 2023
f4bd1a9
Make InstallMethod::install async
rbtcollins Aug 15, 2023
7edc2d2
Make show_dist_version async
rbtcollins Aug 15, 2023
7d0c892
Make update_extra async
rbtcollins Aug 15, 2023
825b1dd
Make toolchain.update async
rbtcollins Aug 15, 2023
0401846
Make DistributableToolChain::install async
rbtcollins Aug 16, 2023
a0e3acc
Make DistributableTool::install_if_not_installed async
rbtcollins Aug 16, 2023
0c68c56
Make DistributableToolchain::add_component async
rbtcollins Aug 16, 2023
584464f
Make DistributableToolchain::remove_component async
rbtcollins Aug 16, 2023
512e613
Make override_add async
rbtcollins Aug 16, 2023
9ba20eb
Make toolchain_link async
rbtcollins May 30, 2024
364b5ed
Make update_all_channels async
rbtcollins May 30, 2024
c7c7682
Make component_remove async
rbtcollins Aug 16, 2023
c1e51de
Make component_add async
rbtcollins Aug 16, 2023
e89952d
Make target_remove async
rbtcollins Aug 16, 2023
47477e2
Make target_add async
rbtcollins Aug 16, 2023
6a79501
Make check_updates async
rbtcollins Aug 16, 2023
5dc8bf9
Make default_ async
rbtcollins Aug 16, 2023
b2f1e21
Make update async
rbtcollins Aug 16, 2023
d14b3e8
Make manifestation test update_from_dist async
rbtcollins Aug 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make self_update::install async
  • Loading branch information
rbtcollins authored and djc committed May 30, 2024

Verified

This commit was signed with the committer’s verified signature.
djc Dirkjan Ochtman
commit 7f2123ad927b98be4cac4cf94af487c847e88d52
4 changes: 2 additions & 2 deletions src/cli/self_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ fn canonical_cargo_home() -> Result<Cow<'static, str>> {
/// Installing is a simple matter of copying the running binary to
/// `CARGO_HOME`/bin, hard-linking the various Rust tools to it,
/// and adding `CARGO_HOME`/bin to PATH.
pub(crate) fn install(
pub(crate) async fn install(
no_prompt: bool,
verbose: bool,
quiet: bool,
Expand Down Expand Up @@ -399,7 +399,7 @@ pub(crate) fn install(
md(&mut term, MSVC_AUTO_INSTALL_MESSAGE);
match windows::choose_vs_install()? {
Some(VsInstallPlan::Automatic) => {
match utils::run_future(try_install_msvc(&opts)) {
match try_install_msvc(&opts).await {
Err(e) => {
// Make sure the console doesn't exit before the user can
// see the error and give the option to continue anyway.
Expand Down
2 changes: 1 addition & 1 deletion src/cli/setup_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,5 @@ pub fn main() -> Result<utils::ExitCode> {
targets: &target.iter().map(|s| &**s).collect::<Vec<_>>(),
};

self_update::install(no_prompt, verbose, quiet, opts)
utils::run_future(self_update::install(no_prompt, verbose, quiet, opts))
}