-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Explicit definition of required rust toolchain #11307
Comments
There were ideas of using the Maybe that thing could provide a proper interface hiding the |
We could also make |
I am also in favor of adding a |
While I'm for moving the control about the rust version to use into the repo instead of having the CI file defining this, I'm not convinced to introduce any kind of further magic. The rust-toolchain will also not fix issues by people experiencing build problems, because they probably depend on Substrate and their this toolchain file has no influence. Meaning they can still use some newer rust version that is maybe breaking something. |
Good idea, thanks. A short explainer about how CI automatically updates Rust versions currently: Of course we could read some particular ( |
I think we should just close this once we are using the same |
Currently we require a nightly toolchain to build the runtime (#1252). As part of CI we are currently using a nightly compiler for building the runtime and a stable compiler for the client code. It is not always obvious which nightly is needed to build Substrate at any given point (it's a common question in the support channels). Additionally, every time we need to bump the nightly version we need to ask the CI team to update the docker images otherwise the builds fail.
IMO we should introduce a
rust-toolchain
file that is supported by rustup (https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file). We could still have CI docker images that come with a rust toolchain preloaded as a performance optimization (to avoid always downloading the toolchain), but this would guarantee that we wouldn't need to bother CI team to update the image whenever we need to bump the nightly (they could do it asynchronously since it's just a performance optimization).This has one problem though: the rustup toolchain file only allows defining one toolchain to be used, whereas we currently use two toolchains. We could get around this by either: building everything with nightly (behavior change from what we do now), or using a stable toolchain with
RUSTC_BOOTSTRAP=1
(this is how we currently build our production runtimes AFAIK). The fact that users would have to setup that environment variable might be troublesome though (or we can introduce direnv to this project :)(I had previously created a PR for this: #10607)
The text was updated successfully, but these errors were encountered: