Commit Graph
51770 Commits
Author SHA1 Message Date
Mike McQuaid eebfc72807 Report unavailable cask platforms accurately
- `outdated_casks` treated a missing `version` as non-latest but then
  reported that the latest version was already installed.
- Handle the missing version explicitly and reuse the narrowed value so
  non-quiet output identifies the unavailable current platform.
- Strengthen the regression coverage for the warning path.
2026-08-11 21:31:48 +01:00
Mike McQuaidandGitHub b94d9e9f94 Merge pull request #23499 from Homebrew/fix-cask-latest-nil
Avoid nil cask versions during installation
2026-08-11 19:41:19 +00:00
Mike McQuaid 1a00b1063b Avoid nil cask versions during installation
- Platform-specific casks can have no `version` when evaluated on an
  unsupported operating system.
- Let upgrade detection skip `latest?` in that case so installation
  reaches normal platform validation instead of raising `NoMethodError`.
- Cover a macOS-only cask evaluated on Linux.

Fixes #23498
2026-08-11 19:36:42 +01:00
Michka PopoffandGitHub d67b92d2de Merge pull request #23345 from Homebrew/longrunner
Build and publish large runner docker image
2026-08-11 16:34:32 +00:00
Mike McQuaidandGitHub 4dacfe77a2 Merge pull request #23497 from Homebrew/cask-network-opt-out
Allow cask runs to access the network
6.0.17
2026-08-11 12:06:46 +00:00
Mike McQuaid 8b3a119e78 Allow cask runs to access the network
Structured cask install steps run in a sandbox that denies network
access. This breaks casks whose upstream setup commands must retrieve
installation-time dependencies, including `gcloud-cli` virtualenv
creation.

- Add a serialised `network_access:` option to `run` steps.
- Omit the option from API data when it retains the default denial.
- Enable network access only when an explicit run requests it.
- Preserve network denial for existing steps and generated completions.
- Document the opt-in and cover both sandbox policies in tests.

This avoids disabling network restrictions for all cask operations while
giving affected casks an explicit, auditable escape hatch.

See #23495.
2026-08-11 12:02:16 +01:00
Mike McQuaidandGitHub 5d49126d14 Merge pull request #23491 from Homebrew/fix-dependent-upgrades
Report skipped dependent upgrades
2026-08-11 07:41:30 +00:00
Mike McQuaid 169a254416 Report skipped dependent upgrades
`brew upgrade` discovers outdated reverse dependants before it upgrades
the formulae selected for primary upgrade. This candidate list is also
needed for the confirmation prompt.

After the primary upgrades finish, Homebrew prepares installers for the
candidate dependants. An installer is filtered when installed runtime
dependencies already satisfy target bottle metadata. A candidate may
also already have been upgraded as a dependency of another primary
formula.

The execution heading and final summary used the earlier candidate list.
They therefore claimed a filtered dependant was upgraded although its
installed version remained unchanged. Candidates removed because
`FormulaInstaller.installed` contained them were also treated as
unsuccessful even when dependency installation had upgraded them.

- Build dependant installers before printing the execution-time list.
- Preserve installed candidates unless the primary list represents them.
- Merge those candidates with dependants upgraded by their installers.
- State the exact bottle-metadata condition when filtering a candidate.
- Cover filtered, dependency-installed and primary candidates in tests.

Fixes #23483
2026-08-11 08:22:13 +01:00
Mike McQuaidandGitHub 007333f25e Merge pull request #23488 from Homebrew/sbom-bottle-purl-encoding
sbom: build pkg:brew purls via Vulns::Purl
2026-08-10 13:42:50 +00:00
Andrew Nesbitt aaa15ff58d sbom: build pkg:brew purls via Vulns::Purl
Replace string-interpolated pkg:brew purls with Homebrew::Vulns::Purl so
formula names are percent-encoded per purl-spec (python@3.12 becomes
python%403.12, matching what vulns/osv_export already emits). Also fixes
pkg:brew//name output when the tap is nil and drops the @ segment when
there is no version.
2026-08-10 11:33:55 +01:00
Mike McQuaidandGitHub 3ecc9eff23 Merge pull request #23481 from Homebrew/python_major_minor_version
Introduce python_major_minor_version DSL
6.0.16
2026-08-10 08:02:10 +00:00
Michka Popoff ec271a766a Introduce python_major_minor_version DSL
This is a shorthand version for Language::Python.major_minor_version
2026-08-10 09:41:21 +02:00
Bevan KayandGitHub 8a0b648f6f Merge pull request #23487 from Homebrew/livecheck-throttle-timestamp
livecheck: fix throttle detached head on CI
2026-08-10 07:25:20 +00:00
Mike McQuaidandGitHub e141f894e5 livecheck: prefer origin/HEAD. 2026-08-10 07:56:43 +01:00
Mike McQuaidandGitHub 739b58b7d5 Merge pull request #23484 from Homebrew/postflight-run-must-succeed
install_steps: allow `run` steps to ignore failure
2026-08-10 06:55:17 +00:00
Bevan Kay f2eba3464d livecheck: fix throttle detached head on CI 2026-08-10 15:57:16 +10:00
Bevan Kay 6af7582df0 install_steps: add must_succeed to run 2026-08-10 11:56:06 +10:00
Mike McQuaidandGitHub 4e6619a370 Merge pull request #23480 from Homebrew/std_swift_args
formula: add std_swift_args
2026-08-09 18:24:26 +00:00
Michael Cho bec6f1c87e formula: add std_swift_args 2026-08-09 12:16:42 -04:00
Mike McQuaidandGitHub a1d850826e Merge pull request #23478 from SSakutaro/fix-cask-artifact-false-values
Preserve false values in Cask artifact serialization
2026-08-09 15:09:53 +00:00
Sakutaro Shiina 82f10c0d75 Preserve false values in cask artifact serialization 2026-08-09 22:41:14 +09:00
Mike McQuaidandGitHub 6c94e1cb76 Merge pull request #23464 from IngmarStein/fix-service-running-ssh
service: fix caveat for SSH sessions
2026-08-09 10:51:47 +00:00
Mike McQuaidandGitHub c84082db3a Merge pull request #23476 from SSakutaro/fix-sandboxed-cask-sudo
Allow sudo in sandboxed Cask install steps
2026-08-09 10:49:59 +00:00
Michka PopoffandGitHub d78e977efa Merge pull request #23477 from Homebrew/feature/ghcr-license-limit-255
util: spdx license tag limit from 256 to 255
2026-08-09 10:22:59 +00:00
Daeho Ro 846833c5f7 util: spdx license tag limit from 256 to 255
-----

<!-- Only tick a checkbox once you've done it; honesty keeps reviews smooth. -->
<!-- Tick with [x] before creating, or click the boxes afterwards. -->
<!-- Don't delete these checkboxes or this pull request is closed automatically. -->

- [x] Have you followed our [Contributing](https://github.com/Homebrew/brew/blob/HEAD/CONTRIBUTING.md) guidelines?
- [x] Have you checked for other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?
- [x] Have you explained what your changes do? Performance claims (e.g. "this is faster") must include [Hyperfine](https://github.com/sharkdp/hyperfine) benchmarks.
- [x] Have you explained why you'd like these changes included, not just what they do?
- [ ] For bug fixes, have you given step-by-step `brew` commands to reproduce the bug?
- [ ] Have you written new tests (excluding integration tests)? [Here's an example](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/test/PATH_spec.rb).
- [x] Have you successfully run `brew lgtm` (style, typechecking and tests) locally?

-----

- [ ] AI was used to generate or assist with generating this PR.

<!-- If ticked, explain below how AI was used and how you verified the changes. Non-maintainers may only have one AI-assisted PR open at a time. See https://docs.brew.sh/Responsible-AI-Usage for guidance. -->

-----

License tag for OCI image limit 256 chars by documentation but it is actually failed with 256 chars. I have tested my own private repo for this and 255 is fine to use.

`mesa` is failed because of this,
- https://github.com/Homebrew/homebrew-core/pull/294670
2026-08-09 16:30:26 +09:00
Sakutaro Shiina d00ee3faaa Handle implicit sudo in sandboxed cask steps 2026-08-09 15:17:51 +09:00
Sakutaro Shiina 31e21f1753 Allow sudo in sandboxed cask install steps 2026-08-09 12:56:31 +09:00
Mike McQuaidandGitHub 6337b35945 Merge pull request #23475 from Homebrew/reject-post-install-coexistence
Enforce structured install step authoring
2026-08-09 01:56:59 +00:00
Ingmar Stein 77e026b88d utils/service: fix running? for SSH sessions
When connected via SSH, `launchctl list <label>` only searches the
system domain, so it won't find services loaded in the `gui/<uid>`
domain. This caused `Utils::Service.running?` to incorrectly return
false for running services, which in turn made `brew upgrade` print
"brew services start" instead of the correct "brew services restart".

Consolidate the "is this service running?" logic into a single source
of truth: `Homebrew::Services::System.launchctl_service_running?`.
This iterates `candidate_domain_targets` to try domain-qualified
`launchctl print <domain>/<label>` before falling back to a bare
`launchctl list <label>`. Both `Utils::Service.running?` and
`FormulaWrapper#loaded?` now use this method.

Refactor `FormulaWrapper#status_output_success_type` to also iterate
`candidate_domain_targets` instead of only trying the single
`domain_target`, which over SSH returns `user/<euid>` and misses
services loaded in the `gui/<uid>` domain.
2026-08-08 16:26:46 +02:00
Mike McQuaid 601472bfda Enforce structured install step authoring
- reject mixing formula install hooks in every tap
- autocorrect legacy step methods and keywords
- retain stable serialised API values for compatibility
- document canonical Formula and Cask step authoring
- remove the resolved Cask sandbox deprecation reminder
2026-08-08 15:06:51 +01:00
Mike McQuaidandGitHub 749b3557cc Merge pull request #23474 from AbishekRaj2007/public-send-remaining-call-sites
Use .public_send instead of .send for calls to public methods
2026-08-08 13:16:35 +00:00
AbishekRaj2007 3a65eb6acb Use .public_send instead of .send for calls to public methods 2026-08-08 17:01:08 +05:30
Mike McQuaidandGitHub b1f5207994 Merge pull request #23468 from Homebrew/bottled-post-install-inputs
Use bottled inputs and add RuboCop guard
2026-08-08 07:41:01 +00:00
Mike McQuaid f38b89391e Use bottled inputs and add RuboCop guard
- Discover CPython wheels already packaged in each keg.
- Expand PyPy bootstrap archives packaged in `libexec`.
- Resolve dependency paths without loading formula source.
- Validate helper executables before attempting to run them.
- Enforce source independence with RuboCop and API-loaded tests.
- Keep the internal JSON API unchanged and minimal.
2026-08-08 08:17:46 +01:00
Mike McQuaidandGitHub fe24bd2dc9 Merge pull request #23472 from Homebrew/fresh-official-tap
Fetch official tap HEAD for worktrees
2026-08-08 04:12:54 +00:00
Mike McQuaidandGitHub 0df0c9625a Merge pull request #23461 from Homebrew/sandbox-cask-install-step-commands
Sandbox structured cask operations
2026-08-08 04:10:10 +00:00
Michael ChoandGitHub 8ea475e23d Merge pull request #23473 from Homebrew/fix-macos-only
requirements/macos_requirement: fix handling for Linux
2026-08-07 20:33:09 +00:00
Michael Cho 94ab189257 requirements/macos_requirement: fix handling for Linux 2026-08-07 15:43:41 -04:00
Michael Cho 0691ed01cc dev-cmd/unbottled: fix macOS-only after changes for min/max handling 2026-08-07 13:35:31 -04:00
Mike McQuaidandGitHub d0319d2056 Merge pull request #23452 from dduugg/rubocop-1.89.0
Update rubocop to 1.89.0 and rubocop-sorbet to 0.14.0
2026-08-07 16:20:09 +00:00
Mike McQuaid f492b2dc72 Handle project index offences
- Ignore intentional bootstrap constant reassignments, RBI declarations
  and OS-specific method overrides.
- Allow valid names unavailable to the project-only index.
- Retain absolute core constants where inherited lookup can make the
  indexed autocorrection unsafe.
2026-08-07 17:00:27 +01:00
Mike McQuaid 21a016c3d8 Enable RuboCop project index 2026-08-07 17:00:27 +01:00
Douglas EichelbergerandMike McQuaid a923f27661 Update rubocop to 1.89.0
Also updates rubocop-sorbet (0.13.2 -> 0.14.0) and json (2.21.1 ->
2.21.2), which rubocop depends on.

Two suppressions can go away thanks to bug fixes in this release:

- rubocop/rubocop#15438 and rubocop/rubocop#15442 stop
  `Style/ArrayIntersect` firing when the `include?` receiver in a block
  is not an array literal, so the cop is re-enabled. It still cannot
  guarantee the *outer* receiver is an `Array`, and in
  `cask/artifact/abstract_uninstall.rb` that receiver is the `Enumerator`
  from `Pathname#each_filename`, which has no `intersect?`. Convert with
  `to_a` there rather than taking the autocorrect verbatim.
- rubocop/rubocop#15452 fixes the `Layout/HashAlignment` false positive on
  multi-line hash keys, so the two `delegate` disable comments in
  `formula.rb` are dead and removed.

One suppression is added: rubocop/rubocop#15493 makes
`Style/IfUnlessModifier` respect `Layout/LineLength`'s exemptions rather
than its `Max`. Several of our exemption patterns are unescaped regexes
(`"#{version."` matches `#{version}`, `#{version_text}` and
`#{version_info[...]}`), so the cop demanded modifier form for statements
that then ran to 179 characters. Disable the cop. Reported upstream as
rubocop/rubocop#15531.

rubocop-sorbet 0.14.0 widens `Sorbet/SetterReturnType` to cover setters
taking splat and keyword arguments, so several `depends_on` and ENV
setters switch to `.void`. Under `HOMEBREW_SORBET_RUNTIME` a `.void`
method returns the sentinel `T::Private::Types::Void::VOID`, which breaks
the two callers that consumed a setter's return value. Sorbet does not
catch either statically:

- `DependsOn#load` stored the result of `send(:"#{key}=", ...)` into the
  delegated hash, so the whole `depends_on` stanza became `VOID`. Read the
  value back through the matching reader instead.
- `Superenv#cc=` assigned `super` to `HOMEBREW_CC`, raising `TypeError:
  no implicit conversion of Module into String`. Assign from `val`.

Drop `extend/ENV/shared.rbi`, which existed to widen `[]=` to accept
`Pathname` and `PATH`. Without it `[]=` resolves to Sorbet's own
`ENVClass#[]=`, which takes `T.nilable(String)`, so the ENV assignments
convert explicitly with `to_s`/`&.to_s`. Both `Pathname` and `PATH`
define `to_str`, so Ruby was already converting implicitly and behaviour
is unchanged.

The remaining changes are new offenses in this release:

- `Lint/UselessAssignment` (rubocop/rubocop#12269) catches the
  `root_url = root_url =` workaround in `dev-cmd/tap-new.rb`. The Ruby
  `assigned but unused variable` warning it silenced no longer fires on
  our vendored Ruby, so drop it.
- `Style/RedundantParentheses` (rubocop/rubocop#15472) and
  `Layout/MultilineMethodCallIndentation` autocorrections.

The redundant `T.let` on `GitHub::API::ERRORS` is also dropped.

Claude-Session: https://claude.ai/code/session_01AdSQcU5MmY4VWiFdfrPeu2
2026-08-07 17:00:27 +01:00
Mike McQuaid 900fef4e8c Fetch official tap HEAD for worktrees
- Avoid creating official tap worktrees from a stale local branch.
- Preserve source state and offline fallback to the existing `HEAD`.
2026-08-07 16:49:55 +01:00
Mike McQuaidandGitHub fdfe33a798 Merge pull request #23470 from Homebrew/stabilise-caveats-service-spec
Stabilise service caveats spec
2026-08-07 15:41:28 +00:00
Mike McQuaid 1f1e064bcf Stabilise service caveats spec 2026-08-07 16:10:51 +01:00
Mike McQuaidandGitHub 136ad7e229 Merge pull request #23451 from tftio/cargo-source-option
bundle: install cargo packages from a git URL or path
2026-08-07 14:08:40 +00:00
James Felix Black ea1188495a bundle: drop the cargo local-origin dump warning
A crate cargo reports as installed from a local origin is still dumped
as a registry crate, but without warning about the origin that could
not be expressed, which is noise for anyone who is content with the
crate they have.
2026-08-07 08:29:15 -04:00
Ruoyu ZhongandGitHub 368c8135cc Merge pull request #23466 from Homebrew/dependabot/bundler/Library/Homebrew/bundler-6665f5f057
build(deps): bump the bundler group across 2 directories with 8 updates
2026-08-07 09:01:41 +00:00
Ruoyu ZhongandGitHub 0f44e95dfb Merge pull request #23467 from Homebrew/dependabot/github_actions/github-actions-432e0d4de6
build(deps): bump the github-actions group across 1 directory with 3 updates
2026-08-07 08:37:09 +00:00