Order install package phases - #23549
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 reorders brew install鈥檚 work so downloads for formulae/casks (including dependents/dependencies) are prefetched up-front using a shared download queue, installations run afterward, and successful cleanup is deferred until after installation completes.
Changes:
- Prefetches dependent formula installers alongside the primary formula installers before installation.
- Prefetches cask downloads (and dependency downloads) ahead of installation/upgrade, and reuses prefetched cask installers where possible.
- Defers install cleanup into a single
Cleanup.install_clean!call after installs/upgrades finish.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Library/Homebrew/cmd/install.rb | Reorders install phases: prefetch queue composition (formulae + dependents + casks), installs/upgrades, then deferred cleanup and message display. |
| Library/Homebrew/test/cmd/install_spec.rb | Updates install command specs to assert new sequencing/arguments, and adds coverage for deferred cleanup ordering around cask caveats/messages. |
馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| download_queue.fetch(heading: Install.combined_fetch_downloads_heading( | ||
| formula_names: formulae_installer.map { |fi| fi.formula.name }, | ||
| cask_names: fetch_casks.map(&:full_name), | ||
| formula_names: all_formulae_installer.map { |fi| fi.formula.name }, | ||
| )) |
| expect(download_queue).to receive(:fetch).ordered | ||
| expect(installer).to receive(:install).ordered |
aba5a9a to
2e8626a
Compare
- share one download queue across formulae and casks - fetch all dependencies before serial package installation - defer successful package cleanup until installation completes
2e8626a to
b3b4d5b
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.