New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "Revert "Split prof gems into their own group"" #15183
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looking good so far.
Library/Homebrew/utils/gems.rb
Outdated
@@ -12,6 +12,8 @@ module Homebrew | |||
# After updating this, run `brew vendor-gems --update=--bundler`. | |||
HOMEBREW_BUNDLER_VERSION = "2.3.26" | |||
|
|||
VALID_GEM_GROUPS = ["sorbet", "prof"].freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be read from the Gemfile
instead of being hardcoded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will have a look and see if there's a public API for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already use some Gem
methods so should be doable.
@@ -45,10 +45,11 @@ def self.typecheck_args | |||
def self.typecheck | |||
args = typecheck_args.parse | |||
|
|||
Homebrew.install_bundler_gems!(groups: ["sorbet"]) | |||
update = args.update? || args.update_all? | |||
Homebrew.install_bundler_gems!(groups: update ? VALID_GEM_GROUPS : ["sorbet"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this get split out into a named variable? A bit hard to parse as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great thanks!
Reland this so we can release a new portable Ruby, this time fixing
brew typecheck --update
to install all gems.Obsoletes the fix in #15134 so we shouldn't need to reland that.