Skip to content

Check bundle formula link status#22412

Open
MikeMcQuaid wants to merge 1 commit into
mainfrom
bundle-check-link-status
Open

Check bundle formula link status#22412
MikeMcQuaid wants to merge 1 commit into
mainfrom
bundle-check-link-status

Conversation

@MikeMcQuaid
Copy link
Copy Markdown
Member

@MikeMcQuaid MikeMcQuaid commented May 24, 2026

  • 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
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 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
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.

2 participants