-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
rustup 1.0.0 (new formula) #9617
Conversation
Rustup is a multi-version manager for Rust, in the same vein as rbenv, nodenv, nodeenv, pyenv, and others. This pull request has been opened in an effort to continue the discussion from Homebrew#5263.
Notable potential concerns:
|
This is a hard-blocker. We need a URL that won't change.
This is a hard-blocker. We should build this from source.
I think the caveats should be omitted as they aren't Homebrew-specific information. |
I can make that suggestion to the rustup project maintainers.
Building this from source would likely require us to embed the 'rust' formula inside this one as a temporary build tool (note that this cannot simply depend on 'rust' as it deliberately conflicts with the Rust binaries). We have another option, which is to use the officially preferred Rust installation tool to temporarily install Rust so that we can build this... Unfortunately this is that tool - so we'd end up downloading the binary version of this in order to temporarily install Rust in order to build the source for this ... so that users could actually install Rust. Despite violating Homebrew best practices, I suspected the direct approach would be more palatable.
The caveats are almost word-for-word identical with the caveats for 'rbenv', and are there for the same reason. |
We should figure out a way to use our own Rust.
I'd like to see that there's a lot of demand for this before we violate our best practices.
I'm changing those caveats too in #9662 |
https://www.rust-lang.org/en-US/other-installers.html Reading that, I'm having trouble understanding why we'd carry rustup in Homebrew. |
Can you point me to examples of other formulae that have a build-time-only dependency on a compiler?
Fair.
I'm disappointed by that, actually. Those caveats were useful if you installed (e.g.) rbenv from Homebrew expecting it to behave like a good Homebrew citizen and store its data in
I'm not sure to what exactly you're referring, but I can at least offer my own rationales for why I hope to see rustup in Homebrew. As a Ruby developer, I may have projects spanning a number of old versions, and Homebrew offers no (good) way for me to switch between or install outdated – or pre-release – versions of Ruby. That's not to say that Homebrew's Ruby formula isn't useful: it's a great way to ensure that a recent Ruby exists for the purposes of fulfilling a dependency or running Ruby applications. For development purposes, however, I need the flexibility that tools like I also want these tools to be centralized. I use Homebrew as my OS package manager because a) it's fairly comprehensive and b) I like the conventions it uses (e.g. everything under The Rust formula is a great tool for expressing a build-time dependency for Rust, and a great tool to have available if you need to do the occasional build of a Rust project. It is not particularly useful for doing cross-compilation work, development against specific older (or nightly) versions of Rust, or working on multiple projects that compile against different versions. For those things, the Rust community has developed From a higher-level perspective, if the Note that I have no specific interest in seeing this formula included, only the tool itself. I'm new to both formula authorship and Rust, and I understand that there are a number of issues with this PR. I opened this PR in order to better facilitate the conversation, and to get help cleaning up its shortcomings. |
177 on Rust and Go alone.
It's 50:50 whether tools store things in /usr/local/var or the home directory and there's issues with using the caveated approach. Mostly, though, it's not Homebrew-specific information.
The main difference being: those other tools work just fine with our packaging recommendations as-is. You've pointed out quite a lot of issues in the original PR body (which we appreciate, thank you) with |
Let me give that a try locally; I wasn't previously aware of
I recognize it as off-topic at this point (I'll drop the caveat from this formula), but I would be interested to hear more about these issues - this is the first I've ever heard of them.
The three primary issues I identified were a) unstable download URL [which is moot if we're building from source, which is version tagged], b) we're jumping through some hoops to avoid using If I'm understanding properly, then, the overarching objection is that it's not being built from source - which is an objection only to this particular formula, not the tool itself (as I inferred from @ilovezfs), and one that it appears to be easy enough to resolve with |
Let me be more explicit: I don't think rustup should be in Homebrew. |
@ilovezfs That is the position I believed you held. Is there something specific about |
If someone proposed adding a gccup script, which downloaded various nightly binaries conflicting with our gcc formula, I don't think that would fly. s/gcc/rust/ doesn't make it sound any less crazy to me. |
It seems that for some reason the source tarball for |
Lovely |
@ilovezfs If you told me that this is how you switch between GCC versions in Homebrew, when You've mentioned three specific concerns – nightlies, binaries, and conflicts.
Please help me understand what I'm missing. |
It's not.
If you're depending on nightlies, you should be able to handle rustup yourself.
If something is not desirable, we should do less of it, not more of it.
They are indeed in that the rust formula is not keg only, and so must be linked in order to be used by a build. |
Ok so my position is if we can install this from source, from a stable URL, without it installing to paths that will conflict with Homebrew (i.e. not to |
Where (i.e., what directory location) do the rust compilers it subsequently downloads from the Internets get installed? |
@ilovezfs If we're looking at the |
@MikeMcQuaid right, I just don't know how to interpret
|
Yes, I agree that that description as-is will need to be addressed somehow perhaps by putting those tools outside |
This seems perfectly reasonable, and very much feasible. Installing the conflicting binaries in a separate How should I handle "exposing" the
|
General approach is install everything to |
Closing this PR now given lack of activity. Please reopen once the formula is updated and we can review it. |
Rustup is a multi-version manager for Rust, in the same vein as
rbenv, nodenv, nodeenv, pyenv, and others.
This pull request has been opened in an effort to continue the
discussion from #5263.
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?