- Make every statically-poked method public and call it directly,
keeping `public_send` only for dynamically-named public methods.
- Read and write state through public `attr_*` accessors instead of
instance variable reflection.
- Enable `Homebrew/NoSendInTests` and
`Homebrew/NoInstanceVariableAccessInTests` now the test suite is
clean, so neither pattern creeps back in.
- Keep rare justified disables, e.g. `Module#remove_const` is
private core Ruby and raw memoisation state has no accessor.
- Since https://github.com/sorbet/sorbet/commit/d9d4b57b3fde3907d739ed85d340e64f75f2a7b8
Sorbet types `described_class` more correctly than assuming `T.untyped`.
- Switched back via having Copilot CLI (GPT 5.3 Codex) write me a
script to change all of the `klass` references into full class names,
and then running RuboCop's autocorrector having removed the `explicit`
style. The explicit style was deemed too verbose in
0c1321f1b1, hence why we went with
`let(:klass)`.
- This is much less verbose than the full class name, while preserving
Sorbet typing of the tests fully.
- Don't duplicate all of `formula.rbi` in the `rspec.rbi` shim because
it's a terrible pattern.
- I also noticed a supposedly typechecked file
`test/test_bot/formulae_spec.rb` that was definitely cheating through
the use of `T.bind(self, T.untyped)` and `T.unsafe`. So, follow the
same `T.bind(self, T.class_of(Formula))` pattern in test files to make
sure we're getting proper type checking in `formula` blocks.
- Even having added shims for the `formula("name")` method, Sorbet still
didn't always recognize `url` as a valid Formula DSL method, raising
error 7003 for method does not exist.
- My first idea to solve this was to add
`T.bind(self, T.class_of(Formula))` to every `formula do`
block inside `stub_formula_loader` where Sorbet was failing, but that
was a lot of edits and it still didn't work in all cases.
- With GPT-5.3-Codex's help, I discovered that Sorbet was sometimes
detecting `url` as being called on a Formula class (yay), but other
times on `RSpec::Core::ExampleGroup` or `Test::Helper::Formula`, so,
make Sorbet aware of `url` in those contexts as well. There only seem
to be `url` calls in `formula` blocks, so this shouldn't grow too much
more unwieldy.
- make Windows package state manageable from WSL
- use `winget` and `msstore` sources with stable IDs
- keep installer UI disabled while allowing UAC retry
- dump non-internal packages with readable names
- The "explicit" setting on the `RSpec/DescribedClass` cop is still
enabled, because `described_class` is bad for Sorbet typing, but
instead of applying its autocorrections to specify the full class name
everywhere that `described_class` was used, use
`let(:klass) { Foo }` so that the repetition per-test isn't massive in
tests that use it a lot (say, >5 times).
- Changes made with Copilot CLI, agent mode, Claude Opus 4.7.
When a Brewfile cask comes from a tap (e.g., ublue-os/tap/vscodium-linux),
the Linux skipper's macos_only_cask? check tries to load the cask before
its tap is installed. The CaskError rescue assumed macOS-only, causing the
cask to be skipped on the first run but not the second.
Check if the cask has a tap-qualified full_name in the rescue block. If so,
don't assume macOS-only — let the normal install flow handle it after the
tap is processed.
Fixes#21992
- bb22d4f required an explicit `os` stanza for
`supports_linux?` to return true, which broke
platform-agnostic casks like `dynamodb-local` that
have no `on_system` blocks at all
- for casks with OS blocks, keep using `os` stanza
presence; for platform-agnostic casks, check
artifacts for macOS-only classes and manual
installers (matching the Linux installer's
`supported_artifact?` predicate)
- add `on_os_blocks_exist?` to distinguish OS-specific
blocks from arch-only blocks so arch-only casks are
correctly treated as platform-agnostic
- add regression tests for manual installer cask and
platform-agnostic cask in `bundle/skipper_spec`
- stop surfacing casks on Linux unless `supports_linux?`
says they are safe to advertise, so `search` and
`bundle` stay conservative about unknown support
- move cask platform output into a `Requirements`
section so `brew info` explains macOS-only casks the
same way on macOS and Linux
- reuse `requires macOS` in `brew bundle` for both
`brew` and `cask` entries so platform warnings use the
same language across commands
- cover the shared policy with regressions around
`search`, `cask/info`, `bundle/skipper`, and
`Cask#supports_linux?`
- Now that we've enabled `--experimental-rspec-mode` [1], let's start
using Sorbet in tests at its basic `typed: false` level for now.
- This will ease the migration to `typed: true` of any or all tests we
want to do in the future.
[1]: https://github.com/Homebrew/brew/pull/21742