Feature request: incremental formulae for autobump #7131
Unanswered
lelegard
asked this question in
Tap maintenance and Homebrew development
Replies: 2 comments 2 replies
|
I think this is a way overcomplicated solution to a barely existing problem.
Either one works without additional files or configuration. |
0 replies
|
OK, so, if I summarise:
Okay... |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I open this discussion about autobump when a project needs a new dependency, or any non-automatic update in the content of the formula, in its future new version which will be autobumped.
The problem
Autobump is a great feature to deliver new versions of most projects in a timely manner. Within a couple of hours after a project is released in its initial repo (on GitHub for instance), the autobump action creates the PR for the new version in Homebrew.
However, this process is based on one limiting assumption: the new version of the project does not need any specific modification of the formula. Everything must remain unchanged. Autobump automatically updates the formula with the new url and sha256 of the new version. It cannot guess any specific required update in the formula, for instance new dependencies.
This is a common situation. A new version of a project often brings new features. A new feature may need a new library that was not previously listed in the formula of the project.
In that case, some human needs to update the formula with the new (or removed) dependency, or any other required change.
However, there is a race between the human maintainer and the autobump process:
Suggested solution
There are several possible solutions. This section is just a proposition, any other solution which solves the above problem can be fine.
One solution could be to introduce a new section in the formula for "next things to do". However, it would be limited to a few features such as adding or removing dependencies. This may not suit all use cases.
I suggest an "incremental formula" or "next formula". Some kind of stage / commit version of the formula.
Instead of tweaking the existing formula file
proj.rbin some complicated way, I propose that a manual PR creates a "next" version of the formula, namedproj.rb.nextorproj.rb.autobump. This file is the prepared content of the formula for the next version of the project, as processed by autobump.The file
proj.rb.autobumpis mainly a copy ofproj.rbwith the required modifications for the next version of the project. The url, sha256, and bottle descriptions are not significant since they will be modified by autobump.The PR which creates or updates
proj.rb.autobumpdoes not trigger anything because it is not an active formula. Triggering an analysis of the next formula is still recommended.When the autobump process starts autobumping
projandproj.rb.autobumpexists, it would first renameproj.rb.autobumpasproj.rb, replacing the previous version. Then, autobump would proceed as usual, updating url, sha256 and the rest.I think the problem is quite relevant (I already ran into it in the past and I will have it again in the next version of the project I maintain).
Do you think that the proposed solution, or some other solution, could add value to Homebrew?
All reactions