Skip to content

Order reinstall package phases - #23550

Open
MikeMcQuaid wants to merge 1 commit into
ordered-install-phasesfrom
ordered-reinstall-phases
Open

Order reinstall package phases#23550
MikeMcQuaid wants to merge 1 commit into
ordered-install-phasesfrom
ordered-reinstall-phases

Conversation

@MikeMcQuaid

@MikeMcQuaid MikeMcQuaid commented Aug 17, 2026

Copy link
Copy Markdown
Member
  • prefetch formula and cask reinstall downloads together
  • continue serial reinstalls after individual failures
  • batch cleanup for successfully reinstalled packages

  • 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 restructures brew reinstall to better sequence download/prefetch, reinstall execution, and post-run cleanup across formulae and casks, aiming to (1) prefetch downloads together, (2) keep going after individual failures, and (3) batch cleanup for successfully reinstalled packages.

Changes:

  • Enqueue and prefetch formulae (including dependent formula installers) and casks into a shared DownloadQueue, then proceed with reinstalls that successfully downloaded.
  • Track successfully reinstalled formulae/casks and perform a single Cleanup.install_clean! at the end of the run.
  • Extend Cask::Reinstall.reinstall_casks to optionally accept prebuilt installers and return the list of successfully reinstalled casks; update/add specs to validate ordering and cleanup behavior.

Reviewed changes

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

File Description
Library/Homebrew/cmd/reinstall.rb Reorders reinstall phases: shared prefetch, serial reinstall after failures, and end-of-run batch cleanup.
Library/Homebrew/cask/reinstall.rb Adds support for passing cask installers and returning the successfully reinstalled casks.
Library/Homebrew/test/cmd/reinstall_spec.rb Adds/updates command-level specs to validate phase ordering and cleanup timing.
Library/Homebrew/test/cask/reinstall_spec.rb Updates cask reinstall specs for new prefetch messaging and installer behavior.

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

Comment thread Library/Homebrew/cmd/reinstall.rb
Comment thread Library/Homebrew/cmd/reinstall.rb Outdated
Comment thread Library/Homebrew/cask/reinstall.rb Outdated
@MikeMcQuaid
MikeMcQuaid force-pushed the ordered-reinstall-phases branch from adce3de to 9660d45 Compare August 17, 2026 19:24
- prefetch formula and cask reinstall downloads together
- continue serial reinstalls after individual failures
- batch cleanup for successfully reinstalled packages
@MikeMcQuaid
MikeMcQuaid force-pushed the ordered-reinstall-phases branch from 9660d45 to 03de9a4 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