Skip to content

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

@liskin

Description

@liskin
Contributor

Rust 1.87.0 has finally removed the long deprecated RLS (see also Previous Components), but the rust feature unfortunately installs that component unconditionally:

rustup component add rls rust-analysis rust-src rustfmt clippy 2>&1

This results in a build error:

#17 21.24 Installing common Rust dependencies...
#17 21.39 error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rls' for target 'x86_64-unknown-linux-gnu'; did you mean 'rustc'?
#17 21.40 ERROR: Feature "Rust" (ghcr.io/devcontainers/features/rust) failed to install! Look at the documentation at ********/devcontainers/features/tree/main/src/rust for help troubleshooting this error.
#17 ERROR: process "/bin/sh -c cp -ar /tmp/build-features-src/rust_2 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/rust_2  && cd /tmp/dev-container-features/rust_2  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/rust_2" did not complete successfully: exit code: 1

and "This codespace is currently running in recovery mode due to a container error."

Can we please drop rls and rust-analysis from the rustup component add invocation?

Activity

NeoScript

NeoScript commented on May 15, 2025

@NeoScript
Contributor

I can second this. I was about to post an issue myself when I first saw this

This is my error log when trying to add the devcontainer feature to a python based devcontainer

[2025-05-15T22:54:47.556Z] 
46.02 Installing common Rust dependencies...
46.09 error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rls' for target 'x86_64-unknown-linux-gnu'; did you mean 'rustc'?
46.10 ERROR: Feature "Rust" (ghcr.io/devcontainers/features/rust) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/rust for help troubleshooting this error.
[2025-05-15T22:54:47.556Z] ------
[2025-05-15T22:54:47.556Z] failed to solve: process "/bin/sh -c cp -ar /tmp/build-features-src/rust_4 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/rust_4  && cd /tmp/dev-container-features/rust_4  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/rust_4" did not complete successfully: exit code: 1

I would recommend adding rust-analyzer as a replacement for rls. Additionally, perhaps we drop support for versions of rust older than 1.64 to prevent issues since rust-analyzer was released during 1.64

Sources:
https://doc.rust-lang.org/stable/releases.html#misc-6
rust-lang/rust#98640

liskin

liskin commented on May 16, 2025

@liskin
ContributorAuthor

I would recommend adding rust-analyzer as a replacement for rls.

I don't think this is necessary. VSCode downloads and uses its own copy of rust-analyzer. Not sure if enough people use emacs/neovim in a devcontainer/Codespaces to justify installing it using rustup as well.

(I mean, not that I really care… but if I were to add it I'd like to understand why I'm doing it.)

self-assigned this
on May 16, 2025
KarstenB

KarstenB commented on May 16, 2025

@KarstenB

Just ran into this as well. I also think that most tools either install it themselves or don't use it. Complete removal is fine for me. Another option would be to add a components option and allow to override the components that are to be installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Participants

    @liskin@KarstenB@NeoScript@Mathiyarasy

    Issue actions

      rust: Fails since Rust 1.87.0 (2025-05-15) · Issue #1361 · devcontainers/features