rust-analyzer fallback recurses through Homebrew’s wrapper
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Read the issue’s Homebrew discussion #7111 and linked Homebrew PR #315977 to understand the wrapper’s settings override and proposed approaches. The issue names no rustup files or tests, and the solution is explicitly open for discussion; first determine an agreed solution shape before locating implementation entry points. Done means rustup and Homebrew can meet the settings requirement without recursive fallback.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem you are trying to solve
When rustup is installed via homebrew and the active toolchain lacks rust-analyzer, homebrew-installed rustup selects its own shell wrapper as an external fallback and repeatedly executes it:
$ rust-analyzer -help
info: `rust-analyzer` is unavailable for the active toolchain
info: falling back to "/opt/homebrew/opt/rustup/bin/rust-analyzer"
...
error: infinite recursion detected
The proximate cause is that homebrew wraps rustup’s proxies to set RUSTUP_OVERRIDE_UNIX_FALLBACK_SETTINGS. rustup's fallback search excludes executables that are the same file as rustup, but the shell wrapper is a distinct file, so it passes that check, resulting in infinite recursion.
removing homebrew's binstubs avoids this recursion but those binstubs exist to override rustup's settings file, so removing the binstubs also requires patching rustup (take a look at the linked PR).
Is there another way to meet brew's needs? Should we add one? I'd be happy to send a patch, but I'd like some input on the shape of the solution (compile time env var?).
The original report is in Homebrew discussion #7111.
Solution you'd like
Up for discussion.
Notes
No response
- Lingua principale
- Rust
- Stelle
- 7.1k
- Fork
- 1.1k
- Merge medio
- 1g 6h
- PR unite (30g)
- 45
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rust-lang/rustup
-
enhancement O-shell
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Verbose output for removing components on toolchain updateForse già presa @rami3l l’ha presa 7 giorni fa. Apertaenhancement
rust-lang/rustup#5122 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Continuous performance tracking to avoid major regressionsForse già presa @rami3l l’ha presa 15 giorni fa. Apertameta
rust-lang/rustup#5103 · 3 commenti · 5 reazioni · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Suggest another toolchain when removing a component unavailable to the current toolchainForse già presa @devtechedge l’ha presa 3 giorni fa. Apertaenhancement help wanted
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
rust-lang/rustup#5098 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Simplify toolchain type hierarchyForse già presa @rami3l l’ha presa 22 giorni fa. Apertaenhancement
rust-lang/rustup#5092 · 8 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di rust-lang/rustup
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
chroma-core/chroma#7879 ·
I maintainer di solito rispondono entro 1 giorno
-
priority middle
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
KATO-Hiro/AtCoderClans#12838 ·
I maintainer di solito rispondono entro 1 giorno
-
clap_complete env (PowerShell): values after a space don't complete in Windows PowerShell 5.1Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno