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

Consider adding rust-toolchain.toml to the repo #5335

Open
nazar-pc opened this issue Aug 13, 2024 · 6 comments
Open

Consider adding rust-toolchain.toml to the repo #5335

nazar-pc opened this issue Aug 13, 2024 · 6 comments

Comments

@nazar-pc
Copy link
Contributor

nazar-pc commented Aug 13, 2024

I understand that you use nightly compiler (which version?) for formatting purposes and stable (which version?) for compilation.

When contributing it is somewhat painful to see huge number of warnings caused by project using different (older) version of the compiler.

rust-toolchain.toml will fix at least compilation warnings by ensuring everyone is using exactly the same version without digging into your GitLab pipelines trying to figure out what you happen to use for linting (today it happens to be 1.77.0).

@bkchr
Copy link
Member

bkchr commented Aug 13, 2024

Yeah, when we switched to GHA we can do this switch. Basically the docker image could have the Rust version pre-installed, but the actual version is determined by the rust-toolchain.toml. This way we can bump the Rust version easily and the docker image could be updated later (to reduce CI time).

@nazar-pc
Copy link
Contributor Author

It is still possible to use +nightly-whatever for formatting purposes, it just defines the default

@alvicsam
Copy link
Contributor

Just fyi, rust version can be found in the CI image name here
For example, currently the image is docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v202407161507, where 1.77 is stable version and 2024-04-10 is nightly version

@nazar-pc nazar-pc changed the title Consider rust-toolchain.toml to the repo Consider adding rust-toolchain.toml to the repo Aug 13, 2024
@nazar-pc
Copy link
Contributor Author

Yep, that is exactly how I found it

@Wolfenheimm
Copy link

Hello folks, I'd like some advice on what would be needed in the rust-toolchain.toml file. I've made a basic example here in my PR, which will be used by the getting-started script, and I'm not familiar enough with the entire project's requirements.

@aurexav
Copy link
Contributor

aurexav commented Jan 10, 2025

I suggest using PRR in the release pipeline if transitioning to GHA. PRR is specifically designed for releasing runtimes based on the Polkadot SDK and provides robust support for rust-toolchain.toml, unlike srtool. This is one of he reasons that I chose to abandon srtool and develop PRR instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants