Bridge cask flight step migrations (19/26) - #23382
Merged
Merged
Conversation
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
Contributor
There was a problem hiding this comment.
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
*_stepsstanzas were present. - Adjust artifact sort order so
PreflightStepsrun beforePreflightBlock(matching the existingPostflightSteps/PostflightBlockordering). - 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.
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.
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.
AI disclosure: using OpenAI Codex 5.6 Sol max with local review and testing.