Skip to content

Prepare batched package installation - #23547

Open
MikeMcQuaid wants to merge 1 commit into
mainfrom
batched-install-primitives
Open

Prepare batched package installation#23547
MikeMcQuaid wants to merge 1 commit into
mainfrom
batched-install-primitives

Conversation

@MikeMcQuaid

@MikeMcQuaid MikeMcQuaid commented Aug 17, 2026

Copy link
Copy Markdown
Member
  • prefetch cask dependencies before serial installation
  • collect successful formula installs for deferred cleanup
  • clean formulae and casks concurrently with ordered output

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

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

OpenAI Codex 5.6 GPT Sol xhigh with local review and testing.


Copilot AI lite review requested due to automatic review settings August 17, 2026 16:17
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your pull request. This has been closed because it appears to be missing the pull request template, perhaps because this was written by an AI not a human. We require humans to read and fill in these templates.

Please edit this pull request to fill in the current pull request template. This workflow will reopen this pull request automatically once the template is complete. Do not open a new pull request for this.

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 introduces infrastructure to support batching parts of brew install by (1) separating install-time work from cleanup, and (2) pre-enqueuing cask dependency downloads so more work can be overlapped while keeping user-facing output ordered.

Changes:

  • Extend Homebrew::Install.install_formulae to optionally defer inline cleanup and return the successfully-installed formulae.
  • Add Homebrew::Cleanup.install_clean! to clean formulae and casks concurrently while printing results in a deterministic order.
  • Add dependency download pre-enqueueing for casks (Cask::Installer#enqueue_dependency_downloads) and update tests around the new behaviors.

Reviewed changes

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

Show a summary per file
File Description
Library/Homebrew/install.rb Adjusts cask download queueing flow and changes install_formulae to support deferred cleanup and returning installed formulae.
Library/Homebrew/cleanup.rb Adds batched/parallel install cleanup with ordered output and introduces output redirection for cleanup path logging.
Library/Homebrew/cask/installer.rb Adds dependency download pre-enqueueing and tracking of download failures to short-circuit installs cleanly.
Library/Homebrew/test/install_spec.rb Adds coverage for deferred formula cleanup return value and for the cask dependency download ordering behavior.
Library/Homebrew/test/cleanup_spec.rb Adds coverage for parallel install cleanup with ordered reporting.
Library/Homebrew/test/cask/installer_spec.rb Adds coverage ensuring pre-fetched dependency downloads are reused (no re-fetch).

馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread Library/Homebrew/install.rb Outdated
Comment on lines 478 to 482
@@ -477,11 +480,25 @@ def enqueue_cask_installers(cask_installers, download_queue:)
download_queue.fetch(only: Cask::Download, heading: "Downloading Cask files")
end

@MikeMcQuaid
MikeMcQuaid force-pushed the batched-install-primitives branch from 90beacf to 5c0f1ea Compare August 17, 2026 19:24
- prefetch cask dependencies before serial installation
- collect successful formula installs for deferred cleanup
- clean formulae and casks concurrently with ordered output
- include installed casks in periodic cleanup
@MikeMcQuaid
MikeMcQuaid force-pushed the batched-install-primitives branch from 5c0f1ea to 4351893 Compare August 17, 2026 19:46
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