Skip to content

Bridge cask flight step migrations (19/26) - #23382

Merged
MikeMcQuaid merged 1 commit into
mainfrom
install-step-19-cask-flight-bridge
Jul 31, 2026
Merged

Bridge cask flight step migrations (19/26)#23382
MikeMcQuaid merged 1 commit into
mainfrom
install-step-19-cask-flight-bridge

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member

Repeat of #23194

Tap migrations cannot replace every cask flight block atomically. Matching step and Ruby forms must coexist until the tap reaches zero hooks.

  • retain both artifacts instead of discarding either declaration
  • execute declarative steps before the matching Ruby flight block
  • use the shared command output default in every step phase

AI disclosure: using OpenAI Codex 5.6 Sol max with local review and testing.

Tap migrations cannot replace every cask flight block atomically.
Matching step and Ruby forms must coexist until the tap reaches zero
hooks.

- retain both artifacts instead of discarding either declaration
- execute declarative steps before the matching Ruby flight block
- use the shared command output default in every step phase
@MikeMcQuaid
MikeMcQuaid requested a review from Copilot July 31, 2026 16:00
@MikeMcQuaid MikeMcQuaid changed the title Bridge cask flight step migrations Bridge cask flight step migrations (19/26) Jul 31, 2026

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 updates the Cask DSL and artifact ordering to support an incremental migration from Ruby flight blocks (preflight, postflight, etc.) to declarative *_steps stanzas by allowing both forms to coexist and ensuring the steps execute before the corresponding Ruby block.

Changes:

  • Remove the DSL conflict logic that previously warned and discarded flight blocks when matching *_steps stanzas were present.
  • Adjust artifact sort order so PreflightSteps run before PreflightBlock (matching the existing PostflightSteps/PostflightBlock ordering).
  • Update/install test coverage to use the non-deprecated step DSL method names and assert “steps then flight block” execution during the bridge period.

Reviewed changes

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

File Description
Library/Homebrew/test/cask/artifact/install_steps_spec.rb Updates step DSL usage to canonical names and adds a migration test asserting that preflight_steps run before preflight.
Library/Homebrew/cask/dsl.rb Removes the “steps override flight block with warning” behavior so both artifacts are retained during migration.
Library/Homebrew/cask/artifact/abstract_artifact.rb Reorders artifact sort precedence so PreflightSteps execute before PreflightBlock.

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

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

🚀

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Jul 31, 2026
Merged via the queue into main with commit f42ce20 Jul 31, 2026
47 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the install-step-19-cask-flight-bridge branch July 31, 2026 16: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.

3 participants