Skip to content

fix(rust): remove rls and rust-analysis for Rust 1.87+ compatibility#1362

Merged
eljog merged 6 commits into
devcontainers:mainfrom
liskin:fix-rust-1-87
May 19, 2025
Merged

fix(rust): remove rls and rust-analysis for Rust 1.87+ compatibility#1362
eljog merged 6 commits into
devcontainers:mainfrom
liskin:fix-rust-1-87

Conversation

@liskin

@liskin liskin commented May 15, 2025

Copy link
Copy Markdown
Contributor

Rust 1.87.0 and later have removed the long-deprecated RLS and rust-analysis components. This change updates the install script to only add rust-src, rustfmt, and clippy, preventing build errors during feature installation. See: rust-lang/rust#126856 https://blog.rust-lang.org/2022/07/01/RLS-deprecation/ https://github.com/rust-lang/rustup/blob/a92432fc8b6d5d4e56ebd08ca1c45b7b1294c1bd/doc/user-guide/src/concepts/components.md#previous-components

Fixes: #1361

Rust 1.87.0 and later have removed the long-deprecated RLS and rust-analysis
components. This change updates the install script to only add rust-src,
rustfmt, and clippy, preventing build errors during feature installation. See:
rust-lang/rust#126856
https://blog.rust-lang.org/2022/07/01/RLS-deprecation/
https://github.com/rust-lang/rustup/blob/a92432fc8b6d5d4e56ebd08ca1c45b7b1294c1bd/doc/user-guide/src/concepts/components.md#previous-components

Fixes: #1361
@liskin liskin requested a review from a team as a code owner May 15, 2025 23:10
@NeoScript

Copy link
Copy Markdown
Contributor

Hey! I just added a couple more changes: https://github.com/liskin/features/pull/1
This will help replace rls with rust-analyzer and prevent versions older than 1.64 to prevent issues where rust-analyzer is not available.

Not 100% familiar with fork etiquette so I kinda just added it on to your fork. Thanks!

@NeoScript

NeoScript commented May 15, 2025

Copy link
Copy Markdown
Contributor

Also, as a quick workaround for anyone facing a similar problem. Just pin rust to 1.86 for now inside your .devcontainer/devcontainer.json file under features:

"ghcr.io/devcontainers/features/rust:1": {
	"version": "1.86",
	"profile": "default"
}

Tip

Read more about rustup profiles here

@Mathiyarasy Mathiyarasy self-requested a review May 16, 2025 11:04
@Mathiyarasy

Mathiyarasy commented May 16, 2025

Copy link
Copy Markdown
Contributor

Thank you @liskin and @NeoScript for your contributions.
Please increment the version in rust feature.
If you merge the PR of Further fixes for rls deprecation #1
I think this PR gets ready to be merged ..

@liskin

liskin commented May 16, 2025

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

(although I wonder if it's really me who needs to agree, as this CLA nonsense started only after I've pulled @NeoScript's commits into my branch…)

@NeoScript

Copy link
Copy Markdown
Contributor

@microsoft-github-policy-service agree

Hello! Sorry I've not seen any notifications around the service agree but just in case.

@eljog

eljog commented May 19, 2025

Copy link
Copy Markdown
Member

Approving workflow run

@eljog eljog left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the contribution 🎉

@eljog eljog merged commit 94ed0bb into devcontainers:main May 19, 2025
12 checks passed
@liskin liskin deleted the fix-rust-1-87 branch May 21, 2025 10:15
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.

rust: Fails since Rust 1.87.0 (2025-05-15)

4 participants