Add scoped install step warnings (11/24) - #23188
Merged
MikeMcQuaid merged 3 commits intoJul 26, 2026
Merged
Conversation
MikeMcQuaid
force-pushed
the
install-step-10-process-termination
branch
from
July 20, 2026 07:22
db69d73 to
da90b84
Compare
MikeMcQuaid
force-pushed
the
install-step-11-warnings
branch
from
July 20, 2026 07:22
5b8758d to
259d082
Compare
MikeMcQuaid
force-pushed
the
install-step-10-process-termination
branch
from
July 21, 2026 07:14
da90b84 to
300810b
Compare
MikeMcQuaid
force-pushed
the
install-step-11-warnings
branch
from
July 21, 2026 07:14
259d082 to
7514b48
Compare
MikeMcQuaid
force-pushed
the
install-step-10-process-termination
branch
3 times, most recently
from
July 26, 2026 12:24
7068271 to
bd0c9d3
Compare
MikeMcQuaid
force-pushed
the
install-step-11-warnings
branch
from
July 26, 2026 12:24
7514b48 to
d112c5e
Compare
MikeMcQuaid
marked this pull request as ready for review
July 26, 2026 13:05
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a first-class warn install-step to Homebrew’s InstallSteps DSL, enabling scoped warnings (via path guards like if_path_exists) without requiring arbitrary Ruby in post_install hooks. This supports incremental conversion of formula/cask hooks into declarative install steps while keeping warning messages token-expandable at runtime.
Changes:
- Add
warntoHomebrew::InstallSteps::DSLand execute it in the runner viaopoowith template-token expansion. - Update RuboCop install-steps allowlist/specs to recognise
warnas a valid step. - Add a runner spec validating that
warnexecutes when anif_path_existsguard matches.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Library/Homebrew/install_steps.rb | Introduces warn step in the DSL and runner execution. |
| Library/Homebrew/rubocops/shared/install_steps_helper.rb | Extends allowed step method list to include warn (formula allowlist only). |
| Library/Homebrew/test/install_steps_spec.rb | Adds spec covering warn under a matching path scope. |
| Library/Homebrew/test/rubocops/install_steps_spec.rb | Updates RuboCop spec expectations to include warn in the allowed methods list. |
| docs/Formula-Cookbook.md | Updates cookbook command/lifecycle section to reference warning-related steps (currently mismatched with implementation). |
Comments suppressed due to low confidence (2)
Library/Homebrew/rubocops/shared/install_steps_helper.rb:31
warnis added toALLOWED_STEP_METHODSbut not toCASK_ALLOWED_STEP_METHODS, so the cask install-steps cop will still flagwarnas an invalid step in cask flight-phase*_stepsblocks (and its error message won’t mention it). Add*NOTICE_STEP_METHODSto the cask allowlist to keep formula and cask step DSL parity.
CASK_ALLOWED_STEP_METHODS = T.let(
[*FILE_PREPARATION_STEP_METHODS, *CONFIG_WRITE_STEP_METHODS, *KEYCHAIN_STEP_METHODS,
*PERMISSION_STEP_METHODS, *COMMAND_STEP_METHODS, *STEP_SCOPE_METHODS].freeze,
T::Array[Symbol],
)
docs/Formula-Cookbook.md:1111
- This sentence documents
warn_if_exists, which doesn’t exist. Consider describingwarnand mention that it can be wrapped inif_path_exists/unless_path_existsguards to make it conditional on paths.
`terminate_process` terminates a process by name or, with `matching: :full`, by its full command line. It supports retries, `notices:` shown before the first attempt and a `failure_message:` warning. `warn_if_exists` emits a warning when any listed path exists.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MikeMcQuaid
force-pushed
the
install-step-10-process-termination
branch
from
July 26, 2026 13:24
bd0c9d3 to
2c2089f
Compare
Some formula hooks only warn when a persistent path needs user attention and do not need arbitrary post-install code. - add a literal warning step shared with cask flight phases - compose warnings with path guards instead of embedded conditions - expand fixed context tokens in warning messages
MikeMcQuaid
force-pushed
the
install-step-11-warnings
branch
from
July 26, 2026 13:24
d112c5e to
46b43d5
Compare
bevanjkay
approved these changes
Jul 26, 2026
Eight GCC formulae share the same Linux runtime-link and specs generation algorithm after installation. - probe the active GCC and glibc runtime locations - generate family-appropriate library, linker and header search paths - keep the repeated algorithm behind one literal formula step
Add GCC runtime install action (12/24)
MikeMcQuaid
merged commit Jul 26, 2026
7e571b7
into
install-step-10-process-termination
6 checks passed
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.
Some formula hooks only warn when a persistent path needs user attention
and do not need arbitrary post-install code.
AI disclosure: using OpenAI Codex 5.6 Sol max with local review and
testing.