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

rust-analyzer is not being automatically proxied after installing #3801

Closed
2 tasks done
Cavig01 opened this issue May 1, 2024 · 4 comments
Closed
2 tasks done

rust-analyzer is not being automatically proxied after installing #3801

Cavig01 opened this issue May 1, 2024 · 4 comments
Labels
not-rustup Whatever is described in this issue isn't Rustup's fault

Comments

@Cavig01
Copy link

Cavig01 commented May 1, 2024

Verification

Problem

Just as in the title.
Both belonging to DUP_TOOLS, rustfmt doesn't seem to have the problem. Why?

Steps

$ rustup component add rust-analyzer and
$ rust-analyzer, you'll get:

bash: rust-analyzer: command not found

Possible Solution(s)

No response

Notes

No response

Rustup version

rustup 1.27.0 (2024-03-12)

Installed toolchains

Default host: aarch64-unknown-linux-gnu
rustup home:  /root/.rustup

stable-aarch64-unknown-linux-gnu (default)
rustc 1.77.2 (25ef9e3d8 2024-04-09)

OS version

Arch Linux
@Cavig01 Cavig01 added the bug label May 1, 2024
@rami3l
Copy link
Member

rami3l commented May 1, 2024

@Cavig01 It seems that I cannot reproduce this issue on my ARM64 Mac:

> docker run --rm -it ubuntu

root@5a5f7c31c016:/# uname -a
Linux 5a5f7c31c016 6.8.4-200.fc39.aarch64 #1 SMP PREEMPT_DYNAMIC Thu Apr  4 21:00:27 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

[installing `curl`...]

root@5a5f7c31c016:/# curl -sSf https://raw.githubusercontent.com/rust-lang/rustup/master/rustup-init.sh | sh
info: downloading installer
[...]
info: default toolchain set to 'stable-aarch64-unknown-linux-gnu'

  stable-aarch64-unknown-linux-gnu installed - rustc 1.77.2 (25ef9e3d8 2024-04-09)
[...]

root@5a5f7c31c016:/# . ~/.cargo/env 

root@5a5f7c31c016:/# rustup component add rust-analyzer
info: downloading component 'rust-analyzer'
info: installing component 'rust-analyzer'

root@5a5f7c31c016:/# which rust-analyzer
/root/.cargo/bin/rust-analyzer

root@5a5f7c31c016:/# rust-analyzer --version
rust-analyzer 1.77.2 (25ef9e3d 2024-04-09)

Did you do anything special?

@rami3l rami3l added the incomplete The bug report does not have enough information label May 1, 2024
@Cavig01
Copy link
Author

Cavig01 commented May 2, 2024

@rami3l I've just tried. It appears that it was because I installed rustup by pacman. Rustup installed by rustup-init.sh doesn't have the problem.

@rami3l
Copy link
Member

rami3l commented May 2, 2024

@Cavig01 Thanks for the investigation! This could be an interesting issue to be reported to the package maintainers then.

Since there's really not much we can do on our side, I'm closing this issue. Please feel free to contact us if you have other questions!

@rami3l rami3l closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
@rami3l rami3l added not-rustup Whatever is described in this issue isn't Rustup's fault and removed incomplete The bug report does not have enough information bug labels May 2, 2024
@Cavig01
Copy link
Author

Cavig01 commented May 3, 2024

I've found the cause. In case whoever else meet this problem:
This is an intentional design on the pacman package rustup. It's not that rust-analyzer isn't being proxied, but proxied at /usr/lib/rustup/bin/rust-analyzer. It was to avoid conflict between rust-analyzer installed by rustup and one by pacman, since it is also an available pacman package.

To solve this problem, you can just add /usr/lib/rustup/bin/ in your $PATH variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-rustup Whatever is described in this issue isn't Rustup's fault
Projects
None yet
Development

No branches or pull requests

2 participants