Skip to content
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

Use variations hash when installing from the API #13605

Merged
merged 6 commits into from Jul 27, 2022

Conversation

Rylan12
Copy link
Member

@Rylan12 Rylan12 commented Jul 25, 2022

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 the uses_from_macos and dependencies section of the formula's JSON info (on Linux). This means that it's added as a dependency twice. Now, we all names in dependencies and *_dependencies before adding and, if they dep is listed under uses_from_macos, we let the uses_from_macos method determine whether to add it as a dep or not.

@BrewTestBot
Copy link
Member

Review period will end on 2022-07-26 at 06:53:12 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Jul 25, 2022
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.

Makes sense to me, nice work!

Library/Homebrew/formulary.rb Outdated Show resolved Hide resolved
Rylan12 and others added 3 commits July 25, 2022 17:43
@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Jul 26, 2022
@BrewTestBot
Copy link
Member

Review period ended.

@Rylan12 Rylan12 merged commit 985f29f into Homebrew:master Jul 27, 2022
@Rylan12 Rylan12 deleted the api-merge-variations branch July 27, 2022 13:37
@github-actions github-actions bot added the outdated PR was locked due to age label Aug 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants