fast idempotent install
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 22h 40m
- Merged PRs (30d)
- 46
Description
It would be nice to have a fast idempotent install command for toolchains, so that scripts which wrap rustup can automagically install the right toolchain version, without the overhead of hitting the repository when the toolchain is already installed.
Currently issuing a 'rustup install nightly-2016-09-04' or 'rustup install 1.11.0', after it has been installed takes 250ms-2sec, and fails if there's no network access.
I understand multiple releases might technically happen on a given day, or a release version might even be reissued (?)... this feature might benefit from the ability to refer to toolchains by hash? Would settle for a flag indicating not to check for updates if some instance of that toolchain is already installed. I will probably hack this for now with a rustup show | grep <toolchain>.
To motivate this idea: my approach to application build scripts is to leave the $HOME and the system alone as much as possible, so I set RUSTUP_HOME/CARGO_HOME to a path inside my project (e.g. vendor/rustup, vendor/cargo), and automate as much as I can in an idempotent way, starting from a git clone and bash. Someone who just wants to make a build of my project should not be concerned about side-effects on their system, or even necessarily understand what rustup or cargo are.
Rustup is awesome for this so far.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no file or test; begin by tracing the existing rustup install command and its network check. Compare the requested behavior for already-installed toolchains with the proposed flag or hash-based approach. Done means repeated installs are fast and idempotent, including when network access is unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100