-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
bump: bump synced formula together #19213
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
base: master
Are you sure you want to change the base?
Conversation
2a31737
to
140f11b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bevanjkay, I think the overall logic looks good here – it's just that the diff is a bit scary because everything's been moved into a loop over the list of formulae to bump together (and pr_info
contains multiple commits, and only after all these commits are created should the audit checks be run).
Once you get the time to add tests I'd be happy to review this in more detail and even test it out.
I think that ideally I will extract the loop logic into a separate function to make it a bit clearer. I have ran some singular bumps with this branch checked out, and there is currently an issue where the PR title is incorrect. Looking to get back to this PR in the next week or two. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
140f11b
to
4b622b8
Compare
4b622b8
to
afc681e
Compare
643f008
to
a0cd9aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.
Files not reviewed (2)
- Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi: Language not supported
- Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/bump_formula_pr.rbi: Language not supported
Comments suppressed due to low confidence (2)
Library/Homebrew/dev-cmd/bump-formula-pr.rb:410
- The code uses 'formula' whereas the variable was renamed to 'named_formula' earlier; update this reference for consistency.
sourcefile_path: formula.path,
Library/Homebrew/dev-cmd/bump-formula-pr.rb:375
- Replace 'formula' with 'named_formula' in the run_audit call to maintain consistency with the earlier renaming.
run_audit(formula, alias_rename, old_contents, skip_synced_versions: args.bump_synced.present?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Codepilot feedback actually makes sense but otherwise good to ship.
e2d2df9
to
6fb7c81
Compare
I'm still doing some further testing here to make sure I'm confident it is working as expected before looking to merge. |
6fb7c81
to
7ccdc34
Compare
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?This PR adds functionality to
brew bump
that allows Formula with synced versions to be bumped together.If you pass the flag
--bump-synced
tobrew bump
it will automatically include any Formula that are marked as synced versions.The diff is quite significant in some places, because existing code had to be moved into loops to iterate over the creation of commits and file changes. There isn't great test coverage for these commands as it stands, but some could be added here.
I will keep the branch checked out over the coming days to discover any issues.
Here is an example of a synced version PR opened from this branch:
Homebrew/homebrew-core#219026