Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.59k stars 12.33k forks source link

Remove all options from Homebrew/homebrew-core formulae #31510

Closed MikeMcQuaid closed 5 years ago

MikeMcQuaid commented 6 years ago

Options in formulae don't produce a good user experience because they have to be built from source, we don't test them in CI and each combination of options provides a new chance for new failures to occur. We should seek to (eventually!) remove all options from formulae in Homebrew/homebrew-core in favour of enabling as much non-exclusive functionality as possible in a given formula for widely used options or encouraging the community to maintain their own custom options in a tap (e.g. https://github.com/denji/homebrew-nginx/blob/master/Formula/nginx-full.rb). As an absolute last resort if we need to depend on the same formula multiple times with different options (e.g. https://github.com/Homebrew/homebrew-core/issues/13133) we can consider vendoring formulae using resource blocks or even duplicating formulae.

This should be done in multiple phases:

  1. formulae that have build error issues created with particular options should have the options removed immediately (rather than a fix being merged)
  2. less popular formulae should have all their options removed
  3. popular formulae (e.g. https://formulae.brew.sh/analytics/install-on-request/90d/) should be prioritised for having their defaults adjusted (depending on analytics usage) to get the best balance of functionality without options.

I'm open to thoughts on the above and different approaches to solve the problem as well as additional tooling required in Homebrew/brew to accomplish this.

zbeekman commented 5 years ago

EDITS: punctuation, grammar, clarity... I still am not about to win any writing awards though 🙃

Firstly I'd like to thank you for your polite, kind and considerate tone @blogabe. While we disagree I'm glad we can have a reasonable discussion about this.

:100:

I'm glad to see that this discussion continues in a respectful manner. 😄

I'm a fan of making brew search discover content in taps, particularly when nothing is found in Core.

I am concerned about driving users to private taps. This has the potential to fracture the software eco-system. Encouraging the widespread adoption of taps may introduce incompatibilities with other packages, or a decline in user experience due to taps that are poorly maintained or malicious. See, for example, recent developments with Heroku. Furthermore, it may make it less likely that important patches in formula make their way into core, and less likely that important patches in the package itself makes it upstream.

I've expressed my opinion before that I do like some of the flexibility that options provide, and, if it were up to me alone, I would not completely remove them. However, as I have not studied the analytics data, I am not in a position to demand (or politely ask) that we hold off on completely abolishing all options. A data based policy, based on relative and/or absolute thresholds for which options get removed could help reach a compromise and end up providing the most benefit to the most users. It also might make it seem less arbitrary.

No matter what, we do need to reduce the complexity of maintenance as the project grows, as adoption grows and as more formula are added. Removing options is clearly advancing this goal. And some/most options should probably be removed.

MikeMcQuaid commented 5 years ago

However, as I have not studied the analytics data, I am not in a position to demand (or politely ask) that we hold off on completely abolishing all options. A data based policy, based on relative and/or absolute thresholds for which options get removed could help reach a compromise and end up providing the most benefit to the most users. It also might make it seem less arbitrary.

To be clear: options are not being removed because they are used or unused but they are being removed because we do not test options with CI or build binary packages for them and as a result they are regularly broken. Analytics are useful in figuring out what the default configuration should be.

If brew install fails for a formula in the tap, it already displays a message not to contact Homebrew about the issue.

Worth noting here: but yet many of them still submit issues to us anyway. Unfortunately this is why I think any search behaviour shouldn't be enabled by default.

blogabe commented 5 years ago

Random thoughts that may or may not help the conversation...

  1. There are plenty of COTS software that have three tiers of support: 1) official from vendor w/ full testing/support 2) technically works, but supported through 3rd party or open source community and 3) technically may work but you're on your own. I can see homebrew going down this path (even if it failed before, doesn't mean it will fail in the future).

  2. With respect to homebrew still maintaining the original ideals, to me it's the difference between brewing your own beer or buying it at the grocery store -- I went far and deep to find that analogy :) What attracted me to homebrew in the first place was the ability to brew myself, on my machine, with my configuration. Going to bottles, is well, ... going to bottles :)

  3. With respect to the mechanics of how this all works, I don't yet see the same end result the maintainers do as to how this reduces the complexity. I think it has potential to make things much more chaotic... at least for user taps which means less standardization then fragmentation and alienation. Again, maybe because I simply can't visualize how this looks given the rate of change and discussion in this project. How will dependencies by handled? If there are multiple versions of a dependent formula how can the user through the command line or the requesting formula choose the one it wants?

Am I better served off w/ having all dependent formulae hosted in my own taps alongside the formula I am now required to host?

Using my above example, there is a program I host in my tap, xplanetFX. Used to be part of core but removed due to https://github.com/Homebrew/homebrew-core/pull/13356, https://github.com/Homebrew/homebrew-core/pull/14019, and https://github.com/Homebrew/brew/pull/2482. It has a variety of dependents including xplanet (which itself has seldom used dependencies like cspice) and pygtk with the libglade option. As I'd copy xplanet to my tap as well, I'd change the dependency in xplanetFX to reference my xplanet formula, correct? But what if someone wants the xplanet bottle through core instead? I get xplanet and FX are seldom used, but I'm using it as an example. Maybe other formulae have similar issues, but are more popular.

  1. I echo @DomT4 original sentiment... maybe this has been building for a while, but this specific change seems to have been intro'ed, discussed, and decided upon pretty quickly. I think in the future if want more discussion or engagement, certain changes like these that impact many formulae, and their dependencies (as described above), need more wide spread conversation and longer baking period. For example, maybe send out a tweet directed people to the conversation at hand. Between the multitude of issues to look through, the forum site, Twitter, ... I can barely keep up as a volunteer user.

Anyway, thanks for the opportunity to discuss.

MikeMcQuaid commented 5 years ago

There are plenty of COTS software that have three tiers of support: 1) official from vendor w/ full testing/support 2) technically works, but supported through 3rd party or open source community and 3) technically may work but you're on your own. I can see homebrew going down this path (even if it failed before, doesn't mean it will fail in the future).

The main issue here is that we get a bunch of issues filed for 2) and 3) regardless whereas people don't tend to ask COTS vendors for support in those cases (or their paid support staff can ignore or fob them off).

  1. What attracted me to homebrew in the first place was the ability to brew myself, on my machine, with my configuration. Going to bottles, is well, ... going to bottles :)

Indeed, we've been a primarily binary package manager for a while and this makes us more reliable. There are other options if you'd rather use a from-source package manager.

maybe this has been building for a while, but this specific change seems to have been intro'ed, discussed, and decided upon pretty quickly.

This has been literally building for years. Unfortunately we've had too much of the discussion here in private locations (e.g. the Homebrew maintainers' Slack) and I screwed up there: I'm sorry.

Between the multitude of issues to look through, the forum site, Twitter, ... I can barely keep up as a volunteer user.

I appreciate your efforts. That said, the direction of the project is decided by the maintainers of the project, ultimately, as they are the people doing the bulk of the day-to-day work. I'm happy to take feedback and ideas on how we can make it easier for others to maintain their own stuff however they'd like, though.

Anyway, thanks for the opportunity to discuss.

You're very welcome ❤️

m-emelchenkov commented 5 years ago

Was it so hard to leave a comment in Git commit comment WHY you remove options? At least, with ref to this thread. I was made to create an issue and my compatriot referred me to this thread. Wow, sudden decision. Now, instead of just installing the package I need (option I contributed before) I need to learn how to make a tap, and so on. It makes a problem to me right now, I have no time to do this right now, so my own Homebrew experience right now become worser. I can understand this motivation about removing, and at the same time I cannot. Now people should have tons of unmaintenanced taps with options formulas. I don’t know much about taps, can it have parent? I.e. when “core” package bump version, will my tap bump it automatically? It is the only real important thing that bother me: will the package be in sync with core automatically or not, or then I do not see any profit in Homebrew, if I need maintenance any non-standard config manually. Looks like Gentoo vs Debian, huh )

MikeMcQuaid commented 5 years ago

Was it so hard to leave a comment in Git commit comment WHY you remove options?

@m-emelchenkov It requires extra effort and this is an open issue of a relatively small number in this repository so it is not necessary.

Wow, sudden decision.

This issue was created in August and this process of removing options has been ongoing for almost a year so: no.

I don’t know much about taps, can it have parent? I.e. when “core” package bump version, will my tap bump it automatically?

It will not.

then I do not see any profit in Homebrew, if I need maintenance any non-standard config manually. Looks like Gentoo vs Debian, huh

That's a good comparison because we are aiming to move from being more like Gentoo to more like Debian. Debian does not allow you to install arbitrary packages with arbitrary options. The goal is to have it for Homebrew/homebrew-core so everything that users install is tested in our CI system and we are comfortable that it works.

ahmetb commented 5 years ago

What is the stance against formulae that use options that don’t impact the build, as well the ones no other formula relies on?

I'm asking this in the context of kubectx.rb, the --with-short-names flag was used to determine only the symlink name of the bin.

MikeMcQuaid commented 5 years ago

@ahmetb All options will be removed. They still "impact the build" as they force a build from source for end-users and aren't run by CI.

danieljl commented 5 years ago

Options in formulae don't produce a good user experience

@MikeMcQuaid We can have both a good UX and optional build options together. We can provide more sane default options for users who install the package without any options.

I can only think of one reason why all options should be removed, which is to minimize the number of issues reported by users.

MikeMcQuaid commented 5 years ago

We can have both a good UX and optional build options together.

@danieljl You've stated that we can but not how. How can we have binary packages for all option combinations? How can we have enough CI resources to build all option combinations? Who is going to do the necessary work to get tall that setup?

We can provide more sane default options for users who install the package without any options.

This is what is happening.

I can only think of one reason why all options should be removed, which is to minimize the number of issues reported by users.

Not just issues reported but issues experienced. As a very highly used open source project run entirely by volunteers: yes, this is a worthy goal by itself.

MikeMcQuaid commented 5 years ago

We're getting closer! The goal is now to remove all options (including :optional and :recommended) from Homebrew/homebrew-core packages for Homebrew 2.0.0 (expected Q1 2019).

vasimi commented 5 years ago

Hi, I understand your reasons to do this, but there are some formulae which are even harder to use if you don't have options to modify them, for example yarn. Its only option was --without-node which was very helpful for people who are using nvm. According to https://formulae.brew.sh/analytics/install-on-request/90d/, 1.85% of requests are yarn and 0.47% are nvm. It doesn't mean that 25% of people who use yarn are using nvm, but a lot of them is doing that. And as far as I know, the option only removed a dependency which isn't required to successfully install yarn. It looks like you're not taking any arguments why NOT to remove all options from all formulae (which is the reason I'm moving to macports), but there are also formulae whose installation can't be broken by some options. Just think about keeping these options.

MikeMcQuaid commented 5 years ago

I understand your reasons to do this, but there are some formulae which are even harder to use if you don't have options to modify them, for example yarn. Its only option was --without-node which was very helpful for people who are using nvm.

@MekliCZ This applies to many things installed by Homebrew: if /usr/local/bin is first in your path it will override the binaries elsewhere. I'm not sure I understand why putting nvm's nodes before /usr/local/bin in your PATH doesn't fix this?

In short: I'm not claiming that removing options will not require workflow changes for some users. Where we/I can I want to make those workflow changes as obvious an easy as possible.

And as far as I know, the option only removed a dependency which isn't required to successfully install yarn.

It is needed to run or test yarn, though, and it makes us a pretty crappy package manager if we don't install things you need to run the application you install...

It looks like you're not taking any arguments why NOT to remove all options from all formulae

This thread is full of arguments and I unlocked it. What I've said to many people (though) is that they needed to provide solutions to the problems which motivated this change. No-one did provide solutions beyond essentially "just ignore those support requests" so: here we are.

which is the reason I'm moving to macports

I hope it's a better fit for you. If this is your main issue, though, it seems strange. MacPorts also installs node when you install yarn and doesn't provide a variant for this. It's been a while since I used MacPorts so I could be missing something they offer that we don't, here.

blogabe commented 5 years ago

@MikeMcQuaid can't speak for the overall community of course, but a challenge with coming up with ideas that fit the maintainers requirements is that that outside the "lessen the support issues" request, I'm unsure what other constraints we should abide by. I'm using the word 'constraints' specifically to imply maintaining some level of playing well with one another versus going off and doing something completely different.

There are enough people impacting by these changes that it may make sense to work with us and provide some guidance on how we can continue using homebrew and have it support our needs. Creating an independent tap is one of them, and I do not see that as a problem.

What I do see as a problem is now having potentially multiple users creating a tap for a particular formula, say imagemagick, to support options. I would think this is a popular enough formula where we'de want to centralize the hosting rather than have multiple options.

Furthermore, using Google to find imagemagick places an unnecessary burden on the user and may come up with varying results.

This project has started to potentially reach a happy medium: https://github.com/portage-brew

I think a centralized, rather than decentralized, approach to a tap allowing for formula options is a way to go.

Ideally, updates to formulae would be made in one place and carried forward, but I'm unsure how realistic that is. I can say from my own personal experience that as I know host formula w/ options on my own tap, updating the official formula on homebrew is a lesser priority, e.g., adding a revision or bumping the version.

How do you or other maintainers suggest we work together to address? This isn't about maintainers vs power users... it should be about the the overall user community, those that are fine with bottles and those that like to tinker.

MikeMcQuaid commented 5 years ago

Creating an independent tap is one of them, and I do not see that as a problem.

Yes, this is the expected model and we want to make that easier.

I would think this is a popular enough formula where we'de want to centralize the hosting rather than have multiple options.

I agree that discovery is a tricky part. The balance is on discovery vs. expectation that things work by default/are supported by the Homebrew maintainers. Perhaps expanding on https://docs.brew.sh/Interesting-Taps-and-Forks would be a start for this? I don't want us to go back to when brew search searches a bunch of community taps because we don't want to be seen to recommend things that we haven't reviewed.

This project has started to potentially reach a happy medium: https://github.com/portage-brew

I'm happy to see projects like this emerge (pun intended).

Ideally, updates to formulae would be made in one place and carried forward, but I'm unsure how realistic that is.

Unfortunately it's not realistic to expect that updates will happen that won't break the options. Most options require passing something to configure or otherwise modifying the install method. I've suggested before there may be a way to do this (subclass the Formula and override install and options but leave url etc. the same) and I'm open to PRs that make that process easier. Even then, though, I'm unconvinced it will be easier than copying-pasting a formula into a tap.

How do you or other maintainers suggest we work together to address?

Beyond what I've said: I don't, I'm afraid. I'm happy to offer personal opinions but kind of the point of this change is that Homebrew maintainers are no longer responsible for how to go forward with this.

it should be about the the overall user community, those that are fine with bottles and those that like to tinker.

I'm afraid I disagree. There's some users whose desire to tinker causes a disproportionate support burden. They want to fiddle with things until they break, file an issue (or even PR) and then a bunch of time is wasted discussing a self-created issue.

It's not unusual for software that is popular with "tinkerers" to outgrow them as their needs and desires for the project become outliers. This is what has happened with Homebrew: a niche, from-source package manager has become a binary package manager relied on by millions of people.

jeroen commented 5 years ago

The major issue we run into taps is that there is no way to give a tap preference over homebrew-core when it comes to dependencies. Even when the tap is pinned. This makes the situation on our build server very complicated.

For example in my case I need a version of poppler which does not depend on nss or qt. Because these have become hard dependencies in core, I provide a custom poppler in my tap.

However when brew installs poppler as a dependency of a core package (for example gdal in my case) it still installs the core version, not the one from the (pinned) tap. This differs from pinning in Debian, where a package from the pinned repo can be a drop-in replacement for the mainstream package.

This may seem small, but it makes the situation unmanageable. I need a few dozen modified formulas in my tap which are built with different options than core. This I can do, however brew keeps running into conflicts because it has already installed the core version of the same formula as a dependency.

I think if you expect people to run taps for customized formulae, brew should allow taps that provide replacements for core formula, and which get preferred even when installed as a dependency.

MikeMcQuaid commented 5 years ago

The major issue we run into taps is that there is no way to give a tap preference over homebrew-core when it comes to dependencies. Even when the tap is pinned. This makes the situation on our build server very complicated.

This is intentional. We do not want to have random dependencies in our tree swapped out with versions that may not work.

For example in my case I need a version of poppler which does not depend on nss or qt. Because these have become hard dependencies in core, I provide a custom poppler in my tap.

To illustrate my example: if a package in Homebrew/homebrew-core relies on the nss or qt functionality: the custom poppler in your tap will break that package.

This I can do, however brew keeps running into conflicts because it has already installed the core version of the same formula as a dependency.

I've elaborated a bit on this here: https://github.com/Homebrew/brew/issues/5615#issuecomment-457813089. I'm open to improving the docs to make this (i.e. use a different formula name) more obvious and well-documented.

bumfo commented 5 years ago

So now, instead of copy-pasting homebrew options from Google, I need to use brew edit all the time when one single option would have solved my problem.

Even worse, editing formulas on my own is no better than the pre-homebrew age, when I read docs, carefully set up compiling options, and fail, and try again.

Popular Homebrew options are at lease given a chance to be tested and solved by the whole community. Without options, installing packages are only getting harder.

Please don't just remove all the options. Rather split the formulas into two taps, one ready-to-use out-of-the box (core), one with options that may not be tested fully, but can be improved together by the community.

MikeMcQuaid commented 5 years ago

So now, instead of copy-pasting homebrew options from Google, I need to use brew edit all the time when one single option would have solved my problem.

The sites you're Googling will be updated with correct instructions.

Popular Homebrew options are at lease given a chance to be tested and solved by the whole community.

They aren't tested before updates: that's the reason for their removal.

Rather split the formulas into two taps, one ready-to-use out-of-the box (core), one with options that may not be tested fully, but can be improved together by the community.

This is what's happening except the latter is being maintained by the community outside of the Homebrew organisation.

claui commented 5 years ago

This may seem small, but it makes the situation unmanageable. I need a few dozen modified formulas in my tap which are built with different options than core. This I can do, however brew keeps running into conflicts because it has already installed the core version of the same formula as a dependency.

@jeroen Does Homebrew still give you conflicts if you use non-conflicting formula names in your tap (such as jeroen/core/custom-poppler), and control all the linkage manually (for now) via brew link/brew unlink?

chdiza commented 5 years ago

@jeroen I feel your pain on this. A solution I use is to put everything you need (even "mere" dependencies) in your own tap. Then just copy the HB formulas---even the ones you don't actually have to adjust the flags for---into your own tap, modifying the "depends_on" part as necessary to point explicitly to your own tap. E.g., put a formula for gdal in your own tap, and change it to say depends_on "myuser/mytap/poppler" instead of depends_on "poppler".

This means you won't get bottles, but that just goes to show why build-from-source package managers are Good and Necessary.

I have about 60 kegs installed, and now none of them are from the core tap. They are from my tap, which carries several duplicates of core formulas (except for their dependency references are changed to point at my tap). This way, I will never have the rug pulled out from under me by a sudden HB decision to mess with deps or flags.

brew should allow taps that provide replacements for core formula, and which get preferred even when installed as a dependency.

It should, but the above describes a way to ape this. Having to do brew install myuser/mytap/foo instead of brew install foo was mildly annoying, but e.g. I made an external command that will auto-insert the tapname before any formulas passed.

claui commented 5 years ago

Even worse, editing formulas on my own is no better than the pre-homebrew age, when I read docs, carefully set up compiling options, and fail, and try again.

@bumfo Would it help if Homebrew allowed you to write custom formula extensions, or some kind of formula patch, as @saagarjha suggested in a recent forum thread?

Here’s the relevant quote from this thread that outlines the suggested feature:

The benefits I get is that I the basic auto-updating portion is done by Homebrew itself, but whenever I build I run the “patch” (which I am imagining is something like me selectively copying the options I care about from an old commit to homebrew/core and telling Homebrew “here, apply this”) to customize it for my environment (transparently; the “patch” is applied each time a new update comes and brew update is run).

claui commented 5 years ago

I have about 60 kegs installed, and now none of them are from the core tap. They are from my tap, which carries several duplicates of core formulas (except for their dependency references are changed to point at my tap).

@chdiza Such determination! Given that you’re already going that route: have you looked at https://github.com/portage-brew yet?

(Not being snarky or something, I 100% mean it; I’ve only glanced at portage-brew briefly but it looks like a promising fork to me.)

[…] I made an external command that will auto-insert the tapname before any formulas passed.

That is actually a really cool idea.

blogabe commented 5 years ago

@jeroen I feel your pain on this. A solution I use is to put everything you need (even "mere" dependencies) in your own tap. Then just copy the HB formulas---even the ones you don't actually have to adjust the flags for---into your own tap, modifying the "depends_on" part as necessary to point explicitly to your own tap. E.g., put a formula for gdal in your own tap, and change it to say depends_on "myuser/mytap/poppler" instead of depends_on "poppler".

This is what I've debated doing as well. I've resisted for the obvious reason that it places an undue amount of maintenance on our personal user taps and why a centralized tap can help.

One formula may have many - 20, 30, 40, ... - dependencies that I need to also manage and update. It's a burden I'm not stoked on taking on. Hopefully if portage-brew gains traction amongst the community then this should not be as much of an issue.

MikeMcQuaid commented 5 years ago

This is what I've debated doing as well. I've resisted for the obvious reason that it places an undue amount of maintenance on our personal user taps and why a centralized tap can help.

I agree that centralising effort may be useful but disagree that this needs to be in the Homebrew organisation to be successful.

blogabe commented 5 years ago

@MikeMcQuaid Don't disagree with you on this.

I think it may be easier and radiate a more inclusive feel for the end users, but it can work outside of Homebrew as well assuming enough power users the changes impact are willing to join and build up a critical mass.

We're good :)

blogabe commented 5 years ago

My ignorance is showing, but is it possible to subscribe to a formula in core so that we can receive an alert if/when it undergoes an edit?

MikeMcQuaid commented 5 years ago

Nope, sorry. Someone could build it on to of GitHub's APIs, though.

jeroen commented 5 years ago

This is intentional. We do not want to have random dependencies in our tree swapped out with versions that may not work.

I think it is the responsibility of the user at that point if I specifically decide to swap out core formulas from a pinned tap. We just need some way that makes it possible to install core formulas with another configuration than the default one.

The current situation make this very difficult. On the one hand you want core to be low-mainenance with little flexility (no options), more like Debian, which is OK. But then at the same time you prevent users from swapping out formulas with a custom build, as you would do in with a custom deb/PPA. So now there is no solution anymore for users that need a non-default configuration of a formula.

my example: if a package in Homebrew/homebrew-core relies on the nss or qt functionality: the custom poppler in your tap will break that package.

Most libraries won't change their API or ABI based on the configuration. Usually only certain features of the software will be enabled/disabled. Configuring a library with or without support for some driver/lib rarely affects how the program is called or linked, usually they can be swapped out safely.

Even if it would break a reverse dependency, at that point it is my own responsibility, not yours. But I do feel strongly that if you decide to remove all flexibility in core formulas to lower mainenance, you need to relax the requirement that core take precedence over all.

I've elaborated a bit on this here: Homebrew/brew#5615 (comment). I'm open to improving the docs to make this (i.e. use a different formula name) more obvious and well-documented.

A different formula name is really not a solution, then I would also need to add all reverse dependencies of the formula to my tap with a dependency on the changed formula name. This makes the problem an order of magnitude larger.

I think almost all users in this thread simply need some way to configure a core formula with features they need.. If options are no longer supported and you present taps as the solution, you should allow core formula to be swapped out with a custom one from a tap.

voldemortensen commented 5 years ago

I've been thinking about this for awhile now. My first interaction with the Homebrew community has been pretty negative, but I'm going to put that aside and give this another try.

@MikeMcQuaid, would you be open to the idea of an "override" tap? This would functionally be the same as a custom yum or apt repo.

The way I'm thinking this could work is that a user would specify a tap (or taps) that would be checked prior to checking the core formulae. Formulae installed from the "override" tap would satisfy the dependencies of core formulae. This would allow a user to substitute in a custom formulae, but also allow Homebrew to offload the support requests to tap maintainers. This would also help a third party tap aggregate common custom formulae into one tap.

MikeMcQuaid commented 5 years ago

@MikeMcQuaid, would you be open to the idea of an "override" tap? This would functionally be the same as a custom yum or apt repo.

@voldemortensen We have custom repositories (taps): https://docs.brew.sh/Taps. These can be pinned with brew tap-pin.

Formulae installed from the "override" tap would satisfy the dependencies of core formulae. This would allow a user to substitute in a custom formulae, but also allow Homebrew to offload the support requests to tap maintainers.

This will not work because these formulae will end up breaking core formulae in ways that are hard to debug (e.g. missing symbols/libraries) and we will have to be the ones fielding those support requests.

You can create your own taps with your own formulae that are installed however you like. You can't inject random formulae as dependencies for the ones we test and build and expect them to work.

MikeMcQuaid commented 5 years ago

I think it is the responsibility of the user at that point if I specifically decide to swap out core formulas from a pinned tap. We just need some way that makes it possible to install core formulas with another configuration than the default one.

@jeroen Regardless of whose responsibility it is: we will be the ones receiving the bug reports so we'd rather not add functionality to increase our support burden, sorry.

The current situation make this very difficult. On the one hand you want core to be low-mainenance with little flexility (no options), more like Debian, which is OK. But then at the same time you prevent users from swapping out formulas with a custom build, as you would do in with a custom deb/PPA. So now there is no solution anymore for users that need a non-default configuration of a formula.

Debian doesn't provide the same degree of user accessible support on GitHub if you have a package that breaks.

We definitely do support swapping out formulae but we do not support swapping out the dependencies of formulae because, as I mentioned in the last comment: they will break.

So now there is no solution anymore for users that need a non-default configuration of a formula.

Yes, there is: maintain your own version of the formula in a tap. As noted in https://github.com/Homebrew/brew/pull/5622 the best way to do this is to use a different name so they can live side-by-side. This has been successfully working with e.g. the nginx-full formula for many years.

Most libraries won't change their API or ABI based on the configuration. Usually only certain features of the software will be enabled/disabled. Configuring a library with or without support for some driver/lib rarely affects how the program is called or linked, usually they can be swapped out safely.

"Most", "usually" and "rarely" add up to a non-trivial number of support requests at Homebrew's scale. We're not willing to support that.

Even if it would break a reverse dependency, at that point it is my own responsibility, not yours. But I do feel strongly that if you decide to remove all flexibility in core formulas to lower mainenance, you need to relax the requirement that core take precedence over all.

Again: regardless of whose responsibility it is: we field the support requests so it ends up adding extra work for us.

Core formulae remain the primary option because they are what is used by the vast majority of users. The majority of users configurations are now handled by the defaults we chose for the software in Homebrew/homebrew-core now.

A different formula name is really not a solution, then I would also need to add all reverse dependencies of the formula to my tap with a dependency on the changed formula name. This makes the problem an order of magnitude larger.

I think almost all users in this thread simply need some way to configure a core formula with features they need.. If options are no longer supported and you present taps as the solution, you should allow core formula to be swapped out with a custom one from a tap.

Again: we do allow these formulae to be swapped out but not as dependencies of existing formulae.

I don't think we can really continue discussion indefinitely on this closed issue. Where's there's specific requests for things that make life easier for tap authors without making things harder for the Homebrew maintainers: we have and will help. Where PRs are submitted that make life easier for tap authors: we will review them and may merge them.

Finally, it's worth remembering that the Homebrew maintainers do not need to do anything. In fact, open source maintainers owe you nothing.

If you want some functionality we are not willing to support: you need to be willing to do the work yourself (which may be more work than you wish given our constraints) or you need to accept what we're willing to provide you (for free, in our spare time).

jeroen commented 5 years ago

You can create your own taps with your own formulae that are installed however you like. You can't inject random formulae as dependencies for the ones we test and build and expect them to work.

That's exactly how PPA's work in Ubuntu/Debian and it's fine. It's the only way to customize a formula if you don't want to support options in core formulae. Users that choose to swap out core libraries with a custom tap probably know what they are doing. It's not your responsibility to debug this.

However your current policy of hardcoding a single config for all core formulae and at the same time not providing any way to swap them out with a custom built, is obviously leading to frustration by many users for which the default configuration is inappropriate.

MikeMcQuaid commented 5 years ago

That's exactly how PPA's work in Ubuntu/Debian and it's fine.

It's not exactly how they work because they both ship binaries and Homebrew/homebrew-core ship binaries but taps/options ship source builds.

Even if it were literally identical: It's perhaps fine to them/you but t's not fine to us. It will create bugs that are not immediately obvious, it will create user confusion and it will create extra work for us (even if we could instantly detect these issues and close them).


I'm relocking this thread in favour of our Discourse forum for more general discussion and specific issues (e.g. emacs cask and formulae conflict https://github.com/Homebrew/homebrew-core/issues/363109 or specific regressions with new options https://github.com/Homebrew/homebrew-core/issues/36342) or PRs that add functionality to Homebrew/brew or make change the default build in Homebrew/homebrew-core when relevant.

claui commented 5 years ago

I’ve reopened the Discourse thread Maintaining a tap to provide options for a formula to discuss possible PRs that help tap authors do their work with less friction.

@bumfo Feel free to follow up there if you wish.