Skip to content

Compact install step JSON (25/26) - #23365

Open
MikeMcQuaid wants to merge 1 commit into
mainfrom
install-step-25-compact-json
Open

Compact install step JSON (25/26)#23365
MikeMcQuaid wants to merge 1 commit into
mainfrom
install-step-25-compact-json

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member

Needs #23199

Reduce the internal JSON representation of structured install steps.

  • omit values already supplied by runner defaults
  • preserve explicit compatibility-sensitive behaviour
  • cover compact defaults in the install-step specs

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

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 reduces the size of the internal JSON representation for structured install steps by omitting fields that are implied by runtime defaults, while keeping explicit values where they change behaviour. It also updates and adds specs to ensure the compact representation is produced.

Changes:

  • Omit default-valued fields in the install-step DSL output (e.g., overwrite, match, attempts, group) while preserving non-default/behaviour-changing values.
  • Update the install-step runner to handle omitted match for terminate_process.
  • Extend tests to assert omission of default keys and update existing JSON expectations.

Reviewed changes

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

File Description
Library/Homebrew/install_steps.rb Adjusts step serialization to omit runtime-default fields and updates runtime handling for omitted match.
Library/Homebrew/test/install_steps_spec.rb Adds coverage asserting that default runtime keys are omitted from generated steps.
Library/Homebrew/test/formula_spec.rb Updates expected JSON output to reflect omission of default overwrite: false for symlink steps.

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

@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-25-compact-json branch from 5d684c8 to 3211d11 Compare July 31, 2026 08:22
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-25-compact-json branch from 3211d11 to 7250315 Compare July 31, 2026 16:17
Base automatically changed from install-step-24-final-migration-stacks to main July 31, 2026 16:53
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-25-compact-json branch from 7250315 to ea81edd Compare July 31, 2026 16:53
- omit values already supplied by runner defaults
- retain explicit values when they change step behaviour
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-25-compact-json branch from ea81edd to 272f861 Compare August 3, 2026 12:21
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