-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
brew unbottled: skip deprecated #16116
Conversation
formulae = formulae&.select {|formula| !(formula.deprecated?)} | ||
all_formulae = all_formulae&.select {|formula| !(formula.deprecated?)} | ||
formula_installs = formula_installs&.select {|formula| !(formula.deprecated?)} |
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.
formulae = formulae&.select {|formula| !(formula.deprecated?)} | |
all_formulae = all_formulae&.select {|formula| !(formula.deprecated?)} | |
formula_installs = formula_installs&.select {|formula| !(formula.deprecated?)} | |
formulae.reject!(&:deprecated?) | |
all_formulae.reject!(&:deprecated?) |
It looks like formula_installs
is just a hash of names to installs that gets referenced based on the formulae in the other lists so removing information there is probably unnecessary.
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.
Makes sense, fixed
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.
Nit: Using Array#reject!(&:deprecated?)
here is both more idiomatic Ruby and less code in general.
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.
Would it make sense to make this the default?
Yes, I think so. I can't think of a situation where you'd actively be trying to bottle deprecated formulae so even the inverse option ( |
We are not interested in bottling them
Makes sense. I changed the logic and I am now always skipping deprecated formulae. Let's gather more insights because there might be edge cases we did not think of. |
Thanks again @iMichka and @apainintheneck for review! |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?