Commit Graph
100 Commits
Author SHA1 Message Date
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
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
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
Mike McQuaid f8fcbd88e0 Sandbox structured cask operations
- Run each complete cask step block in one isolated subprocess and all
  generated completions in another phase-scoped sandbox.
- Share sandbox selection, fork fallback, install-hook rules and child
  error reporting with formula build, post-install and test processes.
- Restrict home, network and filesystem access while preserving `brew`
  and supporting explicit command write paths.
- Keep JSON payloads compact and independent of cask Ruby files.
- Remove the completed official-tap migration plan.
2026-08-07 08:37:09 +01:00
Mike McQuaidandGitHub 73720671af Merge pull request #23455 from HaraldNordgren/concise-auto-update-package-list
Add quiet mode for automatic updates
2026-08-06 12:29:20 +00:00
Mike McQuaidandGitHub 617a2175be Merge pull request #23456 from AlternateRT/audit-reject-verified-on-new-casks
cask/audit: reject verified parameter on new casks
2026-08-06 10:35:48 +00:00
Mike McQuaidandGitHub 17b5cd7632 Merge pull request #23373 from Homebrew/install-step-remove-var-default
Remove the formula install-step var default (29/29)
2026-08-06 09:04:28 +00:00
Mike McQuaid 5e4dba4d6b Remove the formula install-step var default
Formula install-step paths now serialise only a base that was explicitly
specified. RuboCop prevents relative official-tap paths from relying on the
current working directory.

Run structured-only API post-installs from the current JSON data so old
formula snapshots embedded in bottles cannot restore the removed default.
Keep using bottle snapshots for formulae that still have Ruby hooks.
2026-08-06 08:30:57 +01:00
Mike McQuaidandGitHub ad31b20e98 Merge pull request #23258 from kmarekspartz/autogenerated-files-trigger
workflows: check autogenerated files when commands change
2026-08-06 07:30:49 +00:00
Mike McQuaidandGitHub 44f506abd4 Merge pull request #23448 from Homebrew/sync-shared-config
Synchronize shared configuration
2026-08-06 02:00:31 +00:00
Mike McQuaidandGitHub a084a7df0e Merge pull request #23453 from AlternateRT/rubocop-adjust-os-depends-on
rubocops: adjust `depends_on` checks for Linux
2026-08-05 20:21:33 +00:00
Mike McQuaidandGitHub 0c43785fe6 Merge pull request #23450 from Homebrew/sorbet-files-update
sorbet: Update RBI files.
2026-08-05 16:50:35 +00:00
Mike McQuaidandGitHub 271b3f5d38 Merge pull request #23404 from Homebrew/install-step-explicit-var-enforcement
Enforce explicit formula install-step bases (28/29)
2026-08-05 16:42:09 +00:00
Mike McQuaidandGitHub c8c7573865 Merge pull request #23449 from AbishekRaj2007/use-public-send-over-send
Use `public_send` instead of `send` for public methods
2026-08-05 16:28:15 +00:00
Mike McQuaidandGitHub 64cf02d234 Merge pull request #23433 from Homebrew/cask-explicit-os-support
Treat cask OS support as explicit data
2026-08-05 16:24:09 +00:00
Mike McQuaid 8c5f51cfc8 Enforce explicit formula install-step bases
- Reject relative formula step paths without an explicit base.
- Autocorrect paths that previously relied on the temporary `var`
  compatibility default.
- Keep absolute paths and install-time path tokens unchanged.
2026-08-05 16:24:27 +01:00
Mike McQuaid 233377e66a Treat cask OS support as explicit data
- Align casks with formulae: platform support comes from
  `depends_on :macos`/`:linux`/`macos:` data rather than generation
  heuristics guessing intent from `os` stanzas, Linux checksums or
  `on_linux` blocks.
- `Cask#to_hash_with_variations` now emits variations for every
  valid OS/arch tag whenever `on_system` blocks exist, matching
  `Formula#to_hash_with_variations`; the Linux-specific gate and its
  `sha256_set_for_linux?` and `on_linux_blocks_exist?` tracking are
  removed. macOS-only casks publish truthful Linux variations, e.g.
  a `null` `sha256`, instead of omitting them.
- `Cask::Installer` gains a first-class unsupported-system error:
  API-loaded casks with no activatable artifact for the running
  system fail with "This cask is not available on macOS/Linux."
  instead of installing nothing. Audited casks always declare an
  activatable artifact for the systems they support, so missing
  artifacts in API data mean the system is unsupported. Source
  loads keep working for unaudited casks, e.g. naked containers.
- A sweep of the full homebrew/cask generation pipeline (all casks,
  both Linux tags, including internal per-tag payloads) confirmed
  no cask needs new `depends_on` annotations and nothing regresses.
2026-08-05 16:23:33 +01:00
Mike McQuaidandGitHub 4798afc8f1 Merge pull request #23447 from AlternateRT/fix-appimage-cask-dsl
Fix AppImage's stanza name in cask DSL
2026-08-05 15:16:59 +00:00
Mike McQuaidandGitHub 67658c8cf6 Merge pull request #23366 from Homebrew/install-step-26-official-hook-enforcement
Reject official legacy install hooks (26/26)
2026-08-05 11:33:49 +00:00
Mike McQuaidandGitHub 9e0022780b Merge pull request #23444 from Homebrew/revert-23414-dmg-diskutil-image
Revert "unpack_strategy/dmg: use `diskutil image` on macOS 14+"
2026-08-05 08:35:44 +00:00
Mike McQuaidandGitHub 8ea50ea2f4 Revert "unpack_strategy/dmg: use diskutil image on macOS 14+" 2026-08-05 09:19:00 +01:00
Mike McQuaidandGitHub 6927f001e0 Merge pull request #23438 from gromgit/shared_audits/print_repo_age
shared_audits: print repo age if too new
2026-08-05 07:09:33 +00:00
Mike McQuaidandGitHub 7d75aaa9d2 Merge pull request #23431 from Homebrew/cask-os-stanza-fix
Fix cask Linux installs without `os` stanza
2026-08-04 19:01:20 +00:00
Mike McQuaid e678490656 Fix cask Linux installs without os stanza
- `Cask#to_hash_with_variations` skipped all Linux variations for
  casks declaring Linux support only inside `on_linux`/`on_system`
  blocks, e.g. `zen`, as the API JSON is generated on macOS where
  those blocks are invisible; the published JSON then fell back to
  macOS artifacts on Linux and installs failed with a misleading
  "This cask requires macOS." error. Track `on_linux`/`on_system`
  blocks and emit Linux variations for casks that have them.
- `sha256` raised for an architecture missing a checksum for the
  running OS, e.g. `unity-hub` on `arm64_linux`, so its variation
  was silently dropped and ARM64 Linux fell back to macOS data too.
  Raise only on the real system: under `SimulateSystem` simulation
  `sha256` is now nil so variations for missing architectures carry
  their `on_linux` `depends_on arch:` and artifacts and Linux users
  get the correct unsupported-architecture error instead.
- `depends_on macos:` inside an `on_arm`/`on_intel` block did not
  mark a cask macOS-only, but arch blocks are evaluated on every OS
  so the dependency applies there too. Casks like `qlc+` that only
  declare macOS inside arch blocks claimed to support Linux while
  carrying a macOS requirement. Only OS blocks now scope a
  dependency to one OS; the checks for combining macOS `depends_on`
  forms still treat every `on_system` block alike.
- `Readall.valid_casks?` skipped casks whose files textually matched
  `depends_on macos:` anywhere, including inside `on_macos` blocks,
  so cross-OS casks like `unity-hub` were never validated for Linux.
  Rely on `supports_linux?` instead and let `depends_on arch:` excuse
  architectures a cask deliberately omits Linux checksums for.
- Add `appimagedir` to the test cask config so `app_image` artifacts
  can be serialised in tests.

Fixes https://github.com/Homebrew/brew/issues/23427.
2026-08-04 19:28:30 +01:00
Mike McQuaidandGitHub 422189990e Merge pull request #23424 from Homebrew/fix-rspec-mocks-lifecycle
Reset default download queue between specs
2026-08-04 18:06:57 +00:00
Mike McQuaid 9f3bf077be Reject official legacy install hooks
- block legacy hooks in Homebrew-owned taps
- retain safe autocorrection and third-party compatibility
- reject `brew ruby` steps that enable developer mode
- prepare runtime call sites for next-release deprecation
- verify internal API and runtime DSL coverage
2026-08-04 18:36:46 +01:00
Mike McQuaidandGitHub d61746c912 Merge pull request #23436 from AlternateRT/config-show-cask-info-on-linux
system_config: show core cask tap output on Linux
2026-08-04 16:27:17 +00:00
Mike McQuaidandGitHub a1c4ddbb6f Merge pull request #23435 from Homebrew/speedup-style-readall
Speed up `brew style` and `brew readall`
2026-08-04 15:52:35 +00:00
Mike McQuaidandGitHub b36a62447a Merge pull request #23410 from Homebrew/base64-unpack-migration
Remove `base64` gem and add `Homebrew/NoBase64` cop
2026-08-04 15:42:51 +00:00
Mike McQuaidandGitHub d6de8555ad Merge pull request #23429 from Homebrew/ruby-macho-x86-signing
Use codesign to sign patched binaries on Intel
2026-08-04 15:42:40 +00:00
Mike McQuaidandGitHub 64356cb673 Merge pull request #23405 from Homebrew/enforce-cask-stanza-ordering
Complete Cask stanza ordering coverage
2026-08-04 15:16:48 +00:00
Mike McQuaidandGitHub c04a10fa8a Merge pull request #23428 from Homebrew/symlink-target-check
Skip cask link when symlink already correct
2026-08-04 15:16:44 +00:00
Mike McQuaid d413e1630e Speed up brew style and brew readall
- `brew readall`: validate tap formulae and casks across forked
  workers (combination loop inside each worker so the `on_system`
  cache keeps its per-file locality) and syntax-check Ruby files
  in-process with `RubyVM::InstructionSequence.compile_file` and a
  `Warning` buffer instead of spawning `ruby -c -w` per file.
- `brew style`: run shellcheck+shfmt and actionlint on background
  threads with buffered output while RuboCop runs on the main
  thread, chunk shellcheck across CPU cores and pass `--parallel`
  to RuboCop with `--fix` (supported since RuboCop 1.41).
- Resolve linter executables before spawning threads so they
  cannot race to install formulae.
- `Readall.valid_aliases?`: use a single glob and `Set` lookup
  rather than one glob per alias.
- Fix an `end` indentation warning in `cask/cask.rb` that made
  `brew readall --syntax` fail.
- Hyperfine benchmarks (18-core Mac, mean of 2 runs, warm RuboCop
  cache for style runs, all exit codes 0):
  - `brew readall homebrew/core`: 34.36s -> 4.71s (7.3x faster)
  - `brew readall homebrew/cask`: 40.69s -> 5.17s (7.9x faster)
  - `brew style homebrew/core` (warm): 2.93s -> 2.20s
  - `brew style homebrew/cask` (warm): 2.37s -> 2.18s
  - `brew style` on Homebrew/brew itself: 13.2s -> 7.8s
  - `brew readall --syntax`: 18.2s -> 0.5s
- Tap style runs are RuboCop-bound so barely change; the larger
  style win is on Homebrew/brew where all four linters run. CI
  runners with fewer cores should expect roughly 3-4x on readall.
2026-08-04 15:13:59 +01:00
Mike McQuaidandGitHub a760fa0b1d Merge pull request #23425 from Homebrew/landlock-default
Remove Bubblewrap, use Landlock for Linux sandbox
2026-08-04 13:49:30 +00:00
Mike McQuaidandGitHub 76fc2ffe4f Merge pull request #23430 from hyuraku/tab-kwargs
Convert Tab attributes to keyword arguments
2026-08-04 13:45:51 +00:00
Mike McQuaid 0a88a9467d Use codesign to sign patched binaries on Intel
- Since the switch to `MachO.codesign!` in ruby-macho 6.0, Intel macOS
  rejects the ad-hoc signatures on larger relocated binaries (e.g.
  `libruby`, the Python framework) and kills hardened-runtime programs
  such as MacVim's `vim` at launch with `CODESIGNING, Invalid Page`:
  https://github.com/Homebrew/brew/issues/23418
- The signatures have correct page hashes and pass `codesign --verify`
  on newer macOS, so this looks like an Intel macOS verifier quirk
  rather than simple corruption.
- Restore the pre-6.0 behaviour on Intel: leave unsigned binaries
  unsigned and use `codesign` to re-sign only the binaries whose
  existing signature our modifications have just broken, e.g. MacVim's
  Xcode-ad-hoc-signed hardened-runtime `vim`.
- Restore the fatal preinstall developer tools check, now skipped on
  Apple Silicon rather than gated to it, as `codesign` requires the
  Command Line Tools while ruby-macho does not.
- Keep `MachO.codesign!` on Apple Silicon, where it is required,
  proven and avoids a `codesign` subprocess per relocated file.
2026-08-04 13:12:07 +01:00
Mike McQuaid 0376eda65e Skip cask link when symlink already correct
- A plain `brew upgrade` raised "It seems there is already a
  Binary at ..." even when the existing symlink resolved to the
  exact source about to be linked, because the realpath check sat
  behind `force`/`adopt`. The revert left the symlink in place so
  every retry failed identically until manual intervention.
- Treat an already-correct symlink as a no-op: log and skip the
  link. Genuine conflicts, such as a real file at the target or a
  symlink elsewhere, still require `--force` or `--adopt`.
- Rescue errors resolving the target, like `conflicting_formula`
  does, so unreadable symlinks fall back to the existing conflict
  and error handling instead of raising `Errno` exceptions.
- Fixes Homebrew/brew#23426.
2026-08-04 13:04:55 +01:00
Mike McQuaid 6decfd55f2 Enforce complete Cask stanza ordering
Once homebrew/cask is migrated, the style cops can enforce the intended
order for platform blocks and generated artifact DSLs.

- register platform blocks, system variables and generated artifacts
- keep system variables after versions so interpolation remains valid
- remove the temporary completion-grouping migration allowance
- update affected fixtures, documentation and regression coverage
2026-08-04 12:11:22 +01:00
Mike McQuaid 2f8502f720 Reset default download queue between specs
- `Homebrew.default_download_queue` memoizes its queue on the `Homebrew`
  module, so an example stubbing `Homebrew::DownloadQueue.new` at first
  use leaked an RSpec double into later examples and the `at_exit`
  shutdown hook, randomly crashing test runs with
  `RSpec::Mocks::OutsideOfExampleError` after every example passed.
- Shut down and drop the memoized queue after every example instead.
  A leaked double is only dropped as it cannot receive `shutdown`
  outside the per-example rspec-mocks lifecycle.
- Add ordered regression specs covering the leak and the reset.
2026-08-04 12:10:49 +01:00
Mike McQuaid 377e4f740b Remove Bubblewrap, use Landlock for Linux sandbox
- Landlock needs no separate executable, installation or `sysctl`
  configuration, so use it as the only Linux sandbox implementation
  rather than an opt-in behind `$HOMEBREW_SANDBOX_LINUX_LANDLOCK`.
- Delete `Sandbox::Bubblewrap`, the `brew setup-sandbox` command and
  the implicit `bubblewrap` dependency, none of which Landlock needs.
- Remove the Bubblewrap-era `Sandbox` API (`ensure_sandbox_installed!`,
  `configure!`, `configuration_commands`, `sandbox_install_command`)
  and its call sites now that no backend needs installing or
  configuring.
- Simplify `brew doctor`'s `check_linux_sandbox` to report the
  Landlock failure reason with the `$HOMEBREW_NO_SANDBOX_LINUX`
  workaround.
2026-08-04 11:55:32 +01:00
Mike McQuaidandGitHub f4a703c726 Merge pull request #23409 from Homebrew/bump-release-cooldown-output
bump: show upstream versions in release cooldown
2026-08-04 09:56:52 +00:00
Mike McQuaidandGitHub 5321c76cf8 Merge pull request #23423 from Homebrew/restore-services-plist
Restore use of package-provided service files
2026-08-04 09:48:23 +00:00
Mike McQuaid 3747dfb732 Restore use of package-provided service files
- Since #23312, `brew services start` always regenerated the service
  definition from the formula `service` block. Formulae that bundle
  their own service file only declare `name` there, so the generated
  plist had empty `ProgramArguments` and `launchctl bootstrap` failed
  with `Input/output error`.
- Read the installed service file instead unless the `service` block
  defines a command, the same gate `FormulaInstaller#install_service`
  uses when writing generated service files into the keg.
- Fixes https://github.com/Homebrew/brew/issues/23408.
2026-08-04 09:37:55 +01:00
Mike McQuaid 3dc3470895 Add Homebrew/NoBase64 cop
- The `base64` gem is no longer vendored so formulae and casks must
  not use it; flag `require "base64"` and any `Base64` usage in
  `Formula`/`Casks` files.
- Autocorrect `decode64`/`strict_decode64` to `String#unpack1` and
  `encode64`/`strict_encode64` to `Array#pack`, matching the migration
  in Homebrew/homebrew-core#296594.
2026-08-04 09:37:28 +01:00
Mike McQuaid 5280c6df5c Revert "Restore base64 gem"
- 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.
2026-08-04 09:37:22 +01:00
Mike McQuaid c596d3d17a bump: show upstream versions in release cooldown
- `brew bump` reported formulae as up to date when a newer upstream
  release was suppressed by the release cooldown, confusing upstream
  authors waiting for autobump.
- Show the suppressed version with how recently it was released, add
  a `Bump-ready version:` line for what can be bumped now and change
  the headline from `is up to date!` to `has a new version in
  release cooldown`.
- Fixes #23396.
2026-08-04 09:36:59 +01:00
Mike McQuaidandGitHub ca8ff5df8f Merge pull request #23421 from Homebrew/env-spec-singleton-methods
test/ENV_spec: compare only singleton methods
2026-08-04 08:32:01 +00:00
Mike McQuaidandGitHub 09a44e5175 Merge pull request #23416 from Homebrew/inject-upgrade-download-queue
Pass the download queue to FormulaInstaller when upgrading
2026-08-04 08:31:37 +00:00
Mike McQuaidandGitHub 20cd7ecdf9 Merge pull request #23412 from Homebrew/bundle-cleanup-opt-in-trust-reset
bundle cleanup: document trust store reset
2026-08-04 08:31:32 +00:00
Mike McQuaidandGitHub b9c6b73ad6 Merge pull request #23411 from Homebrew/retry-conditional-api-downloads
Retry API downloads without --time-cond on curl receive errors
2026-08-04 08:30:59 +00:00
Mike McQuaidandGitHub ef13b2f19f Merge pull request #23365 from Homebrew/install-step-25-compact-json
Compact install step JSON (25/26)
2026-08-04 08:24:19 +00:00
Mike McQuaidandGitHub b91b315ed9 Merge pull request #23417 from Homebrew/cask-artifact-stanza-key-order
api/cask: ignore `target` when selecting artifact stanza
2026-08-04 08:21:16 +00:00
Mike McQuaidandGitHub 3f471e5797 Merge pull request #23402 from Homebrew/replace-commit-status
Use workflow result for commit style
2026-08-03 19:03:46 +00:00
Mike McQuaid 87820ef2a2 Use workflow result for commit style
- Drop the status write that fork pull requests cannot receive.
- Pin the `2026.08.03.2` action release that fails validation jobs.
- Report the required check for synthetic merge queue commits.
2026-08-03 19:44:14 +01:00
Mike McQuaidandGitHub 2bdc553b07 Merge pull request #23403 from Homebrew/tolerate-missing-bottle-manifests
Tolerate missing bottle manifests in prefetches
2026-08-03 13:47:29 +00:00
Mike McQuaidandGitHub 998e779667 Merge pull request #23394 from SSakutaro/contributions-readme-fallback
contributions: clarify Maintainer team access
2026-08-03 13:38:13 +00:00
Mike McQuaid 4b375799df Tolerate missing bottle manifests in prefetches
- After #23381, homebrew-core CI fails installing dependencies on
  version-bump PRs: the bumped formula's stale bottle block derives
  its manifest URL from the new version, whose bottle has not been
  published yet, and `DownloadQueue#fetch` treats every bottle
  manifest failure as fatal.
- Before that change the default ask-mode plan fetched manifests
  synchronously via `Formula#fetch_bottle_tab`, which rescues
  download errors so dependency resolution falls back to a full
  install, and the installer's memoisation then kept the queue from
  retrying the download.
- Add `DownloadQueue#fetch(allow_failures:)`: failed downloads are
  still reported but neither raise nor mark the fetch or run as
  failed. Use it for the metadata-only drains (`fetch_formulae`'s
  bottle manifest waits, `brew install`'s ask-mode drain and
  `brew upgrade`'s tab prefetch), restoring the synchronous path's
  tolerance. Manifest failures in fetches that pour bottles remain
  fatal.
2026-08-03 14:25:47 +01:00
Mike McQuaid 272f861408 Compact install step JSON
- omit values already supplied by runner defaults
- retain explicit values when they change step behaviour
2026-08-03 13:21:39 +01:00
Mike McQuaidandGitHub d610afe44d Merge pull request #23381 from Homebrew/install-earlier-downloads
Start install downloads before local-only checks
2026-08-03 08:17:31 +00:00
Mike McQuaidandGitHub 0886f47031 Merge pull request #23400 from Homebrew/detect-app-case
cask/audit: detect incorrect app case
2026-08-03 08:11:14 +00:00
Mike McQuaid 284cd0ed4c Start install downloads before local-only checks
- `brew install` only started network transfers after preinstall
  checks and, in ask mode, fetched each bottle manifest serially
  while computing the dry-run plan.
- Enqueue bottle manifests on the shared download queue right after
  building formula installers in both ask and no-ask modes so
  transfers overlap preinstall checks and dependant scanning and
  manifests for multiple formulae download concurrently. Ask mode
  drains them under a `Downloading bottle manifests` heading before
  printing the plan; warm runs enqueue nothing and stay silent.
- Once downloads are confirmed (`--yes` installs, reinstall, upgrade
  and other `Install.fetch_formulae` callers), also enqueue the
  formula's own bottle in `FormulaInstaller#prelude_fetch`: the blob
  URL needs neither the manifest nor dependency resolution, so both
  transfer concurrently and staging joins the same queue cycle.
- Skip the `enqueue_fetch` requeue for bottles the prelude fetch
  already enqueued so a completed early download is not reported a
  second time.
- Give `DownloadQueue#fetch` `only:` and `heading:` so a heading is
  always printed before any queue output and never for empty fetches:
  dependency resolution inside `Install.fetch_formulae` waits on just
  the bottle manifests it needs (under `Downloading bottle manifests`)
  and the cask source pre-fetch on just its cask files, keeping other
  in-flight downloads queued and unreported so bottles only ever
  appear under the `Fetching downloads for:` heading, which now
  prints lazily from the fetch that reports them (`brew upgrade`
  enqueues before it knows that heading's contents). This replaces
  `Install.show_combined_fetch_downloads_heading`, `brew upgrade`'s
  manual manifest heading predicate and its dead
  `show_downloads_heading` plumbing.
- Instrument `Install.perform_preinstall_checks_once` as a
  `preinstall_checks` phase timing to keep the reordering visible.
- Archive-cold `brew install hello`: the first transfer starts at
  ~375ms instead of ~442ms, the bottle no longer waits for the
  manifest round trip (~672ms before, ~375ms now) and `--yes` wall
  time drops around 30%. Two-formula ask-mode installs drop one full
  manifest round trip (~1240ms to ~1030ms).
2026-08-03 08:54:24 +01:00
Mike McQuaidandGitHub 2a2dac58e6 Merge pull request #23393 from Homebrew/replace-callcc-fiber
ignorable: replace callcc with Fiber
2026-08-02 15:49:01 +00:00
Mike McQuaidandGitHub 68c924500d Merge pull request #23372 from Homebrew/install-step-explicit-var-compat
Make formula install-step var bases explicit
2026-08-02 15:48:20 +00:00
Mike McQuaidandGitHub 74dce14455 Merge pull request #23385 from Homebrew/skip-bad-bottles
install: isolate formula and cask fetch errors
2026-08-02 15:48:05 +00:00
Mike McQuaidandGitHub 4ec7a0827d Merge pull request #23380 from Homebrew/internal-api-payload-index
Parse only needed internal API payload entries
2026-08-02 15:47:19 +00:00
Mike McQuaid 0c2baca69e ignorable: replace callcc with Fiber
- Ruby 4.0's `continuation` warns `callcc is obsolete; use Fiber
  instead` whenever it is required, which happens on every `brew`
  command that loads a formula from source.
- Run `Ignorable.hook_raise` blocks in a `Fiber`: `raise` now pauses
  at the raise site and asks an `on_ignorable` callback whether to
  resume (`:ignore`) or raise there as usual, replacing the rescue
  plus continuation jump and `Ignorable::ExceptionMixin#ignore`.
- `Debrew` menus and `Formulary` `ignore_errors` decisions now happen
  before the stack unwinds, so `ensure` blocks only run when an
  exception is actually raised.
- Only require `ignorable` when `Formulary` uses `ignore_errors` and
  drop the obsolete `brew verify-undefined` `Warnings` guard.

Fixes https://github.com/Homebrew/brew/issues/23384
2026-08-01 14:28:57 +01:00
Mike McQuaidandGitHub 1f3abf43a3 Merge pull request #23391 from Homebrew/fix-download-size-unit
Keep download progress within terminal width
2026-08-01 12:30:52 +00:00
Mike McQuaid 1bbb1f5778 Keep download progress within terminal width 2026-08-01 13:10:12 +01:00
Mike McQuaidandGitHub fc44fe755d Merge pull request #23390 from HackAttack/false-tmux-caveat
Suppress brew services tmux caveat on Linux
2026-08-01 07:00:22 +00:00
Mike McQuaidandGitHub b921d44f02 Merge pull request #23312 from IngmarStein/service-env-overrides
Add per-service user environment variable overrides
2026-08-01 06:53:05 +00:00
Mike McQuaidandGitHub c975200f1f caveats: tweak syntax. 2026-08-01 07:42:21 +01:00
Mike McQuaidandGitHub bab190907a Merge pull request #23388 from Homebrew/cask-config-shape-variations
cask/config: define instance variables in a consistent order
2026-08-01 06:40:36 +00:00
Mike McQuaidandPatrick Linnane c2439e92e0 formula-analytics: replace PyCall with subprocess
- `pycall` was Homebrew's only in-process Python embedding: a native
  gem that dlopens `libpython`, needed the `__PYVENV_LAUNCHER__` hack
  for macOS framework Pythons, hand-written Sorbet stubs and
  tapioca/RuboCop exclusions.
- A pure Ruby HTTP port was rejected: InfluxDB Cloud Serverless only
  serves SQL over Arrow Flight gRPC (it has no `/api/v3/query_sql`
  endpoint) and the analytics schema keeps `package`, `tap_name` and
  `options` as fields, which InfluxQL cannot `GROUP BY`; Flux is
  deprecated on InfluxDB 3. Ruby Flight clients need heavier native
  dependencies than `pycall` itself.
- Moving the whole query operation into Python was rejected: the JSON
  output depends on `Homebrew::EnvConfig` defaults, `MacOSVersion`
  pretty names and WSL suffix handling that would drift if duplicated
  outside Ruby.
- `influxdb-query.py` runs from a `uv`-managed virtualenv with the
  same pinned `influxdb3-python` and speaks a documented protocol: a
  JSON request on stdin, JSON Lines rows on stdout and the token read
  from `HOMEBREW_INFLUXDB_TOKEN` so credentials stay off the command
  line.
- Arrow record batches now stream via `mode="reader"` instead of
  being copied record-by-record across PyCall's FFI bridge.
- Python dependencies moved from `pip-compile`d `requirements.txt` to
  `pyproject.toml` and a hash-verified `uv.lock` installed with
  `uv sync --frozen`: `uv` is a single dependency-free bottle
  installed 2.5x as often as versioned Python formulae, replaces the
  five bottles `python@3.13` needed and cold-installs the whole
  virtualenv faster than `pip` installed the packages alone, so
  `actions/setup-python` and dependabot's `pip` ecosystem are
  replaced by `astral-sh/setup-uv` and the `uv` ecosystem.
- `uv` also provisions the interpreter: `.python-version` pins 3.14,
  the newest Python in Homebrew, and `requires-python = ">=3.13"`
  keeps future bumps to a one-line `.python-version` change.
- `brew formula-analytics --setup` still prepares everything for
  offline runs and verifies the bridge import via the script's
  `--check` flag.
- `brew verify-undefined` also guards `InfluxDBClient3` and `PyCall`
  after requiring `dev-cmd/formula-analytics`.
- The TSM-era `transform_analytics_to_counts.json` Flux task was
  referenced by nothing so is removed.
2026-07-31 16:55:26 -07:00
Mike McQuaid 55e268f8a0 install: isolate formula and cask fetch errors
- One malformed formula or cask (e.g. a bottle `root_url` that is an
  invalid URI) raised while enqueueing downloads and aborted the whole
  `brew upgrade` batch with an internal stack trace.
- Rescue anything raised by an individual formula's or cask's prelude
  and enqueue steps so the offending package is reported and skipped,
  the rest still proceed and the command exits nonzero.

Fixes https://github.com/Homebrew/brew/issues/23377.
2026-07-31 20:32:40 +01:00
Mike McQuaid dbee8fb6f0 Make formula var bases explicit in docs
- Stop documenting the temporary implicit `var` base for formula steps.
- Update examples to specify their intended path base.
- Record the official-tap migration, RuboCop enforcement and runtime
  default removal as separate follow-up changes.
2026-07-31 20:32:03 +01:00
Mike McQuaid 5ab33c9e63 Parse only needed internal API payload entries
- Every command loading internal API data paid a full `JSON.parse` of
  the 13MB packages payload (~8500 formulae and ~7700 casks, ~80ms and
  a large retained object graph) even when installing one formula.
- Add `Homebrew::API::PackagesIndex`, a byte-offset index sidecar over
  the signature-verified payload. The index is derived, unverified
  cache data guarded in layers: the payload bytes it points into are
  RSA-PSS-verified every run, loading requires the recorded top-level
  spans to tile that payload exactly (proving the formulae and casks
  section spans are the real top-level values) and every lookup
  revalidates that its offsets sit at the expected `"<name>":` key
  inside the requested section's span and that the slice parses. A
  forged or stale index therefore cannot inject unverified content or
  remap a name to another entry, even a same-named key in the other
  section; it fails validation and callers fall back to a full parse.
- Build the index whenever a download, revalidation or index miss has
  already paid for a full parse, by locating each entry's bytes via
  their exact `JSON.generate` round trip (the payload is generated by
  the same serialiser, verified against the whole document up front).
- `Internal` now serves per-name entries (`formula_hash`, `cask_hash`,
  name lists and membership) and the small top-level keys through the
  index, materialising `formula_hashes`/`cask_hashes` only for
  full-iteration callers such as `search` and `formula_auditor`.
- `write_names_file!`, `write_aliases_file!` and
  `write_executables_file!` take blocks so their freshness short
  circuits no longer materialise every entry on warm loads.
- `brew update` prewarms the index: `brew update-report`'s existing
  `write_names_and_aliases` call rebuilds the payload sidecar and
  index whenever the envelope changed, during the full parse it needs
  for the names files anyway, so the first command after an update
  loads through the index. The previous-OS-version removals in
  `cmd/update.sh` and `brew cleanup --scrub` keep the current OS's
  `.payload.index` alongside its `.payload` instead of deleting it on
  every update.
- Internal API data load drops from ~100ms to ~30ms in `brew install`
  (signature verification retained) and a warm no-op `brew install`
  from ~530ms to ~440ms.
2026-07-31 17:43:41 +01:00
Mike McQuaidandGitHub 2b7c46891f Merge pull request #23199 from Homebrew/install-step-24-final-migration-stacks
Record final migration stacks (24/24)
2026-07-31 16:30:03 +00:00
Mike McQuaidandGitHub 269da2ead5 Merge pull request #23198 from Homebrew/install-step-23-delivery-plan
Update migration delivery plan (23/24)
2026-07-31 16:30:02 +00:00
Mike McQuaidandGitHub e356199fda Merge pull request #23197 from Homebrew/install-step-22-migration-plan
Plan remaining install hook migration (22/24)
2026-07-31 16:30:02 +00:00
Mike McQuaidandGitHub 4707965211 Merge pull request #23196 from Homebrew/install-step-21-documentation
Document canonical install steps (21/24)
2026-07-31 16:30:01 +00:00
Mike McQuaidandGitHub bde4d1cc43 Merge pull request #23195 from Homebrew/install-step-20-autocorrections
Align install step autocorrections (20/24)
2026-07-31 16:30:00 +00:00
Mike McQuaidandGitHub f42ce2042f Merge pull request #23382 from Homebrew/install-step-19-cask-flight-bridge
Bridge cask flight step migrations (19/26)
2026-07-31 16:29:59 +00:00
Mike McQuaid 1e32308ddf Record final migration stacks
The compatibility pass and zero-hook local migrations now have stable
cross-repository commits. Each can be reviewed as an independent pull
request.

- record dependency-ordered brew, core and cask commit hashes
- separate released compatibility aliases from canonical documentation
- retain merged tap zero-hook scans as the enforcement gate
- capture the final single-package DSL usage audit
2026-07-31 17:01:59 +01:00
Mike McQuaid 59f97b4041 Update migration delivery plan
The completed DSL work now has coordinated brew, core and cask stacks,
while
legacy-hook enforcement still depends on merged tap state.

- record every capability commit and its ordered tap consumers
- make the merged zero-hook scan a hard prerequisite for conflicts
- document the final usage audit and defer non-DSL hardening work
2026-07-31 17:01:57 +01:00
Mike McQuaid 324a0d6380 Plan remaining install hook migration
- require zero tap hooks before adding bridge conflicts
- record exact core and cask baselines and residual work
- reject named actions used by only one package
2026-07-31 17:01:55 +01:00
Mike McQuaid 7e3b7b186f Document canonical install steps
Formula and cask authors need one current reference while released
aliases remain an implementation-only compatibility bridge.

- document shared names, defaults, guards, tokens and command behaviour
- remove compatibility-only methods and values from the cookbooks
- explain ordered coexistence with legacy hooks during tap migration
2026-07-31 17:01:53 +01:00
Mike McQuaid 4d83abd2cf Align install step autocorrections
Mechanical migrations should emit the canonical shared interface without
rejecting released compatibility names.

- emit canonical file, link, cache and service step names
- validate nested guards and regular-expression option nodes
- retain compatibility aliases during literal-block validation
- permit matching cask flight blocks during the migration bridge
2026-07-31 17:01:51 +01:00
Mike McQuaid 8c8c87aeb6 Bridge cask flight step migrations
Tap migrations cannot replace every cask flight block atomically.
Matching step and Ruby forms must coexist until the tap reaches zero
hooks.

- retain both artifacts instead of discarding either declaration
- execute declarative steps before the matching Ruby flight block
- use the shared command output default in every step phase
2026-07-31 16:58:48 +01:00
Mike McQuaidandGitHub 935053a12d Merge pull request #23193 from Homebrew/install-step-18-shared-interface
Align shared install step interfaces (18/24)
2026-07-31 15:31:34 +00:00
Mike McQuaidandGitHub 60afcb80a8 Merge pull request #23192 from Homebrew/install-step-17-python-bootstrap
Add Python bootstrap action (17/24)
2026-07-31 15:31:34 +00:00
Mike McQuaidandGitHub 171a09d8ca Merge pull request #23191 from Homebrew/install-step-16-php-configuration
Add PHP configuration action (16/24)
2026-07-31 15:31:33 +00:00
Mike McQuaidandGitHub 28e770c3b4 Merge pull request #23378 from Homebrew/docker-update-22.04
workflows/docker: align deprecation of 22.04 image
2026-07-31 15:26:58 +00:00
Mike McQuaid a92554a538 Align shared install step interfaces
Formula and cask migrations need one predictable vocabulary while the
install-step surface already released from `main` remains compatible.

- use canonical file, link, cache, certificate and service names
- align explicit overwrite, removal, token and blank-value semantics
- preserve legacy move defaults and the former PATH lookup value
- retain shipped methods and values as commented compatibility aliases
- keep compatibility-only names out of public documentation
2026-07-31 09:22:19 +01:00
Mike McQuaid 431a27c15c Add Python bootstrap action
Five CPython and PyPy formulae share packaging bootstrap work that
depends on resources and implementation-specific install layouts.

- rebuild CPython site-packages, pip and wheel links from resources
- safely replace pre-existing Cellar site-packages directories
- preserve writable CPython venv activation templates
- preserve the Python 3.9 compatibility configuration
- stage PyPy resources and links for the required ABI
2026-07-31 09:22:18 +01:00