Skip to content

Formula variants #19789

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

Closed
1 task done
quackerex opened this issue Apr 18, 2025 · 5 comments
Closed
1 task done

Formula variants #19789

quackerex opened this issue Apr 18, 2025 · 5 comments
Labels
stale No recent activity

Comments

@quackerex
Copy link

quackerex commented Apr 18, 2025

Verification

Provide a detailed description of the proposed feature

Enable formula options in homebrew-core.

What is the motivation for the feature?

In brew most packages have large dep trees. Enabling options allows us to reduce the deps.

For example take erlang formula
In brew it also comes with wxwidgets. However it is rarely used.

We can make it a option

By default it install without wxwidget. So we get minimal deps (since wxwidget comes with its own deps)
If we want wxwidget we can specific that option.

How will the feature be relevant to at least 90% of Homebrew users?

Less deps to manage == less conflicts == faster upgrades

What alternatives to the feature have been considered?

Maintaining formula options in a brew tap

@botantony
Copy link
Contributor

I remember there was a discussion where @MikeMcQuaid suggested to make "minimal" versions of some formulae. "Minimal" versions can be used as a dependency (or if a user wants to use limited versions), while regular formulae come with all possible dependencies.
Homebrew supports options (and some taps use it, f.e. https://github.com/homebrew-ffmpeg/homebrew-ffmpeg/blob/master/Formula/ffmpeg.rb) but it is not an options for the core repository (it would require to test and bottle all possible combinations)

@quackerex
Copy link
Author

quackerex commented Apr 19, 2025

Homebrew supports options

That's pretty much it. I'll update the issue to use this information.

it would require to test and bottle all possible combinations

It seems like you can have more than one option enabled. Which would require 2^n bottles for n options so prob would be a logistic issue. We can maybe only allow one option per formula as most formulae only need one option.

@gromgit
Copy link
Contributor

gromgit commented Apr 19, 2025

I remember there was a discussion where @MikeMcQuaid suggested to make "minimal" versions of some formulae. "Minimal" versions can be used as a dependency (or if a user wants to use limited versions), while regular formulae come with all possible dependencies.

I think you're thinking of Homebrew/homebrew-core#206404.

@MikeMcQuaid
Copy link
Member

We used to have options. We removed them because we have none of either desire, infrastructure or resources to be able to build and bottle for all options. They are still available for/in third-party taps.

We should aim to reduce dependencies on formulae, though. I'm open to any ideas on how to do this more effectively.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label May 14, 2025
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale No recent activity
Projects
None yet
Development

No branches or pull requests

4 participants