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
Port installer to Bash #217
Comments
Note that the Linuxbrew installer works for both macOS and Linux: |
@sjackman A PR replacing this one with that would probably be a good starting point? Will likely need some review/tweaking. |
Okay, I can take that on, adding support for Linux to this repo. |
My first thought when I initially saw this was, "that seems unlikely to me, given how long Ruby has been included with macOS", but then I read this! https://tidbits.com/2019/06/25/apple-to-deprecate-scripting-languages-in-future-versions-of-macos/ Was that point above based on reading the 10.15 beta notes @MikeMcQuaid, or just great prescience?! Also, out of interest, what's your reasoning for wanting to port the installer to bash, rather than keep it in Ruby but dynamically install a vendor Ruby, like Linuxbrew install does? Homebrew itself and all the formulae need Ruby anyway, so that seems like a good approach? |
Beta notes 😁
It avoids duplicating the Homebrew Ruby vendoring process and there's nothing in this installer that needs to be in Ruby. |
Ah, ok. I didn't realise Homebrew had a Ruby vendoring process, I just assumed it would use the system Ruby, but obviously it woks on Linux too, so that makes sense. No sense in extracting the vendoring process out into the installer, so it can be shared? Or is it too ingrained into Homebrew? |
Linuxbrew uses a quick and dirty reimplementation of the vendoring process. See https://github.com/Linuxbrew/install/blob/master/install-ruby |
We can't meaningfully share code between both in a way that's not going to cause duplication. I also don't see the advantage, personally, other than Ruby being nicer to write in. |
I've been starting to work on a shell version of a combined mac/linux homebrew installer. I'm not quite sticking to a line-by-line port, since some concepts don't translate well, in my opinion. If anyone else has been looking into this, or if we've changed our mind and don't actually want a shell rewrite, please let me know. 😄 |
I'm looking forward to seeing the PR, @mikesep! Feel free to open a draft or work-in-progress PR if you'd like some intermediate feedback before blazing through to the end. |
The installer on Linux supports both macOS and Linux. https://github.com/Linuxbrew/install |
Yup, I'm using that (and the diff between this repo) as the basis for my work. 👍 The Linuxbrew installer has drifted a very tiny amount from the Homebrew one (just in supported versions, last time I checked). |
I've opened PR Linuxbrew#79 to merge Homebrew/master into Linuxbrew/master. |
#256 is almost ready to 🚢 and is a good implementation. If anyone here wants to give it some review: we'd appreciate that. After it's merged we can start looking at making this installer support both macOS and Linux. |
The installer should be ported (with identical logic on macOS to begin with) to Bash for:
ruby
in the users'$PATH
The best strategy to begin with would be a line-by-line port.
Ideally the same thing would be done for the uninstaller but this isn't essential for a first PR.
The text was updated successfully, but these errors were encountered: