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

Improve conflicts audit #11541

Merged
merged 6 commits into from
Jun 18, 2021
Merged

Conversation

bayandin
Copy link
Member

@bayandin bayandin commented Jun 15, 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?

This PR adds a couple of more checks for conflict audit:

  • a formula shouldn't conflict with itself
  • if a formula conflicts with another one, the second formula should have a conflict with the first one

We have several formulae (23 when I've check it last time) with asymmetric conflicts_with statement. PR for them are coming

@BrewTestBot
Copy link
Member

Review period will end on 2021-06-16 at 12:53:06 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Jun 15, 2021
MikeMcQuaid
MikeMcQuaid previously approved these changes Jun 15, 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.

Nice work! Some suggested, optional tweaks.

Library/Homebrew/formula_auditor.rb Outdated Show resolved Hide resolved
Library/Homebrew/formula_auditor.rb Outdated Show resolved Hide resolved
@bayandin
Copy link
Member Author

Nice work! Some suggested, optional tweaks.

Thanks for the suggestions, incorporated them all with some additional tweaks for formula comparison (instead of comparing by name, I compare formula themself now, it allows to handle correctly formula renames).

And here's a PR with formulae fixes Homebrew/homebrew-core#79446

@bayandin bayandin force-pushed the improve-conflicts-audit branch from 9506d80 to 564dbc3 Compare June 16, 2021 13:53
@BrewTestBot
Copy link
Member

Review period ended.

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Jun 16, 2021
BrewTestBot
BrewTestBot previously approved these changes Jun 16, 2021
Rylan12
Rylan12 previously approved these changes Jun 16, 2021
Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I like that it handles possible renames but I wonder if there should be another audit requiring that the formula name specified in the conflicts_with block is the "main name" of the formula. That way, changing the formula name also requires updating all of the conflicts_with references to that formula

@bayandin
Copy link
Member Author

Looks good to me.

I like that it handles possible renames but I wonder if there should be another audit requiring that the formula name specified in the conflicts_with block is the "main name" of the formula. That way, changing the formula name also requires updating all of the conflicts_with references to that formula

Probably I've got an idea how we can do it, let me check 🙂

@bayandin bayandin dismissed stale reviews from Rylan12 and BrewTestBot via cc1385b June 16, 2021 21:52
BrewTestBot
BrewTestBot previously approved these changes Jun 16, 2021
BrewTestBot
BrewTestBot previously approved these changes Jun 17, 2021
Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

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

Looks good for the most part. One suggestion

Library/Homebrew/formula_auditor.rb Outdated Show resolved Hide resolved
Library/Homebrew/formula_auditor.rb Outdated Show resolved Hide resolved
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.

Looking good so far!

Library/Homebrew/formula_auditor.rb Outdated Show resolved Hide resolved
Library/Homebrew/formula_auditor.rb Outdated Show resolved Hide resolved
BrewTestBot
BrewTestBot previously approved these changes Jun 18, 2021
Library/Homebrew/formula_auditor.rb Outdated Show resolved Hide resolved
Library/Homebrew/formula_auditor.rb Outdated Show resolved Hide resolved
Library/Homebrew/test/dev-cmd/audit_spec.rb Outdated Show resolved Hide resolved
Library/Homebrew/test/dev-cmd/audit_spec.rb Outdated Show resolved Hide resolved
Library/Homebrew/test/dev-cmd/audit_spec.rb Outdated Show resolved Hide resolved
Library/Homebrew/test/dev-cmd/audit_spec.rb Outdated Show resolved Hide resolved
BrewTestBot
BrewTestBot previously approved these changes Jun 18, 2021
BrewTestBot
BrewTestBot previously approved these changes Jun 18, 2021
Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

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.

Looks good, nice work!

@bayandin bayandin merged commit e77751e into Homebrew:master Jun 18, 2021
@bayandin
Copy link
Member Author

Thanks for the help @Rylan12 & @MikeMcQuaid 🎉

@bayandin bayandin deleted the improve-conflicts-audit branch June 18, 2021 19:35
@github-actions github-actions bot added the outdated PR was locked due to age label Jul 19, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 19, 2021
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