🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

Fix bundle jobs cask deps#22838

Merged
MikeMcQuaid merged 1 commit into
mainfrom
fix-bundle-jobs-cask-deps
Jun 21, 2026
Merged

Fix bundle jobs cask deps#22838
MikeMcQuaid merged 1 commit into
mainfrom
fix-bundle-jobs-cask-deps

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member

Fixes #22837

  • brew bundle --jobs=auto skipped formula deps for casks that were not installed yet, so tapped casks could race formula installs.
  • Use each cask entry's full_name and load the cask definition when no installed cask matches, preserving the installed cask path first.
  • Count only true worker results as parallel install success so lock failures return a failed bundle status.
  • Add regressions for tapped cask deps and false parallel results.

  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) 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 June 21, 2026 12:56

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 pull request fixes brew bundle --jobs=auto parallel installation correctness by ensuring cask formula dependencies are resolved using fully-qualified cask names (including tapped casks), and by making parallel worker results accurately reflect install failures (e.g., lock conflicts).

Changes:

  • Resolve cask formula dependencies using each entry’s full_name (and load cask definitions when the cask isn’t installed yet).
  • Treat only explicit true worker return values as successful parallel installs, so false results correctly fail the bundle run.
  • Add regression specs covering tapped cask dependency ordering and false parallel results.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
Library/Homebrew/bundle/parallel_installer.rb Uses cask full_name for dependency resolution and counts only true parallel results as success.
Library/Homebrew/bundle/cask.rb Enhances formula dependency extraction to match installed casks by token/full name and fall back to loading the cask definition when not installed.
Library/Homebrew/test/bundle/installer_spec.rb Adds parallel installer regressions for false results and tapped cask dependency ordering.
Library/Homebrew/test/bundle/cask_spec.rb Adds coverage for resolving formula dependencies from cask definitions when the cask is not installed.

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

Comment thread Library/Homebrew/bundle/cask.rb Outdated
Comment thread Library/Homebrew/bundle/cask.rb Outdated
@MikeMcQuaid MikeMcQuaid force-pushed the fix-bundle-jobs-cask-deps branch from 3239c39 to 8ef717e Compare June 21, 2026 14:10
- `brew bundle --jobs=auto` skipped formula deps for casks that
  were not installed yet, so tapped casks could race formula installs.
- Use each cask entry's `full_name` and load the cask definition when
  no installed cask matches, preserving the installed cask path first.
- Prepare `gh` once before parallel workers when attestation checks may
  otherwise make formula and cask installs race to install the verifier.
- Count only `true` worker results as parallel install success so lock
  failures return a failed bundle status.
- Add regressions for tapped cask deps, attestation setup and false
  parallel results.
@MikeMcQuaid MikeMcQuaid force-pushed the fix-bundle-jobs-cask-deps branch from 8ef717e to 689a69e Compare June 21, 2026 14:25
@MikeMcQuaid MikeMcQuaid enabled auto-merge June 21, 2026 14:37
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Jun 21, 2026
Merged via the queue into main with commit d2b64df Jun 21, 2026
41 checks passed
@MikeMcQuaid MikeMcQuaid deleted the fix-bundle-jobs-cask-deps branch June 21, 2026 20:30
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.

jobs --auto dependency resolution bug

3 participants