Skip to content

audit: fix compatibility_version checks.#21474

Merged
MikeMcQuaid merged 1 commit intomainfrom
compat_version_audit
Jan 29, 2026
Merged

audit: fix compatibility_version checks.#21474
MikeMcQuaid merged 1 commit intomainfrom
compat_version_audit

Conversation

@MikeMcQuaid
Copy link
Copy Markdown
Member

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.

This wasn't correctly triggering so add some fixes and fix the tests.
Copilot AI review requested due to automatic review settings January 29, 2026 10:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_name for 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.

Copy link
Copy Markdown
Member

@p-linnane p-linnane left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit 948c9bc Jan 29, 2026
43 checks passed
@MikeMcQuaid MikeMcQuaid deleted the compat_version_audit branch January 29, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants