Skip to content
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

dev-cmd/bump: Point out if formulae should be kept in sync with others #16515

Merged

Conversation

issyl0
Copy link
Member

@issyl0 issyl0 commented Jan 21, 2024

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

  • Related to brew bump refuses to bump linked formulae #16383.
  • This will give some information to users of brew bump that they should keep the version of the formula in sync with other formulae.
  • A future enhancement is actually making the bumping of the "related" formulae automatic with --open-pr. But for now, telling people so that they don't have to wait until brew audit fails either locally or in CI at a later stage is a good start.

- This will give some information to users of `brew bump` that they
  should keep the version of the formula in sync with other formulae.
- A future enhancement is actually making the bumping of the "related"
  formulae automatic with `--open-pr`. But for now, telling people so
  that they don't have to wait until `brew audit` fails either locally
  or in CI at a later stage is a good start.
@issyl0
Copy link
Member Author

issyl0 commented Jan 21, 2024

I like the sound of consolidating the duplicated-ish code that's in FormulaAuditor#audit_synced_versions_formulae and here into somewhere new, but I can't decide on where. Any suggestions?

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far, thanks @issyl0!

Library/Homebrew/dev-cmd/bump.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/bump.rb Outdated Show resolved Hide resolved
@MikeMcQuaid
Copy link
Member

  • A future enhancement is actually making the bumping of the "related" formulae automatic with --open-pr. But for now, telling people so that they don't have to wait until brew audit fails either locally or in CI at a later stage is a good start.

@issyl0 Any thoughts on just jumping straight to the automatic step? Not saying you should do that instead of this PR or that it should block but just interested in your thought process here.

I like the sound of consolidating the duplicated-ish code that's in FormulaAuditor#audit_synced_versions_formulae and here into somewhere new, but I can't decide on where. Any suggestions?

I think it could live in FormulaAuditor and this call out to that class as that's what "owns" this file IMO.

@issyl0
Copy link
Member Author

issyl0 commented Jan 22, 2024

Any thoughts on just jumping straight to the automatic step?

I didn't have brain power to figure out how to do the automatic step when I first looked at this, but I thought that this step was a good middle ground for telling users "watch out there's more work here" that's usually hidden in the JSON file.

@issyl0 issyl0 marked this pull request as draft January 22, 2024 22:42
@MikeMcQuaid
Copy link
Member

I didn't have brain power to figure out how to do the automatic step when I first looked at this, but I thought that this step was a good middle ground for telling users "watch out there's more work here" that's usually hidden in the JSON file.

Yeh, I'm fine with merging this as an in-between step.

My thinking is that something a brew bump invocation that doesn't include all the necessary formulae at once will fail.

I guess I ask because the code could be even simpler: something like:

  • get the list of formulae you're checking for bumps
  • if the list contains any synced_versions_formulae: check that it includes all the synced_versions_formulae for that formula
  • if it doesn't: error out telling people which formulae need specified manually
  • if it does: continue as-is

- This way we can use them in the audit and in `bump`.
@issyl0 issyl0 force-pushed the bump-point-out-if-formulae-are-synced branch from be25e20 to 1b5fa17 Compare January 24, 2024 14:01
@issyl0 issyl0 marked this pull request as ready for review January 25, 2024 23:40
@MikeMcQuaid MikeMcQuaid merged commit 3d03ed2 into Homebrew:master Jan 26, 2024
24 checks passed
@MikeMcQuaid
Copy link
Member

Looks good, thanks @issyl0!

@issyl0 issyl0 deleted the bump-point-out-if-formulae-are-synced branch February 2, 2024 15:56
@github-actions github-actions bot added the outdated PR was locked due to age label Mar 4, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants