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

rubocop: The pyyaml resource requires depends_on "libyaml" #16718

Merged

Conversation

issyl0
Copy link
Member

@issyl0 issyl0 commented Feb 20, 2024

  • 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?

  • The "pyyaml" resource requires depends_on "libyaml", so make the FormulaAudit/ResourceRequiresDependencies handle both uses_from_macos and depends_on.
  • Fail nicely when a formula has no resources.

@issyl0 issyl0 force-pushed the pyyaml-resource-needs-specific-deps-too branch from 7deac42 to a895496 Compare February 20, 2024 23:24
- Ran this against `signal-cli` and despite it having a valid-looking resource block, it failed on `undefined method 'str_content' for nil:NilClass`.
@timsutton
Copy link
Sponsor Member

Maybe this is a good place to discuss whether libyaml should be also added if ruamel.yaml is a dependency? (As an alternative to PyYAML)

It seems like it might drop back to a pure-python version but use libyaml if it's available?

@p-linnane
Copy link
Member

Now that we have this Rubocop we can easily extend it as we identify more situations like this. I'm thinking of the formulae that can't use our python-cryptography formula or the bcrypt resource which both need Rust to build. These are just the most pressing ones for our Python vendoring project.

@issyl0 issyl0 merged commit 6a9c9c0 into Homebrew:master Feb 21, 2024
24 checks passed
@issyl0 issyl0 deleted the pyyaml-resource-needs-specific-deps-too branch February 21, 2024 08:45
@MikeMcQuaid
Copy link
Member

Thanks @issyl0!

@github-actions github-actions bot added the outdated PR was locked due to age label Mar 25, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2024
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

4 participants