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

Separate test from runtime dependencies in Formula#to_hash #13895

Merged
merged 1 commit into from Sep 20, 2022

Conversation

Rylan12
Copy link
Member

@Rylan12 Rylan12 commented Sep 20, 2022

Fixes #13891

It turns out that we don't separate test dependencies from runtime dependencies in the fromula JSON API like we do for build and other types of dependencies. This means that there's no way to differentiate between test and runtime deps when loading a formula from the API. This PR adds a new test_dependencies element to the JSON API and moves the test dependencies there from the dependencies element.

@Rylan12 Rylan12 added the critical Critical change which should be shipped as soon as possible. label Sep 20, 2022
@BrewTestBot
Copy link
Member

Review period skipped due to critical label.

Copy link
Member

@Bo98 Bo98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add :test here?

[:build, :recommended, :optional].each do |type|
json_formula["#{type}_dependencies"].each do |dep|
next if uses_from_macos_names.include? dep
depends_on dep => type

Though it might have to be a separate PR after the JSON is regenerated.

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.

Nice work!

@Rylan12
Copy link
Member Author

Rylan12 commented Sep 20, 2022

Do we want to add :test here?

Good point, but I think it needs to happen once the API has been updated

@Rylan12 Rylan12 merged commit a6aab4b into Homebrew:master Sep 20, 2022
@Rylan12 Rylan12 deleted the test-deps-api branch September 20, 2022 16:36
@github-actions github-actions bot added the outdated PR was locked due to age label Oct 21, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
critical Critical change which should be shipped as soon as possible. outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

brew install installs test dependencies if $HOMEBREW_INSTALL_FROM_API is set
4 participants