Skip to content

sorbet: More T.binds in test formula/caveats blocks - #24106

Merged
issyl0 merged 3 commits into
mainfrom
sorbet-more-formula-binds
Sep 28, 2026
Merged

issyl0 merged 3 commits into
mainfrom
sorbet-more-formula-binds

Conversation

@issyl0

@issyl0 issyl0 commented Sep 27, 2026

Copy link
Copy Markdown
Member

  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • 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.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Claude Code (Fable 5, High reasoning) to categorize the remaining Sorbet failures in tests.


  • Part of my quest to fully Sorbet typecheck our tests.
  • This doesn't bump more files fully to typed: true, but it does reduce the number of errors incrementally.

- More incremental fixes to reduce the number of errors as we
  progress towards 100% typed tests.
- It's `instance_eval`ed on `DSL::Caveats`, which is where
  `requires_rosetta` and friends live.
Copilot AI lite review requested due to automatic review settings September 27, 2026 16:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Improves Sorbet typing across formula and cask DSL test blocks without changing runtime behavior.

Changes:

  • Adds T.bind annotations to formula test blocks.
  • Types cask caveats block receivers.
  • Raises typing strictness for integration coverage and mktemp tests.
File Description
Library/​Homebrew/​test/​vulns/​osv_export_spec.rb Types formula DSL blocks.
Library/​Homebrew/​test/​support/​helper/​integration_coverage.rb Enables typed checking.
Library/​Homebrew/​test/​mktemp_spec.rb Raises typing strictness.
Library/​Homebrew/​test/​formula_installer_spec.rb Types formula DSL blocks.
Library/​Homebrew/​test/​cmd/​info_spec.rb Types formula DSL blocks.
Library/​Homebrew/​test/​cli/​parser_spec.rb Types a formula DSL block.
Library/​Homebrew/​test/​cask/​installer_spec.rb Types a formula DSL block.
Library/​Homebrew/​cask/​dsl.rb Types the caveats block receiver.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@issyl0
issyl0 enabled auto-merge September 27, 2026 19:48

@p-linnane p-linnane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@issyl0
issyl0 added this pull request to the merge queue Sep 28, 2026
Merged via the queue into main with commit 8e858db Sep 28, 2026
53 checks passed
@issyl0
issyl0 deleted the sorbet-more-formula-binds branch September 28, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

⌂ 换网址