Add cask install steps#22373
Merged
Merged
Conversation
e7e5dfa to
875a2c4
Compare
3ec2474 to
cab648a
Compare
3776eac to
4c1998c
Compare
cab648a to
d422c1c
Compare
Contributor
There was a problem hiding this comment.
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, anduninstall_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
*_stepsblocks. - 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.
2a36dfd to
f94f9c7
Compare
f94f9c7 to
fca4637
Compare
b783ef9 to
bc6d9cb
Compare
fca4637 to
0bd6d8d
Compare
- 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.
0bd6d8d to
6f0b2e2
Compare
p-linnane
approved these changes
May 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
brew lgtm(style, typechecking and tests) with your changes locally?OpenAI Codex 5.5 xhigh with local review and testing.