SIGN IN SIGN UP
Homebrew / brew UNCLAIMED

🍺 The missing package manager for macOS (or Linux)

0 0 94 Ruby

sorbet: A formula's `url` method does exist

- 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.
I
Issy Long committed
572aa16560fec2a8a07c58573d895c22a963e050
Parent: af95141