Prepare batched package installation - #23547
Conversation
|
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. |
There was a problem hiding this comment.
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_formulaeto 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.
| @@ -477,11 +480,25 @@ def enqueue_cask_installers(cask_installers, download_queue:) | |||
| download_queue.fetch(only: Cask::Download, heading: "Downloading Cask files") | |||
| end | |||
|
|
|||
90beacf to
5c0f1ea
Compare
- 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
5c0f1ea to
4351893
Compare
brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?OpenAI Codex 5.6 GPT Sol xhigh with local review and testing.