rust-dev-tools / dev-tools-team

resources for the Rust dev-tools team
42 stars 9 forks source link

Toolstate.toml #30

Closed oli-obk closed 6 years ago

oli-obk commented 7 years ago

The rust repository has a file for fine grained disabling of tools: https://github.com/rust-lang/rust/blob/master/src/tools/toolstate.toml

Currently it allows disabling clippy and miri from being tested or built on Rust's CI. The reason they are in CI, is that they access compiler internals, and we want to know when a PR to rustc breaks the tool.

Historically rls and rustfmt were already built as part of the CI, and if you broke them, you had to

That's a lot of steps and a lot of waiting for tool authors and rustc reviewers and CIs and breakage from other PRs...

With the toolstate.toml, you can

The steps might not be fewer, but you don't have to wait around for anybody anymore.

Open issues:

Even if rls and rustfmt are changed so they stop being distributed with rustc in case they are broken, there are a few questions of how the user experience of that is supposed to be.

  1. rustup update nightly will update rustc, but you will have a broken tool (linker errors and whatnot)
  2. rustup update nightly will update rustc, and the tool will simply be gone (surprising)
  3. rustup update nightly will update rustc and the tool will be replaced by a shell script echoing "This tool is currently not available, please try again later updating your nightly
  4. rustup update nightly will abort if there is no newer nightly with your specific combination of components
    • you can remove the tool manually if you still want to update
    • add a force option to have one of the previously mentioned behaviours

While I have anecdotal evidence that ppl like option 4, once we have a few tools and there's a breakage spree, it might be hard to find a nightly where all your tools work

Am I missing some options?

Once we have a plan on how the user experience should be, we can start talking to rustup-ppl to figure out how to teach rustup about partial rustups

For the future, where some tools will be on stable, too, I don't see any issues, because we certainly are able to get clippy building on beta/stable within 6 weeks, and I think all other tools should be capable of doing the same. We could even consider informally requiring lockstep upgrades for PRs just before the beta branching. Or we just backport a fix to the beta branch. So the initial beta might be missing a few tools, but before it becomes stable it'll have all the tools in a working condition.