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

Align rust version with CI image's Rust version #3105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rosarp
Copy link
Member

@rosarp rosarp commented Feb 4, 2025

Current CI Image is paritytech/ci-unified:bullseye-1.81.0-2024-09-11-v202409111034

This also helps with Cargo.lock version issue:

Version of rust < 1.83 uses version "3" in Cargo.lock while version >= 1.83 uses version "4" in Cargo.lock.
This PR also solves this issue while keeping aligned with rust version used in github CI image. Which will eliminate back-and-forth build failures caused due to rust version mismatches.

current CI Image is paritytech/ci-unified:bullseye-1.81.0-2024-09-11-v202409111034
@rosarp rosarp requested a review from bkontur February 4, 2025 13:56
@@ -0,0 +1,3 @@
[toolchain]
channel = "1.81.0"
components = ["rust-src", "rust-analyzer"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need rust-analyzer?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rust-analyzer is not downloaded for any other version by default.
If this settings is not enabled, rust-analyzer wont work locally, as editor will try to load rust-analyzer for currently enabled rust version (if configured to use it).

Those who need it locally will need to run this command once in this repository:

rustup component add rust-analyzer

So, if larger population of devs dont need rust-analyzer locally, I can remove it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, I think I have never used rustup component add rust-analyzer, so now I think more we should not push local settings/setups to the git

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only applicable if you are using version other than stable.
Even for nightly it will be required locally.
I will remove both component from this config, as both will be only required on local.
Only that, every developer working on this repository will need to add this line to satisfy IDE.

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

Successfully merging this pull request may close these issues.

2 participants