Skip to content

Conversation

@cho-m
Copy link
Member

@cho-m cho-m commented Dec 2, 2025

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

Also remove some old code for GCC < 5

For:

Also remove some old code for GCC < 5
Copilot AI review requested due to automatic review settings December 2, 2025 20:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the compilers module to use typed: strict Sorbet type checking and removes deprecated code for GCC versions earlier than 5.

  • Adds comprehensive type signatures throughout compilers.rb for strict typing
  • Updates parameter type signatures for the needs method from T::Array[String] to Symbol (variadic syntax)
  • Refactors determine_cc to use explicit case statement for clearer type handling
  • Removes obsolete version handling for GCC < 5 in the gcc_major method

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
Library/Homebrew/compilers.rb Migrated to typed: strict with comprehensive type annotations, converted Compiler to T::Struct, and removed GCC < 5 handling
Library/Homebrew/software_spec.rb Updated needs method signature to use variadic Symbol parameter type
Library/Homebrew/formula.rb Updated needs method signature to match software_spec.rb
Library/Homebrew/extend/ENV/shared.rb Refactored determine_cc with explicit case statement for better type safety

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Thanks!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Dec 3, 2025
Merged via the queue into main with commit e024d31 Dec 3, 2025
35 checks passed
@MikeMcQuaid MikeMcQuaid deleted the compilers-type-strict branch December 3, 2025 09:11
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.

4 participants