Skip to content

Support (very, very) basic brew-rs installs#21840

Merged
MikeMcQuaid merged 1 commit intomainfrom
brew-rs-basic-install
Mar 27, 2026
Merged

Support (very, very) basic brew-rs installs#21840
MikeMcQuaid merged 1 commit intomainfrom
brew-rs-basic-install

Conversation

@MikeMcQuaid
Copy link
Copy Markdown
Member

  • keep simple bottle-only brew install on the Rust path so the experimental frontend can prove out end-to-end pours before mirroring the full Ruby installer
  • reuse the Rust bottle resolution and fetch flow, then call back into brew link after the pour while leaving TODO markers for relocation, dependencies, post_install, tabs, SBOMs and the remaining installer stages
  • normalize API cellar values like :any_skip_relocation because the live bottle metadata uses that spelling and otherwise delegated real bottles back to Ruby

  • 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 (excluding integration 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.

OpenAI Codex used locally and tested/reviewed locally.


@MikeMcQuaid MikeMcQuaid marked this pull request as ready for review March 26, 2026 19:53
Copilot AI review requested due to automatic review settings March 26, 2026 19:53
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

Adds an initial “bottle-only” install implementation to the Rust brew-rs frontend so it can complete an end-to-end fetch → pour → link flow for very simple formulae, while delegating anything more complex back to Ruby.

Changes:

  • Implement basic brew-rs install <formula>: resolve bottle, fetch it, pour it into the Cellar, remove receipt/SBOM files, then call back into Ruby brew link.
  • Extend Rust formula/bottle metadata parsing to include additional install-related fields (deps, post_install_defined, service/keg-only/caveats) and propagate bottle cellar.
  • Add CLI tests covering a successful basic bottle install + link, and delegation when post_install is defined.

Reviewed changes

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

File Description
Library/Homebrew/rust/brew-rs/tests/cli.rs Adds coverage for the new Rust install flow and delegation behavior.
Library/Homebrew/rust/brew-rs/src/commands/install.rs Introduces a minimal Rust install pipeline (resolve/fetch/pour/link) with delegation gating.
Library/Homebrew/rust/brew-rs/src/commands/fetch.rs Exposes/extends bottle+formula metadata so install can reuse Rust resolution results and check install constraints.

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

@MikeMcQuaid MikeMcQuaid force-pushed the brew-rs-basic-install branch from 32a050c to 3c382dd Compare March 26, 2026 21:27
- keep simple bottle-only `brew install` on the Rust path so the
  experimental frontend can prove out end-to-end pours before
  mirroring the full Ruby installer
- reuse the Rust bottle resolution and fetch flow, then call back
  into `brew link` after the pour while leaving `TODO` markers for
  relocation, dependencies, `post_install`, tabs, SBOMs and the
  remaining installer stages
- normalize API cellar values like `:any_skip_relocation` because
  the live bottle metadata uses that spelling and otherwise
  delegated real bottles back to Ruby
@p-linnane p-linnane force-pushed the brew-rs-basic-install branch from 3c382dd to 5c1d023 Compare March 26, 2026 23:32
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Mar 27, 2026
Merged via the queue into main with commit fd155d8 Mar 27, 2026
40 checks passed
@MikeMcQuaid MikeMcQuaid deleted the brew-rs-basic-install branch March 27, 2026 08:29
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