Skip to content

Binary named rust-analyzer added to cargo bin path even when component is not added #3846

Open
@praveenperera

Description

@praveenperera

Verification

Problem

Rustup keeps adding a binary named rust-analyzer to the .cargo/bin folder. But I didn't add it because I want homebrew to manage rust-analyzer version, because I want the latest version. But since there is a rust-analyer in my path at ~/.cargo/bin/rust-analyzer my editor tries to use it.

Opening it i get a message

error: Unknown binary 'rust-analyzer' in official toolchain 'stable-aarch64-apple-darwin'.
To install, run `rustup component add rust-analyzer`

This is very annoying because I keep having to delete this dummy binary everytime i run rustup so my editor can find the actual binary. Is there any reason to create these dummy binaries? Can I disable this?

Steps

  1. Install rustup with with minimal

Possible Solution(s)

No response

Notes

No response

Rustup version

rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.78.0 (9b00956e5 2024-04-29)`

Installed toolchains

Default host: aarch64-apple-darwin
rustup home:  /Users/praveen/.rustup

stable-aarch64-apple-darwin (default)
rustc 1.78.0 (9b00956e5 2024-04-29)

OS version

MacOS Version 14.5 (23F79)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions