-
-
Notifications
You must be signed in to change notification settings - Fork 70
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 "formulae_dependents: prune build deps when linking test deps" #719
Conversation
This still doesn't fix the overzealous linking of formulae, unfortunately. See Homebrew/homebrew-core#89621. This reverts commit 85aaf19.
Sorry @FnControlOption, this didn't work. Thanks anyway! |
Btw, @MikeMcQuaid, I'm not able to merge this (merge button is greyed out), but this (and #717) should be ready to go. |
This probably would have worked if we did: dependent.recursive_dependencies do |dep_dependent, dependency|
Dependency.prune if dependency.build? && !dependency.test?
Dependency.prune if dependency.test? && dep_dependent != dependent |
@carlocab should be fixed now, can you try again? |
Yep, merge button is green. Thanks!
While this does fix the linked CI error, this does not seem to fix the original error we wanted to fix. Our test cases are # linked.rb
require 'formula'
def puts_linked(dependent)
dependent.recursive_dependencies do |dep_dependent, dependency|
Dependency.prune if dependency.build? && !dependency.test?
Dependency.prune if dependency.test? && dep_dependent != dependency
dependency_f = dependency.to_formula
Dependency.skip if dependency_f.keg_only?
puts dependency_f.full_name
end
end
puts ARGV[0]
puts_linked(Formula[ARGV[0]]) Here's what we get:
|
Your |
And here I thought I double-checked that... and yes, it works:
This seems to have a bunch of duplicates though which we don't have by just iterating over
|
You should take the return value and print that rather than treat the block like |
So we'd need to move the |
Edit: Ah, never mind. Same typo. Not sure what I'm doing wrong here: # linked.rb
require 'formula'
def linked(dependent)
dependent.recursive_dependencies do |dep_dependent, dependency|
Dependency.prune if dependency.build? && !dependency.test?
Dependency.prune if dependency.test? && dep_dependent != dependency
dependency_f = dependency.to_formula
Dependency.skip if dependency_f.keg_only?
end
end
puts linked(Formula[ARGV[0]]).map(&:to_s)
No more |
See discussion at Homebrew#719.
This still doesn't fix the overzealous linking of formulae,
unfortunately. See Homebrew/homebrew-core#89621.
This reverts commit 85aaf19.