Skip to content

Order install package phases - #23549

Open
MikeMcQuaid wants to merge 1 commit into
upgrade-install-planningfrom
ordered-install-phases
Open

Order install package phases#23549
MikeMcQuaid wants to merge 1 commit into
upgrade-install-planningfrom
ordered-install-phases

Conversation

@MikeMcQuaid

@MikeMcQuaid MikeMcQuaid commented Aug 17, 2026

Copy link
Copy Markdown
Member
  • share one download queue across formulae and casks
  • fetch all dependencies before serial package installation
  • defer successful package cleanup until installation completes

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


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

@github-actions github-actions Bot closed this Aug 17, 2026
@MikeMcQuaid MikeMcQuaid reopened this Aug 17, 2026
@MikeMcQuaid
MikeMcQuaid requested a lite review from Copilot August 17, 2026 16:27
@MikeMcQuaid
MikeMcQuaid marked this pull request as ready for review August 17, 2026 16:27

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

Comment thread Library/Homebrew/cmd/install.rb Outdated
Comment on lines 418 to 420
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 },
))
Comment on lines +473 to +474
expect(download_queue).to receive(:fetch).ordered
expect(installer).to receive(:install).ordered
@MikeMcQuaid
MikeMcQuaid force-pushed the ordered-install-phases branch from aba5a9a to 2e8626a Compare August 17, 2026 19:24
- share one download queue across formulae and casks
- fetch all dependencies before serial package installation
- defer successful package cleanup until installation completes
@MikeMcQuaid
MikeMcQuaid force-pushed the ordered-install-phases branch from 2e8626a to b3b4d5b 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