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

formula: add keg_only_reason to formula hash #12552

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

Bo98
Copy link
Member

@Bo98 Bo98 commented Dec 11, 2021

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

For inclusion in the JSON API.

@BrewTestBot
Copy link
Member

Review period will end on 2021-12-14 at 00:00:00 UTC.

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

👏🏻. Would love to get this onto formulae.brew.sh too.

One thought: this feels like the sort of thing where we might want to start outputting the values for different OSs in different hashes (so you can get the output for all OSs on a single OS?)

@Bo98
Copy link
Member Author

Bo98 commented Dec 13, 2021

Ah yes we allow keg_only to be in on_macos and on_linux now don't we. I suppose this is a general question that applies to everything here, including dependencies.

Not entirely sure of what the best approach to that will be (short of a full restructure involving breaking changes). Maybe it would be some OS object that specifies key-value overrides/appends to the base JSON.

@EricFromCanada
Copy link
Member

This is the one leftover item from the migration in Homebrew/formulae.brew.sh#566: the JSON API only supplies Mac-specific values, since that's the machine that generates the JSON files. First step would be giving to_hash the ability to output Mac or Linux values regardless of the hardware it's running on; next would be restructuring the JSON schema to include both Mac and Linux values in one response.

A few examples of platform-specific values:

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Dec 14, 2021
@BrewTestBot
Copy link
Member

Review period ended.

@MikeMcQuaid MikeMcQuaid merged commit 2eaa34e into Homebrew:master Dec 14, 2021
@MikeMcQuaid
Copy link
Member

Merged to make clear I think this approach as-is is fine for now 👍🏻

Ah yes we allow keg_only to be in on_macos and on_linux now don't we. I suppose this is a general question that applies to everything here, including dependencies.

Not entirely sure of what the best approach to that will be (short of a full restructure involving breaking changes). Maybe it would be some OS object that specifies key-value overrides/appends to the base JSON.

Yeh, I think it's fine to continue this approach for now and extend it with a non-breaking change.

First step would be giving to_hash the ability to output Mac or Linux values regardless of the hardware it's running on; next would be restructuring the JSON schema to include both Mac and Linux values in one response.

Yup. I'd suggest something like a os (or even bottle) key in the JSON output which outputs these dependencies per-bottled platform. Ideally we'd be able to have all conditional dependencies/keg_only/conflicts/etc. output correctly from any single platform or OS. This may require us to add more DSLs for cases where we're doing any depends_on .... if ....

@Bo98 Bo98 deleted the hash-keg_only_reason branch December 14, 2021 13:07
@github-actions github-actions bot added the outdated PR was locked due to age label Jan 14, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 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.

4 participants