audit: fix compatibility_version checks.#21474
Merged
MikeMcQuaid merged 1 commit intomainfrom Jan 29, 2026
Merged
Conversation
This wasn't correctly triggering so add some fixes and fix the tests.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes compatibility_version check logic in the formula auditor to only require compatibility_version bumps when a dependency's version actually changes. It also fixes the resolution of sharded formula paths and improves error messaging.
Changes:
- Modified audit logic to skip compatibility_version checks when a dependency's version hasn't changed
- Fixed formula path resolution to use
formula_files_by_namefor proper sharded formula support - Improved error messages to show expected compatibility_version values instead of current incorrect values
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Library/Homebrew/formula_auditor.rb | Added version change check before requiring compatibility_version bump, fixed sharded formula path resolution, and improved error message clarity |
| Library/Homebrew/test/formula_auditor_spec.rb | Added test for sharded formula path resolution and tests for version-dependent compatibility_version checking |
| AGENTS.md | Reorganized documentation to emphasize running brew lgtm before prompting for input |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This wasn't correctly triggering so add some fixes and fix the tests.
Noticed in Homebrew/homebrew-core#264948 and a few other cases.
Tested the before/after case for Homebrew/homebrew-core#264948 and works as expected.