Commit Graph
48211 Commits
Author SHA1 Message Date
Shaan Majid c8e0f5250d chore: use ./bin/brew instead of system brew 2026-02-26 01:12:54 -06:00
Mike McQuaid 36bd496f76 Merge pull request #21614 from shaanmajid/bundle-uv-tool
Add uv tool support to `brew bundle`
2026-02-25 08:31:35 +00:00
Shaan Majid 3636cb54c3 refactor(bundle): remove uv specifier support 2026-02-24 19:00:45 -06:00
Shaan Majid 3b1a4a6041 feat(bundle): add uv tool support 2026-02-24 19:00:44 -06:00
Mike McQuaid b09c0cc3be Merge pull request #21594 from costajohnt/linkage-cache-store-strict
linkage_cache_store: `typed: strict`
2026-02-24 18:59:20 +00:00
John Costa 8be373433b linkage_cache_store: replace T.untyped with T.anything 2026-02-24 07:09:39 -08:00
John CostaandClaude Opus 4.6 b7e85318d4 keg: fix Pathname type mismatch in LinkageCacheStore call
Pass `path.to_s` instead of `path` (a Pathname) to
`LinkageCacheStore.new`, matching the pattern used in
`linkage_checker.rb`. The sig on `initialize` correctly requires a
String since the value is used as a JSON-serializable database key.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 06:23:03 -08:00
John CostaandClaude Opus 4.6 9290e1be7e cache_store: make CacheStore abstract and remove pseudo-abstract methods
The `CacheStore` base class used `*args` with `raise NotImplementedError`
as a pseudo-abstract pattern. When subclasses add Sorbet `sig`
annotations, the Sorbet runtime's override shape validation rejects the
incompatible signatures (child methods have fixed params, parent has
`*args`).

Replace this pattern with Sorbet's proper `abstract!` declaration and
remove the pseudo-abstract methods entirely. `CacheStore` is never
instantiated directly - all callers use concrete subclasses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 06:23:03 -08:00
John CostaandClaude Opus 4.6 00d6ce63ca linkage_cache_store: typed: strict
Add Sorbet `sig` annotations to all methods and `T.let` for instance
variables to enable `typed: strict` in `linkage_cache_store.rb`.

Contributes to #17297

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 06:23:03 -08:00
Bevan Kay 49a172a9e4 Merge pull request #21619 from Homebrew/global-mas
bundle: allow preinstalled mas
2026-02-24 13:06:58 +00:00
Bevan Kay 9e3f6f11d3 bundle: allow preinstalled mas 2026-02-24 23:36:42 +11:00
Mike McQuaid 73daad7366 Merge pull request #21618 from koddsson/upgrade-reinstall-resilient-to-individual-failures
upgrade,reinstall: make resilient to individual failures
2026-02-24 11:14:52 +00:00
Kristján OddssonandClaude Opus 4.6 4d2c2c9845 upgrade,reinstall: make resilient to individual failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:23:45 +00:00
Mike McQuaid a43dea8f03 Merge pull request #21617 from koddsson/uninstall-resilient-to-individual-failures
uninstall: make resilient to individual failures
2026-02-24 08:46:59 +00:00
Mike McQuaid b348ef5f23 cmd/uninstall: tweak syntax. 2026-02-24 08:28:12 +00:00
Kristján OddssonandClaude Opus 4.6 e0f07cf69b uninstall: make resilient to individual failures
When running `brew uninstall A B C` where one item is unavailable,
the entire command halted before uninstalling anything. Now errors
for unavailable items are collected and reported at the end while
valid items are still uninstalled.

- Use `to_formulae_and_casks_and_unavailable` for name resolution so
  unavailable items are captured as values instead of raising
- Add `NoSuchKegError` to the rescue clause in
  `to_formulae_and_casks_and_unavailable`
- Collect per-cask exceptions in `Cask::Uninstall.uninstall_casks`
  following the pattern from `Cask::Upgrade.upgrade_casks!`
- Apply same per-cask error collection to the zap loop
- Report unavailable errors via `ofail` after all uninstall work
  completes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 07:33:37 +00:00
Mike McQuaid e8ecbc431c Merge pull request #21615 from koddsson/fix-cask-halting-issue
Catch cask errors to continue cleanup in install, upgrade, reinstall, and uninstall
2026-02-23 19:04:18 +00:00
Kristján OddssonandClaude Opus 4.6 4a18171733 uninstall,install: catch cask errors to continue cleanup
Extend the same pattern from the previous commit to `uninstall` and
the new-cask install path in `install`.

In `uninstall`, both `Cask::Uninstall.uninstall_casks` and
`Cask::Installer#zap` can raise, which would skip
`Cleanup.autoremove`.

In `install`, the `new_casks.each` loop calling
`Cask::Installer#install` can raise, which would skip formula
installations, `Cleanup.periodic_clean!`, and message display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:42:52 +00:00
Kristján OddssonandClaude Opus 4.6 7f333c6b51 upgrade,install,reinstall: catch cask errors to continue cleanup
When `Cask::Upgrade.upgrade_casks!` or `Cask::Reinstall.reinstall_casks`
raises, the exception now gets caught with `ofail` (which sets
`Homebrew.failed = true`) instead of propagating up and skipping
cleanup, pkgconf reinstall, and message display.

This matches how formula upgrades already handle `BuildError`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:22:50 +00:00
Mike McQuaid 5dfbb56056 Merge pull request #21613 from Homebrew/ubuntu24.04-remove-gcc12
Dockerfile: remove `g++-12` from Ubuntu 24.04
2026-02-23 17:17:41 +00:00
Mike McQuaid d372d2a21a Merge pull request #21611 from ranga-nir/fix/cleanup-lockfiles-fd-leak
cleanup: fix file descriptor leak in cleanup_lockfiles
2026-02-23 12:53:49 +00:00
ranga-nir 77cfbef4e3 cleanup: fix file descriptor leak in cleanup_lockfiles 2026-02-23 16:10:36 +05:30
Mike McQuaid 5520c8c213 Merge pull request #21596 from Homebrew/bump-fix-arch-specific-version-output
bump: fix arch-specific version output
2026-02-23 08:59:25 +00:00
Michael Cho 613fb3416f workflows/docker: add ubuntu24.04:main to help migration 2026-02-22 19:55:47 -05:00
Sam Ford c11ecb857f bump: rename old_versions to current_versions
We use "current" terminology in livecheck to refer to the current
version(s) that a formula/cask uses and I think this is easy to
understand. This renames the `old_versions` variable to
`current_versions`, which better reflects the intention and aligns
with other related variable names throughout `bump`.
2026-02-22 19:11:13 -05:00
Sam Ford 795fa22711 bump: refactor version comparison into method
This refactors the `newer_than_upstream` logic to make it a little
more flexible, using a programmatic approach to create the version
comparison pairs rather than hardcoded arch values. This also extracts
the logic for defining `multiple_versions` and `newer_than_upstream`
into a separate `compare_versions` method. Besides simplifying
`retrieve_versions_by_arch`, this allowed me to add a reasonable test
for this code.

It's worth noting that this compares the current version to the
highest new version when the current version does not differ by arch
but the new version does. There isn't one clear way to handle this
(e.g., you could treat the current version as newer than upstream if
it's higher than any new version) but this felt like the least
confusing behavior. I'm also working on modifying `bump` to handle
single-arch version bumps, so comparing to the highest new version
also makes more sense in that context (i.e., if the current version is
treated as newer when it's higher than any new version, a lower new
version for Intel could prevent `bump` from updating to a higher new
version for ARM).

For what it's worth, this removes the `|| newer_than_upstream[:arm]`
fallback for when `multiple_versions[:current]` isn't true in
`retrieve_and_display_info_and_open_pr`, as the `:general` value
should be present in that situation (based on how this is handled
here).
2026-02-22 19:11:11 -05:00
Sam Ford 70a8c4c34b bump: fix newer_than_upstream comparison
The `newer_than_upstream` booleans can be incorrect when there's one
current version but multiple new versions or vice versa. This occurs
because the related comparisons are strictly done between the same
`BumpVersionParser` values and it doesn't work as expected in this
scenario (i.e., the `:arm`/`:intel` values are `nil` when `:general`
is used for the version and vice versa).

This adds additional logic to define which comparisons are used
depending on whether the current and/or new versions have multiple
versions, notably comparing against the `:general` version when
there's a difference between current and new. One caveat is that
`bump` will fall back to the `newer_than_upstream[:arm]` value when
the current version uses one version and `:general` isn't present
(as is the case when `multiple_versions[:new]` is true) but this
aligns with other usage of ARM as the favored arch in `bump` and
`bump-cask-pr`. This isn't the most elegant solution overall but it
works as expected (I wasn't able to achieve the same result through
more modest modifications, not to say that it's not possible).
2026-02-22 19:06:58 -05:00
Sam Ford 22e01be3f5 bump: format comments consistently 2026-02-22 19:06:58 -05:00
Sam Ford 6667a6c641 bump: split multiple_versions on current/new
The `multiple_versions` boolean is true if the current or new versions
are split based on arch but this can cause unexpected behavior when
`multiple_versions` is used as a conditional. In some places we need
to check whether there are multiple current versions and in other
places we need to check if there are multiple new versions, so the
existing value isn't granular enough. This may not be a problem when
both current and new have the same version setup but it can cause
issues when there's a difference.

This changes `multiple_versions` to a hash with boolean values and
updates related conditions to use the contextually-appropriate value.
This resolves a couple of issues:

* The current version for multi-arch casks with one `version` were
being split into arm/intel values in the output when the new versions
differ based on arch and vice versa. These changes ensure that the
current and new versions are only split in the output when the version
differs.
* The `deprecated[:general]` value wasn't being set properly when the
current and new versions didn't have the same version setup, as the
fallback value specifically needs to be set when there aren't multiple
current versions.

Besides that, we also need to specifically check if there are multiple
current versions to be able to correctly identify current versions
that are newer than the upstream version when both current and new
don't have the same version setup but this will be addressed in
another commit.
2026-02-22 19:06:58 -05:00
Sam Ford ed689ba9d7 bump: clean up version_info usage
We already create variables for `version_info` values that are reused
throughout bump's `retrieve_and_display_info_and_open_pr` method, so
this adds additional variables for `multiple_versions` and
`newer_than_upstream` to tidy up related usage.
2026-02-22 19:06:58 -05:00
Sam Ford 0c34674121 bump: fix arch-specific deprecated annotation
`brew bump` adds a " (deprecated)" annotation after the current
version text if the formula/cask is deprecated and this works when
printing one version but it's confusing when arch-specific versions
are printed because it can incorrectly suggest that only the Intel
version is deprecated even if both ARM and Intel share the same
top-level deprecation. For example, a cask with an implicit
deprecation from a `disable!` call with a future date appears like
this:

```
Current cask version:     arm:   1.2.3
                          intel: 1.2.3 (deprecated)
```

This addresses the issue by modifying how the deprecated annotation
is added after version text, so that it will correctly appear after
the arch-specific version(s) it applies to. Additionally,
`formula_or_cask.deprecated?` depends on the execution environment, so
this captures the value in `retrieve_versions_by_arch` when the arch
is simulated. This setup ensures that `bump` is able to correctly
handle packages where one arch is deprecated but another isn't.
2026-02-22 19:06:58 -05:00
Sam Ford 701e160b5d bump: fix arch-specific version output
`brew bump` uses one `general` version in the `BumpVersionParser`
object when the ARM and Intel versions are identical. However, only
the `arm` and `intel` values are used when printing the current
versions for each arch, so bump won't successfully print the current
versions for casks that have one `version` but different assets for
each arch:

```
Current cask version:     arm:
                          intel:  (deprecated)
```

This addresses the issue by modifying the related output strings to
fall back to `current_version.general` if the `arm` and `intel` values
are blank.
2026-02-22 19:06:54 -05:00
Justin Krehel 125c041acb Merge pull request #21612 from Homebrew/bevanjkay-patch-1
docs/acceptable-casks: clarify notability
5.0.15
2026-02-22 20:05:35 +00:00
Michael Cho 0ec9be5a7a Dockerfile: remove g++-12 from Ubuntu 24.04 2026-02-22 14:23:52 -05:00
Anton Melnikov 72855d89e1 Merge pull request #21595 from Homebrew/fix-21582
bottle_specification: throw exception instead of panicking to be able to catch it
2026-02-22 13:50:09 +00:00
Bevan KayandCopilot 655fe687e9 Update docs/Acceptable-Casks.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-22 20:49:21 +08:00
Bevan Kay 85264832d3 docs/acceptable-casks: clarify notability
Clarify rejection criteria for self-submitted casks based on repository notability.
2026-02-22 20:46:00 +08:00
Mike McQuaid 5a94ef26b7 Merge pull request #21610 from Homebrew/cargo-features-fix
fix cargo `features` type signature
2026-02-22 11:53:20 +00:00
Daeho Ro c5189a0c24 fix cargo features type signature 2026-02-22 20:33:21 +09:00
Anton MelnikovandMike McQuaid 558c121d23 exceptions: fix wording
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2026-02-22 12:08:45 +01:00
botantony 4494e0d069 formula_versions: add LegacyDSLError as ignored exception
Signed-off-by: botantony <antonsm21@gmail.com>
2026-02-22 12:08:44 +01:00
botantony 6b0d577f2f bottle_specification: throw exception instead of panicking to be able to catch it
Signed-off-by: botantony <antonsm21@gmail.com>
2026-02-22 12:08:44 +01:00
Mike McQuaid 543948c483 Merge pull request #21609 from Homebrew/deflake_docs
workflows/docs: deflake broken links check
2026-02-22 11:01:26 +00:00
Mike McQuaid e9c26f83f9 workflows/docs: deflake broken links check
- Only run on Homebrew/brew pull requests (not push/merge groups)
- Try to run more than once on failures.
2026-02-22 10:47:00 +00:00
Mike McQuaid 85d148a27c Merge pull request #21608 from Homebrew/cleanup/remove-rspec-described-class-disables
Remove `RSpec/DescribedClass` cop disables in specs
2026-02-22 10:33:52 +00:00
Mike McQuaid 5a6be3eee7 free_port_spec: add another comment. 2026-02-22 10:05:02 +00:00
Mike McQuaidandCopilot 9ddeeed579 free_port_spec: re-add comments.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-22 10:03:43 +00:00
Douglas Eichelberger 4ff1b09878 Merge pull request #21603 from Homebrew/fix/inject-dump-stats-stack-overflow
Fix stack overflow in `inject_dump_stats!` with prepended modules
2026-02-22 10:02:21 +00:00
Mike McQuaid 86d697d919 Merge pull request #21592 from Homebrew/cask/use-latest_throttled-in-livecheck-audit
Use latest_throttled in cask livecheck audit
2026-02-22 09:58:32 +00:00
Mike McQuaid 50872059f0 Merge pull request #21605 from Homebrew/spdx-update
spdx: update license data.
2026-02-22 09:57:45 +00:00