Skip to content

Check bundle formula link status#22412

Merged
p-linnane merged 1 commit into
mainfrom
bundle-check-link-status
May 27, 2026
Merged

Check bundle formula link status#22412
p-linnane merged 1 commit into
mainfrom
bundle-check-link-status

Conversation

@MikeMcQuaid

@MikeMcQuaid MikeMcQuaid commented May 24, 2026

Copy link
Copy Markdown
Member
  • Ensure brew bundle check catches formulae with wrong links
  • Match implicit link expectations used by brew bundle install
  • Cover check, check --verbose and check --install

  • 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? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you written new tests (excluding integration tests) for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR.

OpenAI Codex 5.5 xhigh with local review and testing.


Copilot AI review requested due to automatic review settings May 24, 2026 19:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 extends brew bundle check to validate whether installed formulae match the Brewfile’s expected link/unlink state (including implicit expectations), aligning check behavior with what brew bundle install would do and adding spec coverage for the new failure mode.

Changes:

  • Add link-status evaluation to formula “installed and up-to-date” checking and provide a specific failure message for link mismatches.
  • Refactor link/unlink decision logic into a shared helper used by both checking and install-time link state changes.
  • Add bundle check specs covering non-verbose, --verbose, and --install scenarios for link-status mismatches.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Library/Homebrew/bundle/brew.rb Adds link-status checking logic and refactors expected link behavior into shared helpers used by both check and install link/unlink operations.
Library/Homebrew/test/cmd/bundle/check_subcommand_spec.rb Adds test coverage for formula link-status mismatches across check modes (default, --verbose, --install).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Library/Homebrew/bundle/brew.rb Outdated
- Ensure `brew bundle check` catches formulae with wrong links
- Match implicit link expectations used by `brew bundle install`
- Cover `check`, `check --verbose` and `check --install`
@MikeMcQuaid MikeMcQuaid force-pushed the bundle-check-link-status branch from 97a8831 to 7eb081f Compare May 25, 2026 06:47
@MikeMcQuaid MikeMcQuaid enabled auto-merge May 25, 2026 08:13
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue May 27, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 27, 2026
@p-linnane p-linnane added this pull request to the merge queue May 27, 2026
Merged via the queue into main with commit cfd1707 May 27, 2026
36 checks passed
@p-linnane p-linnane deleted the bundle-check-link-status branch May 27, 2026 01:58
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