Skip to content

Pre-stage cask downloads#23034

Merged
MikeMcQuaid merged 1 commit into
mainfrom
cask-download-queue-staging
Jul 10, 2026
Merged

Pre-stage cask downloads#23034
MikeMcQuaid merged 1 commit into
mainfrom
cask-download-queue-staging

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member

Needs #23033

  • Extract cask containers during queued fetches so installs spend less serial time in the staging phase.
  • Keep receipt writing and artifact installation in the normal install path so installed state does not change early.
  • Skip queued extraction when unpack dependencies are still missing so dependency installation ordering stays intact.

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

  • AI was used to generate or assist with generating this PR.

OpenAI Codex 5.5 xhigh with local review and testing.


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 “pre-staging” for cask installs by extracting cask containers during DownloadQueue fetch/stage work (when pour: true), then moving the staged result into Caskroom during the normal Cask::Installer#stage path to reduce serial staging time while keeping receipt/artifact installation timing unchanged.

Changes:

  • Add Cask::Download support for queued staging into a temp “caskroom” path with a marker to indicate readiness.
  • Update Cask::Installer#stage to consume (move) a queued-staged cask directory when present, otherwise fall back to normal extraction.
  • Add RSpec coverage for queued staging behavior and for skipping queued staging when unpack dependencies are missing.

Reviewed changes

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

File Description
Library/Homebrew/cask/download.rb Adds queued staging hooks for cask downloads, including temp staged path/marker and cleanup.
Library/Homebrew/cask/installer.rb Uses queued-staged output during stage when available, with cleanup on failure.
Library/Homebrew/test/cask/installer_spec.rb Adds tests to validate queued staging behavior and dependency-gated staging.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Library/Homebrew/cask/installer.rb Outdated
Comment thread Library/Homebrew/test/cask/installer_spec.rb
@MikeMcQuaid MikeMcQuaid force-pushed the download-queue-staging-shape branch 2 times, most recently from 6e82544 to 8dd46b7 Compare July 9, 2026 17:14
Base automatically changed from download-queue-staging-shape to main July 9, 2026 21:00
@MikeMcQuaid MikeMcQuaid force-pushed the cask-download-queue-staging branch from ca3a377 to 830d570 Compare July 10, 2026 07:58
@MikeMcQuaid MikeMcQuaid marked this pull request as ready for review July 10, 2026 08:02
@MikeMcQuaid MikeMcQuaid requested a review from Copilot July 10, 2026 08:19

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

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

Comment thread Library/Homebrew/cask/download.rb
Comment thread Library/Homebrew/cask/download.rb
Comment thread Library/Homebrew/cask/download.rb
Comment thread Library/Homebrew/cask/installer.rb
@MikeMcQuaid MikeMcQuaid force-pushed the cask-download-queue-staging branch from 830d570 to 8019619 Compare July 10, 2026 08:32
- Extract cask containers during queued fetches so installs spend less
  serial time in the staging phase.
- Keep receipt writing and artifact installation in the normal install
  path so installed state does not change early.
- Skip queued extraction when unpack dependencies are still missing so
  dependency installation ordering stays intact.
@MikeMcQuaid MikeMcQuaid force-pushed the cask-download-queue-staging branch from 8019619 to ed51803 Compare July 10, 2026 08:32
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Jul 10, 2026
Merged via the queue into main with commit 857ca8c Jul 10, 2026
41 checks passed
@MikeMcQuaid MikeMcQuaid deleted the cask-download-queue-staging branch July 10, 2026 18:58
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.

3 participants