Skip to content

Make formula install-step var bases explicit - #23372

Merged
MikeMcQuaid merged 1 commit into
mainfrom
install-step-explicit-var-compat
Aug 2, 2026
Merged

Make formula install-step var bases explicit#23372
MikeMcQuaid merged 1 commit into
mainfrom
install-step-explicit-var-compat

Conversation

@MikeMcQuaid

@MikeMcQuaid MikeMcQuaid commented Jul 31, 2026

Copy link
Copy Markdown
Member

Formula install steps currently default relative paths to var. Retain that behaviour temporarily for compatibility while removing it from the documented API.

  • Update cookbook examples to specify their intended bases.
  • Record the core migration, enforcement and fallback removal sequence.
  • Leave an internal compatibility comment until the migration is complete.

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

@MikeMcQuaid MikeMcQuaid changed the title Make formula install-step var bases explicit (27/29) Make formula install-step var bases explicit Jul 31, 2026
@MikeMcQuaid
MikeMcQuaid requested a review from Copilot July 31, 2026 07:45

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

Updates Homebrew’s formula install-steps documentation to make var-relative paths explicit (base: :var) while keeping a temporary runtime fallback for compatibility, and records the intended migration sequence.

Changes:

  • Update Formula-Cookbook examples to pass explicit base: for var-relative paths.
  • Clarify install-step API documentation/plan around base resolution and migration phases.
  • Add an internal TODO noting the temporary default_base: :var compatibility fallback.

Reviewed changes

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

File Description
Library/Homebrew/json_api_postinstall_preflight_postflight_plan.md Adjusts plan text to reflect explicit base: usage and documents the staged migration/removal sequence.
Library/Homebrew/formula.rb Adds a TODO comment explaining the temporary default_base: :var compatibility default in post_install_steps.
docs/Formula-Cookbook.md Updates cookbook guidance and examples to specify base: :var (and other bases) explicitly in install-step calls.
Suppressed comments (1)

Library/Homebrew/json_api_postinstall_preflight_postflight_plan.md:322

  • PR 2 is marked complete, but these “Notes for implementation” now say the implementation should require explicit base: :var. Since the runtime still carries a compatibility default (as noted elsewhere in this PR), this wording is misleading. Consider framing it as a documentation/desired-usage requirement rather than a runtime requirement.
  Notes for implementation: require `mkdir`/`touch` and other single-path
  steps to specify `base: :var` explicitly and default source/target paths to
  `prefix`; expose the ordered array through `FormulaStruct`; make

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

Comment thread Library/Homebrew/json_api_postinstall_preflight_postflight_plan.md Outdated
Comment thread Library/Homebrew/formula.rb Outdated
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-explicit-var-compat branch 2 times, most recently from e5678e4 to 1ba2c48 Compare July 31, 2026 16:17
- Stop documenting the temporary implicit `var` base for formula steps.
- Update examples to specify their intended path base.
- Record the official-tap migration, RuboCop enforcement and runtime
  default removal as separate follow-up changes.
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-explicit-var-compat branch from 1ba2c48 to dbee8fb Compare July 31, 2026 19:32
@MikeMcQuaid
MikeMcQuaid marked this pull request as ready for review July 31, 2026 19:52
@MikeMcQuaid
MikeMcQuaid enabled auto-merge August 1, 2026 13:30
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Aug 2, 2026
Merged via the queue into main with commit 68c9245 Aug 2, 2026
43 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the install-step-explicit-var-compat branch August 2, 2026 16:10
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