-
Notifications
You must be signed in to change notification settings - Fork 937
Homebrew conflicts with rustup (detect and warn about it?) #1236
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
Comments
A quick fix is |
To clarify, the situation I'm talking about has nothing to do with conflicts of Homebrew's packages. Consider this scenario:
I would like 3. to warn that it's been affected by another rustc in While I mention Homebrew specifically, the problem is not unique to Homebrew. Identical problem can happen when you install another copy of rustc from any package manager. |
@rustbot label: +O-macos |
Mitigated by Homebrew/homebrew-core#177983 if you're using a Please note that now you need to add I'll adjust the user guide shortly. (Sorry, that was a misclick below...) |
This is still breaking Rust for users. The existing mitigations don't help — when a brew user installs some rust-dependent package, which brew decides to build from source, they are going to get brew's |
I second the concern on this issue, it yields unintuitive situations/errors such as:
In an otherwise perfectly compilable project... the fix was running |
@kornelski After another look I believe we should really add a caveat to Homebrew instead of doing the check here, because 1) that will impose some unnecessary penalty to our already far-from-ideal startup time; 2) I imagine many have issued I have contributed to @brainstorm Just another remark: you don't need to |
I'm closing this issue as completed since I have successfully made 3 PRs adding extra pointers in both homebrew-core and our docs:
Specifically, when you issue Admittedly, homebrew-core only accepts instructions WRT resolving conflicts between |
On macOS if you install anything with Homebrew that has Rust as a dependency (including any program that has to be built from Rust source), Homebrew will install Rust system-wide and it will take precedence over rustup.
I've ran into this — it looked like if
rustup default
command didn't work properly. I took me a while to realize that binaries in/usr/local/bin
are not from rustup.Homebrew dislikes using any binaries and update mechanisms they don't control (including rustup), so I think it's up to Rustup to improve this situation.
As a solution I suggest emitting a warning when
rustup default
command is used if thePATH
contains both Rustup rustc and non-Rustup rustc, and non-Rustup rustc is first. That will catch this error, but won't get in the way of using Rustup without thePATH
modified for Rustup.The text was updated successfully, but these errors were encountered: