Skip to content
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

Support the Popular Homebrew Package Manager #1031

Closed
Joebeazelman opened this issue May 25, 2022 · 13 comments
Closed

Support the Popular Homebrew Package Manager #1031

Joebeazelman opened this issue May 25, 2022 · 13 comments
Labels
type: enhancement Improvements to existing functionality

Comments

@Joebeazelman
Copy link

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

@Fabien-Chouteau Fabien-Chouteau added the type: enhancement Improvements to existing functionality label May 30, 2022
@Fabien-Chouteau
Copy link
Member

Support for Homebrew is definitely something we want to have. We have yet to find time or someone to work on it.

@Joebeazelman
Copy link
Author

Can I do it?

@Fabien-Chouteau
Copy link
Member

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)

@mosteo
Copy link
Member

mosteo commented May 31, 2022

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?

@Fabien-Chouteau
Copy link
Member

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.

@mosteo
Copy link
Member

mosteo commented May 31, 2022

Then we can just make use of it if available, and let users install it if wanted

@jquorning
Copy link
Contributor

  • 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.

Homebrew/homebrew-cask#117527

@Joebeazelman
Copy link
Author

"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?

@mosteo
Copy link
Member

mosteo commented Jun 1, 2022

My understanding is that they favor the bootstrapping with an Ada compiler first, even if that's a long process 🤷‍♀️. Anyway, I wouldn't sweat it at this time and wait for 1.2 to drop to try again.

@Fabien-Chouteau
Copy link
Member

Indeed the first step would be to get an Ada compiler in Homebrew.

@Joebeazelman
Copy link
Author

OK. How about we start with getting Alire on Homebrew? I'll take the initiative.

@jquorning
Copy link
Contributor

jquorning commented Mar 26, 2023

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

@mosteo
Copy link
Member

mosteo commented Jul 2, 2024

Available from 2.0 onwards, implemented in #1185.

@mosteo mosteo closed this as completed Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvements to existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants