Use variations
hash when installing from the API
#13605
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR modifies
Formulary
to include the data in the variations hash when loading a formula from the API. This means that we now load formulae with the correct dependencies, etc on all platforms, not just the one that generated the JSON output.Also, in this PR, I fixed an issue where dependencies could be duplicated. If a formula called
uses_from_macos "ruby"
,ruby
would be listed in both theuses_from_macos
anddependencies
section of the formula's JSON info (on Linux). This means that it's added as a dependency twice. Now, we all names independencies
and*_dependencies
before adding and, if they dep is listed underuses_from_macos
, we let theuses_from_macos
method determine whether to add it as a dep or not.