rust-lang / rust-lang/rustup

Force-reinstall a toolchain

Open
#2,820 7 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

Describe the problem you are trying to solve

My computer is haunted, and if I don't set the right environment variables before rustup update, the toolchain it installs will fail to use any procedural macros with fun errors like

error: /nix/store/90illc73xfs933d06daq6d41njs8yh66-glibc-2.32-37/lib/libc.so.6: version `GLIBC_2.33' not found (required by /home/jonas/dev/nrf-hal/target/debug/deps/libcortex_m_rt_macros-67ec7e8a841acd06.so)
   --> /home/jonas/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-rt-0.6.13/src/lib.rs:403:1
    |
403 | extern crate cortex_m_rt_macros as macros;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Describe the solution you'd like

Because I re-learn this fun fact after every Rust release, I end up with broken toolchains a lot. It would be helpful if rustup supported a way to force a reinstallation of a toolchain and all of its components and targets, without having to use rustup uninstall, since that would mean I have to reinstall every component and target I use.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the rustup update and rustup uninstall command paths. Determine how a force-reinstall operation could preserve and reinstall the toolchain's existing components and targets; done means users can reinstall the toolchain without manually reinstalling each component or target.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.