Skip to content

Conversation

@cho-m
Copy link
Member

@cho-m cho-m commented Dec 7, 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?

This change removes formulae that:

  • have newer versions or revisions in Homebrew/core
  • have been removed or disabled

The last pkg-version string is added for remaining formulae to check when Formula[key].pkg_version > PkgVersion.parse(value)


Alternatively could just drop Linuxbrew migration handling.

Copilot AI review requested due to automatic review settings December 7, 2025 02:48
@cho-m cho-m force-pushed the reduce-linuxbrew-core-formulae-list branch from 2164209 to 94d6d00 Compare December 7, 2025 02:49
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 optimizes the linuxbrew-core migration code by removing formulae that are no longer needed for migration (those with newer versions in Homebrew/core or that have been removed/disabled). The PR transforms the migration list from a simple array of 115 formula names to a hash containing only 25 formulae with their old package version strings, and makes the require statement lazy-loaded for better performance.

  • Reduced migration list from 115 to 25 formulae by removing ones already updated or removed
  • Added old package version tracking in a hash structure with Sorbet type annotations
  • Optimized loading by moving require "linuxbrew-core-migration" from top-level to conditional lazy-loading

Reviewed changes

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

File Description
Library/Homebrew/linuxbrew-core-migration.rb Replaced simple array with hash mapping formula names to old pkg_version strings, reducing from 115 to 25 entries; derived migration list from hash keys
Library/Homebrew/cmd/update-report.rb Moved require "linuxbrew-core-migration" from top-level imports to lazy-loading inside the migration conditional block

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

This change removes formulae that:
* have newer versions or revisions in Homebrew/core
* have been removed or disabled

The last pkg-version string is added for remaining formulae to
check when `Formula[key].pkg_version > PkgVersion.parse(value)`
@cho-m cho-m force-pushed the reduce-linuxbrew-core-formulae-list branch from 94d6d00 to 7986ba1 Compare December 7, 2025 03:38
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.

Nice, thanks! When was this code added? It may have been long enough we can remove it.

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Dec 7, 2025
Merged via the queue into main with commit bd1d29a Dec 7, 2025
37 checks passed
@MikeMcQuaid MikeMcQuaid deleted the reduce-linuxbrew-core-formulae-list branch December 7, 2025 16:03
@cho-m
Copy link
Member Author

cho-m commented Dec 7, 2025

When was this code added? It may have been long enough we can remove it.

About 4 years ago - e8ee5b0.

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