Skip to content

bundle: unify bundle package type classes#21766

Merged
MikeMcQuaid merged 1 commit intomainfrom
cleanup_bundle
Mar 19, 2026
Merged

bundle: unify bundle package type classes#21766
MikeMcQuaid merged 1 commit intomainfrom
cleanup_bundle

Conversation

@MikeMcQuaid
Copy link
Copy Markdown
Member

  • move brew, cask, tap, and extension package types to single implementation classes and files
  • remove legacy checker, dumper, and installer wrappers plus the old bundle helper seams they kept alive
  • simplify checker and package type dispatch, and clean up extension package-manager caching and typing

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

Use OpenAI Codex GPT-5.4 xhigh with ~3 rounds of feedback and manual review from Fork.app.


- move brew, cask, tap, and extension package types to single implementation classes and files
- remove legacy checker, dumper, and installer wrappers plus the old bundle helper seams they kept alive
- simplify checker and package type dispatch, and clean up extension package-manager caching and typing
Copilot AI review requested due to automatic review settings March 19, 2026 14:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 refactors brew bundle’s package-type architecture by consolidating brew/cask/tap and extension package types into unified implementation classes, removing legacy checker/dumper/installer wrapper files, and simplifying dispatch/caching behavior across bundle commands.

Changes:

  • Replace legacy per-type checker/dumper/installer wrapper constants with unified PackageType/extension implementations and updated command dispatch.
  • Centralize package-type typing and option handling (new bundle/package_type.rb type aliases and base behavior).
  • Update bundle command and spec suites to target the unified classes and new extension selection plumbing.

Reviewed changes

Copilot reviewed 77 out of 78 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
Library/Homebrew/bundle.rb Removes legacy which_* / *_installed? helpers now owned by extension classes.
Library/Homebrew/bundle/brew.rb Uses Brew::Services directly and removes legacy compatibility aliases.
Library/Homebrew/bundle/brew_services.rb Removes legacy BrewServices aliasing/shims.
Library/Homebrew/bundle/cask.rb Removes legacy compatibility aliases for separate dumper/installer/checker constants.
Library/Homebrew/bundle/checker.rb Simplifies check-step dispatch to use CORE_CHECKS and direct step methods.
Library/Homebrew/bundle/commands/cleanup.rb Uses unified package type classes and extension cleanup directly.
Library/Homebrew/bundle/commands/dump.rb Switches to a single extension_types: selection hash.
Library/Homebrew/bundle/commands/exec.rb Switches service operations to Bundle::Brew::Services.
Library/Homebrew/bundle/commands/list.rb Switches to a single extension_types: selection hash.
Library/Homebrew/bundle/dsl.rb Adds typed readers and requires bundle/package_type for shared option types.
Library/Homebrew/bundle/dumper.rb Removes legacy keyword plumbing and unifies type-selection handling.
Library/Homebrew/bundle/extensions.rb Preserves legacy extension dump ordering with clearer intent.
Library/Homebrew/bundle/extensions/extension.rb Rebuilds Extension base on PackageType and removes legacy checker base.
Library/Homebrew/bundle/extensions/cargo.rb Moves cargo implementation fully into extension; updates executable detection.
Library/Homebrew/bundle/extensions/flatpak.rb Moves flatpak implementation fully into extension; updates option typing and behavior.
Library/Homebrew/bundle/extensions/go.rb Moves go implementation fully into extension; updates executable detection usage.
Library/Homebrew/bundle/extensions/mac_app_store.rb Moves MAS implementation fully into extension; introduces typed App struct.
Library/Homebrew/bundle/extensions/uv.rb Moves uv implementation fully into extension; updates DSL option typing.
Library/Homebrew/bundle/extensions/vscode_extension.rb Moves VSCode implementation fully into extension; adds executable resolution.
Library/Homebrew/bundle/installer.rb Refactors installer to use a typed InstallableEntry struct and unified call pattern.
Library/Homebrew/bundle/lister.rb Simplifies signature to a single extension_types: hash and typed entries.
Library/Homebrew/bundle/package_type.rb Introduces the new PackageType base, registration, and shared option type aliases.
Library/Homebrew/bundle/skipper.rb Updates tap-failure skip logic to use typed entry options.
Library/Homebrew/bundle/tap.rb Updates method signatures/typing and removes legacy compatibility aliases.
Library/Homebrew/bundle/cargo.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/cargo_checker.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/cargo_dumper.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/cargo_installer.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/checker/base.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/cask_checker.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/cask_dumper.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/cask_installer.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/extension.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/flatpak.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/flatpak_checker.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/flatpak_dumper.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/flatpak_installer.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/formula_dumper.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/formula_installer.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/go.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/go_checker.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/go_dumper.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/go_installer.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/mac_app_store.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/mac_app_store_checker.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/mac_app_store_dumper.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/mac_app_store_installer.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/tap_checker.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/tap_dumper.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/tap_installer.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/uv.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/uv_checker.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/uv_dumper.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/uv_installer.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/vscode_extension.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/vscode_extension_checker.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/vscode_extension_dumper.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/vscode_extension_installer.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/brew_checker.rb Removes old compatibility require wrapper file.
Library/Homebrew/bundle/brew_service_checker.rb Removes old compatibility require wrapper file.
Library/Homebrew/test/bundle/bundle_spec.rb Drops tests for removed legacy MAS helpers.
Library/Homebrew/test/bundle/brew_services_spec.rb Updates spec target to Homebrew::Bundle::Brew::Services.
Library/Homebrew/test/bundle/brew_spec.rb Updates service stubs/expectations to Brew::Services.
Library/Homebrew/test/bundle/cargo_spec.rb Updates requires and stubbing to new extension executable API.
Library/Homebrew/test/bundle/dumper_spec.rb Updates type selection to extension_types: hash and unified dump classes.
Library/Homebrew/test/bundle/flatpak_spec.rb Updates requires and installed checks to new extension API.
Library/Homebrew/test/bundle/go_spec.rb Updates requires and stubbing to new extension executable API.
Library/Homebrew/test/bundle/installer_spec.rb Updates installer specs to unified Brew/Cask/Tap classes.
Library/Homebrew/test/bundle/mac_app_store_spec.rb Updates requires and stubbing to new MAS extension executable API.
Library/Homebrew/test/bundle/uv_spec.rb Updates requires and stubbing to new uv extension executable API.
Library/Homebrew/test/bundle/vscode_extension_spec.rb Updates requires and stubbing to new VSCode extension executable API.
Library/Homebrew/test/bundle/commands/check_spec.rbi Updates test checker base class to PackageType.
Library/Homebrew/test/bundle/commands/check_spec.rb Updates checker expectations to unified package type classes and services.
Library/Homebrew/test/bundle/commands/cleanup_spec.rb Updates cleanup specs to use extension cleanup_items directly and new flags.
Library/Homebrew/test/bundle/commands/dump_spec.rb Updates dump specs to new reset points and unified dump classes.
Library/Homebrew/test/bundle/commands/exec_spec.rb Updates exec specs to Brew::Services.
Library/Homebrew/test/bundle/commands/install_spec.rb Updates install specs to unified package type classes.
Library/Homebrew/test/bundle/commands/list_spec.rb Updates list specs to pass extension selection via extension_types:.
Files not reviewed (1)
  • Library/Homebrew/test/bundle/commands/check_spec.rbi: Language not supported

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

You can also share your feedback on Copilot code review. Take the survey.

@MikeMcQuaid MikeMcQuaid enabled auto-merge March 19, 2026 14:40
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Mar 19, 2026
Merged via the queue into main with commit 4b1bc6b Mar 19, 2026
42 checks passed
@MikeMcQuaid MikeMcQuaid deleted the cleanup_bundle branch March 19, 2026 15:44
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