Skip to content

Add cask install steps#22373

Merged
MikeMcQuaid merged 1 commit into
mainfrom
install-steps-cask
May 24, 2026
Merged

Add cask install steps#22373
MikeMcQuaid merged 1 commit into
mainfrom
install-steps-cask

Conversation

@MikeMcQuaid
Copy link
Copy Markdown
Member

  • Expose structured steps for cask flight phases and API data.
  • Prefer steps over matching Ruby flight blocks with warnings.
  • Document cask usage and autocorrect simple file preparation.

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you written new tests (excluding integration tests) for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes. Non-maintainers may only have one AI-assisted/generated PR open at a time.

OpenAI Codex 5.5 xhigh with local review and testing.


@MikeMcQuaid MikeMcQuaid force-pushed the install-steps-core branch from e7e5dfa to 875a2c4 Compare May 21, 2026 15:30
@MikeMcQuaid MikeMcQuaid force-pushed the install-steps-cask branch from 3ec2474 to cab648a Compare May 22, 2026 11:13
@MikeMcQuaid MikeMcQuaid force-pushed the install-steps-core branch 2 times, most recently from 3776eac to 4c1998c Compare May 22, 2026 16:26
Base automatically changed from install-steps-core to main May 22, 2026 17:33
@MikeMcQuaid MikeMcQuaid force-pushed the install-steps-cask branch from cab648a to d422c1c Compare May 22, 2026 18:09
Copilot AI review requested due to automatic review settings May 22, 2026 18:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 structured, declarative “install steps” stanzas for casks (covering pre/postflight and uninstall pre/postflight), with supporting artifacts, RuboCop guidance/autocorrection, and documentation so these steps can be represented in JSON API data rather than relying on arbitrary Ruby flight blocks.

Changes:

  • Add new cask artifact types and DSL stanzas for preflight_steps, postflight_steps, uninstall_preflight_steps, and uninstall_postflight_steps, and wire them into install/uninstall flows.
  • Extend the Cask RuboCop cop to detect simple file-prep flight blocks and autocorrect them into structured *_steps blocks.
  • Add fixtures/tests and update the Cask Cookbook to document the new stanzas.

Reviewed changes

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

Show a summary per file
File Description
Library/Homebrew/test/support/fixtures/cask/Casks/with-install-steps.rb New fixture cask exercising all new *_steps stanzas.
Library/Homebrew/test/rubocops/cask/install_steps_spec.rb Adds RuboCop cop coverage for autocorrecting simple flight blocks into *_steps.
Library/Homebrew/test/cask/cask_loader/from_api_loader_spec.rb Ensures API loading covers casks with *_steps stanzas.
Library/Homebrew/test/cask/artifact/install_steps_spec.rb New artifact/installer integration specs for structured steps and conflict warnings.
Library/Homebrew/sorbet/rbi/dsl/cask/cask.rbi Adds RBI entries for the new DSL methods.
Library/Homebrew/rubocops/cask/install_steps.rb Adds autocorrection and auditing for simple file-prep flight blocks.
Library/Homebrew/json_api_postinstall_preflight_postflight_plan.md Marks the plan item for cask flight steps as completed.
Library/Homebrew/cask/installer.rb Includes new step artifacts in installer install/uninstall phases (Sorbet casting).
Library/Homebrew/cask/dsl.rb Adds the new DSL stanzas, step building/normalization, and flight-block conflict handling.
Library/Homebrew/cask/artifact/install_steps.rb Introduces new AbstractInstallSteps and concrete step artifacts for each phase.
Library/Homebrew/cask/artifact/abstract_artifact.rb Extends artifact sort ordering to place the new step artifacts appropriately.
Library/Homebrew/cask/artifact.rb Requires the new install-steps artifact file.
docs/Cask-Cookbook.md Documents the new *_steps stanzas and adds them to stanza ordering/reference tables.
Files not reviewed (1)
  • Library/Homebrew/sorbet/rbi/dsl/cask/cask.rbi: Language not supported

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

Comment thread Library/Homebrew/cask/dsl.rb Outdated
Comment thread Library/Homebrew/cask/dsl.rb Outdated
Comment thread Library/Homebrew/test/cask/artifact/install_steps_spec.rb Outdated
Comment thread docs/Cask-Cookbook.md Outdated
@MikeMcQuaid MikeMcQuaid force-pushed the install-steps-cask branch 3 times, most recently from 2a36dfd to f94f9c7 Compare May 23, 2026 10:10
@MikeMcQuaid MikeMcQuaid changed the base branch from main to sandbox-cask-executables May 24, 2026 13:06
@MikeMcQuaid MikeMcQuaid marked this pull request as draft May 24, 2026 13:07
@MikeMcQuaid MikeMcQuaid force-pushed the install-steps-cask branch from f94f9c7 to fca4637 Compare May 24, 2026 13:13
@MikeMcQuaid MikeMcQuaid force-pushed the sandbox-cask-executables branch 2 times, most recently from b783ef9 to bc6d9cb Compare May 24, 2026 13:47
@MikeMcQuaid MikeMcQuaid force-pushed the install-steps-cask branch from fca4637 to 0bd6d8d Compare May 24, 2026 13:55
Base automatically changed from sandbox-cask-executables to main May 24, 2026 15:38
@MikeMcQuaid MikeMcQuaid marked this pull request as ready for review May 24, 2026 15:51
- Expose structured steps for cask flight phases and API data.
- Prefer steps over matching Ruby flight blocks with warnings.
- Document cask usage and keep conversion audits separate.
@MikeMcQuaid MikeMcQuaid force-pushed the install-steps-cask branch from 0bd6d8d to 6f0b2e2 Compare May 24, 2026 15:53
@MikeMcQuaid MikeMcQuaid enabled auto-merge May 24, 2026 15:54
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue May 24, 2026
Merged via the queue into main with commit 654b084 May 24, 2026
36 checks passed
@MikeMcQuaid MikeMcQuaid deleted the install-steps-cask branch May 24, 2026 16:28
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