- This reverts commit 10bdd6ba45.
- All formulae that needed `base64` now use native
`String#unpack1`/`Array#pack` after Homebrew/homebrew-core#296594
so the vendored gem is no longer needed.
- Bump `VENDOR_VERSION` as the vendored gem set changed again.
- Replace `addressable` and `public_suffix` with Ruby's `URI` while
retaining brewed-curl host detection.
- Inline JWS decoding and scoped warning filtering.
- Keep Base64 only as ruby-prof's on-demand transitive dependency.
- Remove unused Redcarpet and the largely unmaintained Pry backend.
- Defer heavy runtime gems until their functionality is needed.
- Resolve lazy type dependencies before Sorbet runtime checks.
Hyperfine (`--warmup 10 --runs 30`, repeated in both orders):
- `HOMEBREW_NO_AUTO_UPDATE=1 brew info --json=v2 jq`:
528.9 ms ± 21.1 ms on `origin/main` and 512.6 ms ± 16.2 ms
here, a 3% speedup.
- replace the per-edit `style --changed --fix` and `typecheck`
`PostToolUse` hooks and the `tests --changed` `Stop` hook with a
single `./bin/brew lgtm` on `Stop` in `.claude/settings.json`
- add a matching Codex `Stop` hook in `.codex/hooks.json`, unignoring
`.codex` like `.claude`, so both agents run the same check
- `brew lgtm` runs typecheck, style and the relevant tests together
`brew tests` overrode `HOME` but not `HOMEBREW_USER_CONFIG_HOME`, which
`bin/brew` had already derived from the real `HOME`. The spec teardown
`rm_rf`s `$HOMEBREW_USER_CONFIG_HOME/trust.json`, so every run deleted the
user's real `~/.homebrew/trust.json`.
Re-point `HOMEBREW_USER_CONFIG_HOME` at the sandboxed `HOME`, matching
`test_bot.rb`, and refuse to clean a `trust.json` that is not sandboxed
under `HOME` so a runner that forgets fails loudly instead of deleting
real user data.
- Ensure we do not accidentally include gems with licences we do not
agree with.
- Run the Homebrew `licensed` formula in the vendor-gems workflow so
CI fails when a Bundler gem has an unapproved licence or stale cache
record.
- Keep `licensed` outside `Library/Homebrew/Gemfile` so all-groups
Bundler installs do not need its native dependencies.
- Use an isolated Homebrew formula cache key and allow cleanup of any
existing formulae before installing `licensed` for CI.
- Vendor the current `.licenses` cache so future dependency updates
have an explicit review baseline.
- Mark generated licence, Sorbet RBI and Bundler files as generated.
Homebrew's Ruby and Bash startup cost is most noticeable on common API-backed
commands, so add a tightly gated Rust frontend experiment for search, info,
list, and the essential mutating commands. The goal is to make iteration on a
faster CLI possible without changing the default user experience or taking on
the risk of reimplementing all of FormulaInstaller in Rust on day one.
Keep the risk contained by only enabling the Rust path on supported Tier 1
default-prefix installs when both HOMEBREW_DEVELOPER and
HOMEBREW_EXPERIMENTAL_RUST_FRONTEND are set, and by continuing to delegate
complex install, upgrade, uninstall, and update behaviour back to the existing
Homebrew frontend for v1 correctness. That lets us measure the frontend win
first and only move more logic out of Ruby when profiling proves it is worth
the complexity.
Build brew-rs through vendor-install and run Rust subtree tasks through
portable Ruby's rake so local development, first-run bootstrapping, and CI all
use the same path instead of bespoke scripts. Add integration coverage, a
dedicated workflow, hyperfine benchmarks, Dependabot support, and Rust-specific
docs so the experiment is easy to validate, benchmark, and evolve.
Add the same profilers support as `brew prof` using `test-prof`.
While we're here, fix a `formula_installer` performance issue that
added ~0.5s to every call to `FormulaInstaller#finish` which is a lot
of integration tests (already our slowest types).
Import these from the homebrew/formula-analytics tap and deprecate
that tap.
This required a little messing around with filenames and paths to get
it finding Python and writing to the user's home directory.
- include `.ruby-version` and in the project root (and unignore in
`.gitignore`) to improve editor support which expects these files
- use the `.ruby-version` in `docs/Gemfile` to use a consistent Ruby
version here
- remove hardcoded Ruby versions from `workflows/docs` in favour of
using the `.ruby-version` file instead
- use more consistent configuration in `workflows/docs` to match
`workflows/tests`
- This is cleaner than vendoring a whole bunch of new gems and pinning `psych`.
- Thanks for the pointer, Bo!
- It doesn't work, though?
```
❯ brew tests --only=migrator --debug
Error: cannot load such file -- debug/debug.so
Warning: Removed Sorbet lines from backtrace!
Rerun with `--verbose` to see the original backtrace
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/frame_info.rb:16:in `require'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/frame_info.rb:16:in `rescue in <module:DEBUGGER__>'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/frame_info.rb:13:in `<module:DEBUGGER__>'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/frame_info.rb:3:in `<top (required)>'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/session.rb:31:in `require_relative'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug/session.rb:31:in `<top (required)>'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug.rb:3:in `require_relative'
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/gems/3.1.0/gems/debug-1.6.3/lib/debug.rb:3:in `<top (required)>'
/opt/homebrew/Library/Homebrew/dev-cmd/tests.rb:48:in `require'
/opt/homebrew/Library/Homebrew/dev-cmd/tests.rb:48:in `run'
/opt/homebrew/Library/Homebrew/brew.rb:89:in `<main>'
```