-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Discussion around linux/mac revision handling #10099
Comments
This comment has been minimized.
This comment has been minimized.
I'd say this is easier to maintain.
I guess this is already the case when fixing something specific to a given macOS version. |
This is my preference (granted I'm not involved with Linux at all). The goal is to have the two repositories in sync as much as possible, so this is the obvious choice. Keep in mind that any changes we make to the formula code to add Linux-specific stuff should probably still be run through macOS CI to make sure it's not breaking stuff on macOS. If we're already running CI on these, we may as well sync up the revisions. It does mean that users will experience an unnecessary upgrade but I don't think this is a significant deterrent. Further, the revision numbers would only diverge until a new release of the formula is made. At that point, both revisions will reset back at zero. I don't think we should be bumping the revision for only one platform. My understanding is that most formula issues that are fixed by revision bumps would affect both macOS and Linux, so it makes sense to have them be synced. What I'm getting at is this: if we add a DSL for platform-specific revisions, I think it will only really be used as a temporary measure between the Linux-macOS merge for that formula and the next release. Sure, some formulae won't get new releases for quite some time (ever?) but I think most will. It feels like unnecessary work to temporarily have the revisions diverge. Keep in mind adding this DSL would require modifications to other tools like Plus, of course, having two separate numbers makes it more difficult to read and reduces clarity. A note on implementation: I think there's currently an audit that ensures revision bumps are only by increments of 1. This would need to be ignored or modified to not trigger in these cases. I think this is a much easier change than adding a new DSL. |
We do get complaints about unexpected formula upgrades, so I would actually like to avoid unnecessary upgrades if possible. [*] Do we have a sense of how often a formula gets a revision bump for Mac/Linux but not for Linux/Mac? If it’s not too often then I’d be fine with single revisions for both platforms. If it happens reasonably often, I may still be ok with it, but I’d want to start thinking about the alternative a lot more carefully too. [*] Admittedly, this is usually a complaint about quantity and not frequency, so perhaps I am needlessly concerned. |
Well, any time the macOS version gets a revision bump, Linux gets one too. But we can see the divergence here: % rg -l 'revision.*OS.mac\?' $(brew --repo homebrew/linux) | wc -l
137 In practice, this only really happens for formulae that don't get a lot of updates, since a version bump will start from revision 0 and sync up macOS and Linux. The most divergent formulae are plotutils (it has bottles dating back to mavericks!) and freeglut (likely due to the xorg merge, as every runtime dependency change necessitates a revision increase). |
TL;DR: Yea, common revision bumps are a good idea. Ok, some thoughts/observations: I don't think there are too many complaints from Linux users regarding upgrade frequency. I might therefore be overstating my concern about upgrading too often. However, this may well be a function of a) the disposition of the average Linux user; and, b) the distribution of OSs running Homebrew. It appears that the most common source of a revision bump is a change in runtime dependencies. It is certainly possible that these changes apply only to macOS or only to Linux. However, I believe the detection of whether these changes necessitate revision bumps comes from our tests, which have limited coverage. [*] It does not seem unlikely that if one OS requires a revision bump to formula because of this change then the other does as well, even if the tests do not detect it. This suggests that there may be an argument for common revision bumps beyond just keeping formulae, the DSL, and associated tooling simple. [*] I might be underestimating |
I agree we should do this.
I agree with this. We should have some written guidelines about when to I would expect that when homebrew-core and linuxbrew-core are merged most of the times when we'll justify a revision bump on what platform it'll apply elsewhere. See also: revision bumps for one version of macOS and not others (which is a case that comes up that we've ignored). |
👍 Have only one revision for both platforms. |
Not really; the revision divergence will stil be there, even after the merge of both repositories. So the DSL will stay forever and will be used.
I have the feeling that we have some divergence in linuxbrew-core because:
Tomorrow, we should have less revision bumps due to linux. Of course, if |
This is a good case I hadn't thought about. |
It's necessary to bump the revision of dependents if the new version breaks ABI compatibility. |
What we could try is to start with the same revisions, and see over a few months if there are too many revision bumps. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Let's close this. The conclusion was:
|
I am opening this as a separate issue from #7028 to give it more visibility and to focus on the specific topic.
We need to discuss the handling of revision bumps.
Some linux formulae have a different revision than the ones on Mac:
We have two alternatives:
We have time before this happens but I would like to have a clear strategy before we start bottling for linux in homebrew-core.
The text was updated successfully, but these errors were encountered: