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: Formulae with the "lxml" resource have required dependencies #16705

Merged

Conversation

issyl0
Copy link
Member

@issyl0 issyl0 commented Feb 19, 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?

  • We're moving from depends_on "python-lxml" to resource "lxml" ... as part of the new Python vendoring plan.
  • For resource "lxml" to work, uses_from_macos "libxml2" and uses_from_macos "libxslt" are needed in the formulae.
  • This new RuboCop rule enforces that a formula including the "lxml" resource also include those dependencies.

TODO:

  • An autocorrect, probably useful when we start switching these over (right now everything still uses depends_on "python-lxml"). Separate PR?

- We're moving from `depends_on "python-lxml"` to `resource "lxml" ...` as part
  of the new Python vendoring plan.
- For `resource "lxml"` to work, `uses_from_macos "libxml2"` and
  `uses_from_macos "libxslt"` are needed in the formulae.
- This new RuboCop rule enforces that a formula including the "lxml" resource
  also include those dependencies.
@p-linnane
Copy link
Member

Thank you so much for this! We have already moved some formulae over to using the resource, and will be moving the rest over as time allows.

@timsutton
Copy link
Sponsor Member

Thanks! I was also thinking that this would be very useful to just enforce.

Copy link
Member

@ZhongRuoyu ZhongRuoyu left a comment

Choose a reason for hiding this comment

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

This is nice. Thanks @issyl0!

Co-authored-by: Ruoyu Zhong <zhongruoyu@outlook.com>
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.

Great work as usual @issyl0!

@MikeMcQuaid MikeMcQuaid merged commit 14ba271 into Homebrew:master Feb 20, 2024
24 checks passed
@issyl0 issyl0 deleted the lxml-resource-needs-uses-from-macos branch February 20, 2024 15:39
@github-actions github-actions bot added the outdated PR was locked due to age label Mar 22, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 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

5 participants