Commit Graph
37884 Commits
Author SHA1 Message Date
Mike McQuaid 5afdff6b57 brew-rs: add an opt-in Rust frontend path
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.
2026-03-22 14:50:32 +00:00
Mike McQuaid 6c6f30cc08 Merge pull request #21796 from costajohnt/fix/formula-all-rescue-specification-error
fix: rescue FormulaSpecificationError in Formula.all
2026-03-22 13:59:48 +00:00
Mike McQuaid f49f4067e3 Merge pull request #21791 from Homebrew/lgtm_cache_sandbox
brew.sh: work around non-writable cache for lgtm commands.
2026-03-22 13:28:34 +00:00
Yang Song 4e9baa7511 Fix doubled words in comments and docs
- Fix "to to" → "to" in migrator.rb
- Fix "as as" → "as a" in utils/curl.rb
- Fix "are are" → "are" in unbottled.rb
- Fix "a the" → "the" in Cask-Cookbook.md
2026-03-22 07:29:51 -04:00
John Costa 800080fe49 style: remove trailing comma in test 2026-03-21 16:32:22 -07:00
John Costa 81fb763c82 fix: rescue FormulaSpecificationError in Formula.all
When a tap formula has no URL, `determine_active_spec` raises
`FormulaSpecificationError`. `Formula.all` already rescues
`FormulaUnavailableError` and `FormulaUnreadableError` to prevent
a single broken formula from crashing commands like `brew search
--eval-all --desc`, but `FormulaSpecificationError` was missing
from the rescue clause.

Closes #21794
2026-03-21 15:40:48 -07:00
Mike McQuaid 884fa74b29 brew.sh: work around non-writable cache for lgtm commands.
Under some e.g. AI sandboxes HOMEBREW_CACHE is not accessible but
the current working directory's `tmp` is instead. In those cases,
print a warning and automatically copy and use the other cache.
2026-03-21 09:31:02 +00:00
Michael Cho e5f736e095 Use ubuntu-latest and add constant for arm linux runner 2026-03-20 15:21:15 -04:00
dependabot[bot] d8d32b9c68 build(deps-dev): bump json from 2.19.1 to 2.19.2 in /Library/Homebrew
Bumps [json](https://github.com/ruby/json) from 2.19.1 to 2.19.2.
- [Release notes](https://github.com/ruby/json/releases)
- [Changelog](https://github.com/ruby/json/blob/master/CHANGES.md)
- [Commits](https://github.com/ruby/json/compare/v2.19.1...v2.19.2)

---
updated-dependencies:
- dependency-name: json
  dependency-version: 2.19.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-20 17:25:34 +00:00
Mike McQuaid 4f89431d4e Merge pull request #21779 from Homebrew/default-container
Use ghcr.io/homebrew/brew:main for tests and bottling
2026-03-20 17:06:37 +00:00
Mike McQuaid 84823c5c95 Merge pull request #21780 from Homebrew/tap-new-unversioned
dev-cmd/tap-new: use ubuntu-latest + ghcr.io/homebrew/brew:main
2026-03-20 09:27:21 +00:00
BrewTestBot afa2f6b882 Update RBI files for bundler.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2026-03-20 08:15:48 +00:00
BrewTestBot 84b8514ccd brew vendor-gems: commit updates. 2026-03-20 08:15:30 +00:00
dependabot[bot] db864e49b8 build(deps): bump the bundler group across 2 directories with 8 updates
Bumps the bundler group with 3 updates in the /Library/Homebrew directory: [rubocop-ast](https://github.com/rubocop/rubocop-ast), [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) and [ruby-lsp](https://github.com/Shopify/ruby-lsp).
Bumps the bundler group with 1 update in the /docs directory: [sass-embedded](https://github.com/sass-contrib/sass-embedded-host-ruby).


Updates `rubocop-ast` from 1.49.0 to 1.49.1
- [Release notes](https://github.com/rubocop/rubocop-ast/releases)
- [Changelog](https://github.com/rubocop/rubocop-ast/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-ast/compare/v1.49.0...v1.49.1)

Updates `sorbet-static-and-runtime` from 0.6.12997 to 0.6.13023
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `ruby-lsp` from 0.26.7 to 0.26.8
- [Release notes](https://github.com/Shopify/ruby-lsp/releases)
- [Commits](https://github.com/Shopify/ruby-lsp/compare/v0.26.7...v0.26.8)

Updates `sorbet-runtime` from 0.6.12997 to 0.6.13023
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `rbs` from 4.0.0.dev.5 to 4.0.1.dev.2
- [Release notes](https://github.com/ruby/rbs/releases)
- [Changelog](https://github.com/ruby/rbs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ruby/rbs/compare/v4.0.0.dev.5...v4.0.1.dev.2)

Updates `sorbet` from 0.6.12997 to 0.6.13023
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet-static` from 0.6.12997 to 0.6.13023
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sass-embedded` from 1.97.3 to 1.98.0
- [Commits](https://github.com/sass-contrib/sass-embedded-host-ruby/compare/v1.97.3...v1.98.0)

---
updated-dependencies:
- dependency-name: rubocop-ast
  dependency-version: 1.49.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: bundler
- dependency-name: sorbet-static-and-runtime
  dependency-version: 0.6.13023
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: bundler
- dependency-name: ruby-lsp
  dependency-version: 0.26.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: bundler
- dependency-name: sorbet-runtime
  dependency-version: 0.6.13023
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: bundler
- dependency-name: rbs
  dependency-version: 4.0.1.dev.2
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: bundler
- dependency-name: sorbet
  dependency-version: 0.6.13023
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: bundler
- dependency-name: sorbet-static
  dependency-version: 0.6.13023
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: bundler
- dependency-name: sass-embedded
  dependency-version: 1.98.0
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: bundler
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-20 08:11:59 +00:00
Michael Cho 868fdf235f dev-cmd/tap-new: use ubuntu-latest + ghcr.io/homebrew/brew:main 2026-03-19 19:28:28 -04:00
Michael Cho c8ac14c5d5 Use ghcr.io/homebrew/brew:main for tests and bottling 2026-03-19 15:31:29 -04:00
Mike McQuaid 681cb7aeca Merge pull request #21770 from Homebrew/tap_auditor-disabled_new_usr_local_relocation
tap_auditor: audit `disabled_new_usr_local_relocation_formulae.json`
2026-03-19 17:51:13 +00:00
botantony 98d5b63450 tap_auditor: audit disabled_new_usr_local_relocation_formulae.json
Signed-off-by: botantony <antonsm21@gmail.com>
2026-03-19 18:10:58 +01:00
Mike McQuaid e1875e56f0 Merge pull request #21762 from costajohnt/fix/head-install-deps
fix: fall back to stable deps when head_dependencies is absent
2026-03-19 16:55:52 +00:00
John Costa 6e52208896 fix: assert on returned FormulaStruct instead of input hash
generate_formula_struct_hash works on a dup'd copy of the input,
so the original hash is never modified. Check the returned struct's
head_dependencies and stable_dependencies accessors instead.
2026-03-19 09:34:06 -07:00
John Costa 8ac92603c0 fix: use hash format for ruby_source_checksum in test
generate_formula_struct_hash calls dig("ruby_source_checksum", "sha256")
which expects the value to be a hash, not a plain string.
2026-03-19 09:22:47 -07:00
Michael Cho a1737a9d62 test/linux_runner_spec_spec: use unversioned container
This test doesn't verify anything related to Homebrew's CI versions so
can use the unversioned container to minimize migration diff.
2026-03-19 12:15:54 -04:00
John Costa e8d55759cd fix: add all required FormulaStruct fields to test hash
FormulaStruct requires desc, homepage, license, ruby_source_checksum,
and stable_version (via versions.stable). Without these, from_hash
raises a Sorbet ArgumentError for missing required props.
2026-03-19 09:11:16 -07:00
John Costa 527374541a fix: add stable URL to test hash and inline comment
Include urls.stable.url in the test hash so generate_formula_struct_hash
can build a valid stable_url_args tuple for Sorbet. Accept Rylan12's
suggestion to add a comment explaining the head_dependencies fallback.
2026-03-19 08:57:47 -07:00
John Costa 85cfd2f190 fix: fall back to stable deps when head_dependencies is absent
When `dependencies_hash` generates the API JSON, it omits
`head_dependencies` when they equal stable deps (to save space).
`FormulaStructGenerator` treated this absence as "no dependencies,"
breaking HEAD installs that inherit stable dependencies.

Fall back to the stable dependency hash when `head_dependencies`
is nil.

Fixes #21760
2026-03-19 08:30:27 -07:00
Mike McQuaid 4b1bc6ba6a Merge pull request #21766 from Homebrew/cleanup_bundle
bundle: unify bundle package type classes
2026-03-19 15:22:36 +00:00
Mike McQuaid d29523f301 bundle: unify bundle package type classes
- 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
2026-03-19 14:06:57 +00:00
Mike McQuaid 3cf4028dd0 Merge pull request #21765 from Homebrew/audit-gcc-ignore-implicit
formula_auditor: ignore implicit dep for Linux gcc audit
2026-03-19 13:49:22 +00:00
Michael Cho f03c9d8768 formula_auditor: ignore implicit dep for Linux gcc audit 2026-03-19 09:17:19 -04:00
Bevan Kay ea5ee39021 lint: fix indentation issues 2026-03-19 23:57:20 +11:00
Bevan Kay 50e1df4249 rubocop: reenable Layout/IndentationWidth
We should be able to safely re-enable this cop, as the https://github.com/rubocop/rubocop/pull/14767 PR was included in rubocop `1.84.0` and we are beyond that.

CC @MikeMcQuaid - unless we're waiting for an update somewhere else?
2026-03-19 20:52:24 +08:00
Mike McQuaid 4c0e9ca122 bundle: consolidate specs to match unified package type classes
The recent refactoring (eac1886, 3b43ae9, cd65e94) unified each
bundle package type into a single class, but the specs were still
split across separate dumper, installer, and checker files. This
made it harder to see the full test surface for a given type and
kept the test layout out of sync with the implementation it covers.

Merge the per-concern specs into one file per package type
(e.g. cargo_spec.rb replaces cargo_dumper_spec.rb and
cargo_installer_spec.rb), update requires and class references to
target the unified classes, and organise the combined examples
under "dumping", "installing", and "checking" describe blocks.
2026-03-18 15:16:06 +00:00
Bo Anderson 92d439a61b utils/popen: log which SystemCallError is raised 2026-03-17 23:36:45 +00:00
Michael Cho 603412ff82 Merge pull request #21744 from Homebrew/audit-apache-url
rubocops/urls: audit more Apache URLs and autocorrect
2026-03-17 22:48:11 +00:00
Mike McQuaid 3f36386a3f brew.sh: calculate HOMEBREW_MACOS_VERSION_NUMERIC earlier.
This is needed by `brew shellenv`.
2026-03-17 16:04:42 +00:00
Mike McQuaid aba22634fc Merge pull request #21745 from Homebrew/brew_tap_cask_bundle_extension
bundle: refactor brew, cask, and tap classes
2026-03-17 14:24:51 +00:00
Mike McQuaid 28749a77fa Merge pull request #21746 from Homebrew/bump-output-skip-status
bump: print skip status, message(s), and errors
2026-03-17 09:01:37 +00:00
Ruoyu Zhong c143d4e1b9 Merge pull request #21749 from Homebrew/dependabot/bundler/Library/Homebrew/bundler-2ce63145a6
build(deps): bump the bundler group across 2 directories with 5 updates
2026-03-17 04:03:17 +00:00
BrewTestBot 15af18aa60 brew vendor-gems: commit updates. 2026-03-17 03:38:15 +00:00
Bo Anderson d607603698 rubocops/dependency_order: fix error on dstr 2026-03-17 03:17:03 +00:00
dependabot[bot] f2290fd548 build(deps): bump the bundler group across 2 directories with 5 updates
Bumps the bundler group with 1 update in the /Library/Homebrew directory: [sorbet-static-and-runtime](https://github.com/sorbet/sorbet).
Bumps the bundler group with 2 updates in the /docs directory: [sorbet-runtime](https://github.com/sorbet/sorbet) and [async](https://github.com/socketry/async).


Updates `sorbet-static-and-runtime` from 0.6.12993 to 0.6.12997
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet-runtime` from 0.6.12993 to 0.6.12997
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet` from 0.6.12993 to 0.6.12997
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet-static` from 0.6.12993 to 0.6.12997
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `sorbet-runtime` from 0.6.12993 to 0.6.13029
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

Updates `async` from 2.36.0 to 2.38.0
- [Release notes](https://github.com/socketry/async/releases)
- [Changelog](https://github.com/socketry/async/blob/main/releases.md)
- [Commits](https://github.com/socketry/async/compare/v2.36.0...v2.38.0)

---
updated-dependencies:
- dependency-name: sorbet-static-and-runtime
  dependency-version: 0.6.12997
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: bundler
- dependency-name: sorbet-runtime
  dependency-version: 0.6.12997
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: bundler
- dependency-name: sorbet
  dependency-version: 0.6.12997
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: bundler
- dependency-name: sorbet-static
  dependency-version: 0.6.12997
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: bundler
- dependency-name: sorbet-runtime
  dependency-version: 0.6.13029
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: bundler
- dependency-name: async
  dependency-version: 2.38.0
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: bundler
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-17 02:48:19 +00:00
Sam Ford 76c471fc56 bump: print skip status, message(s), and errors
`brew livecheck` surfaces the skip reason or message in its output
(e.g., "deprecated", "skipped - Legacy version") but `brew bump`
effectively ignores the `:status` and `:messages` values from
`Livecheck::SkipConditions` and only prints "skipped" instead.
Sometimes the reason can be inferred from parenthetical annotations
(e.g., "(deprecated)" after the current version) but explicit output
like "skipped - deprecated" is easier to read when skimming. Omitting
a skip message from a `livecheck` block is only done to produce a
predictable "skipped" string that can be used for comparison but we
can handle that in a more robust way.

A related issue we're now facing is that deprecated packages are
producing an "unable to get versions" message rather than "skipped".
This adds noise and makes it more challenging to identify real
livecheck failures in bump output.

This addresses these issues by modifying bump to print the skip
`:status` and `:messages` values in the output. The way I've handled
this, bump will also print error messages. In the process, this adds
a `message?` method to check whether a value is a message string,
replacing existing conditions that insufficiently check whether a
value is a message using strict comparisons like `x != "skipped"` or
`x != "unable to get versions"` and ignoring the possibility of error
strings.

This is still an imperfect way of identifying message strings but it
should be an improvement over the status quo. In the future, it may be
better to store message strings as something other than a
`Cask::DSL::Version` object, so we can distinguish messages from
versions without targeting a specific string pattern.
2026-03-16 16:23:34 -04:00
Michael Cho 64e8556015 test/rubocops/urls_spec: add test for Apache url correction 2026-03-16 15:50:01 -04:00
Mike McQuaid cd65e94cef bundle: refactor brew, cask, and tap classes
- Move `brew`, `cask`, and `tap` into single implementation files while keeping the existing checker, dumper, and installer entrypoints as compatibility requires for the current tests and callers.
- Keep the shared bundle checker, dumper, and installer flows generic over registered package types and extensions, and preserve the existing App check output when `--no-upgrade` is used.
2026-03-16 18:43:32 +00:00
Michael Cho 81a86384cf rubocops/urls: audit more Apache URLs and autocorrect 2026-03-16 13:16:15 -04:00
Mike McQuaid 231640056e Merge pull request #21725 from costajohnt/fix/autoremove-reverse-dep-check
autoremove: cross-check candidates against formula definitions
2026-03-16 16:55:34 +00:00
Mike McQuaid 20cae2adb9 Merge pull request #21741 from Homebrew/bundle_more_extensions
bundle: refactor remaining bundle extensions
2026-03-16 16:19:08 +00:00
Mike McQuaid 3b43ae9cf7 bundle: refactor remaining bundle extensions
- Move the remaining non-`brew`/`cask`/`tap` bundle types onto the single-file extension path so `mas`, `vscode`, `cargo`, and `flatpak` keep their DSL, dump, check, install, and cleanup behavior in one place while shared bundle callers infer flags and selection from the registered extensions.
- Keep the existing checker, dumper, and installer entrypoint files as compatibility requires and preserve the current check, dump, and cleanup ordering so the existing bundle specs continue to exercise the same public constants and command behavior.
2026-03-16 16:03:55 +00:00
John Costa e3da486f86 Address review feedback: use blank?, remove type guard, fix test
- Use .blank? instead of .nil? for tab_deps early return
- Remove unnecessary is_a?(Hash) guard (consistent with runtime_dependencies)
- Use .blank? instead of bare truthiness for full_name check
- Revert test to assert positive behavior with proper tab data
- Update comment to reflect nil-or-empty semantics
2026-03-16 08:07:11 -07:00
Bo Anderson 0eadc7c909 Fix remote tab sometimes being used for local bottle installs 2026-03-16 14:54:49 +00:00