alire
alire copied to clipboard
Support the Popular Homebrew Package Manager
It would be great if Alire could support the Homebrew package manager. It's a very popular command-line utility for installing programs, tools and utilities through the terminal's command line interface. It was once exclusive to MacOS, but has since expanded its support to Linux and Windows via WSL. Making Alire Homebrew installable helps evangelize Ada to a wider developer base by lowering their resistance to exploring Ada. Moreover, Homebrew automatically notifies the user of any new releases with the option to automatically perform updates, or change versions.
Alire and Homebrew are remarkably similar in their capabilities and command-line syntax. The equivalent of a crate is a Formula which is hosted in public repos, called Taps, and specialized or experimental ones, called Forks. The only issue I foresee is the requirement that Formulas must be buildable using the latest, stable version of Clang. It shouldn't be a big issue since Homebrew downloads and builds dependencies required by the Formula such as GCC.
https://docs.brew.sh/Adding-Software-to-Homebrew#formulae
Support for Homebrew is definitely something we want to have. We have yet to find time or someone to work on it.
Can I do it?
Of course :)
There are two things to consider:
- Have Alire available as a package in Homebrew
- Have Alire support the installation of external dependencies using Homebew (like we do with msys2 for windows)
Note that currently we only support one PM per platform, so you'd be looking at making homebrew the "official" PM for macOS. For that, take a look at the Alire.Origins.Deployers.System.*
hierarchy.
Is homebrew always available on macOS, or would that invove Alire possibly installing it, like we do for msys2 on Windows?
Is homebrew always available on macOS, or would that invove Alire possibly installing it, like we do for msys2 on Windows?
One of the reason for installing msys2 automatically on Windows is to have access to essential tools like git and curl. I don't know if there is as strong of a need for that on macOS.
Then we can just make use of it if available, and let users install it if wanted
- Have Alire available as a package in Homebrew
I tried to add 1.1.1. It was rejected because it is binary and no Ada compiler in Homebrew.
https://github.com/Homebrew/homebrew-cask/pull/117527
"This is true, but we should probably try first anyway. Note that Ada isn't unique in requiring itself to bootstrap -- the same is true for Rust, Go, GHC, LDC, etc."
I don't understand what the last comment means. Try what first?
My understanding is that they favor the bootstrapping with an Ada compiler first, even if that's a long process :woman_shrugging:. Anyway, I wouldn't sweat it at this time and wait for 1.2
to drop to try again.
Indeed the first step would be to get an Ada compiler in Homebrew.
OK. How about we start with getting Alire on Homebrew? I'll take the initiative.
OK. How about we start with getting Alire on Homebrew? I'll take the initiative.
I worked a little on the subject and concluded that a Ruby script would do the job. Somewhere on the way I got sidetracked. This is what is available on gh by now, for inspiration: https://github.com/jquorning/AdaNow More inspiration: https://github.com/AJ-Ianozi/getada