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

brew tests should pass with homebrew/core untapped #17147

Closed
1 task done
rrotter opened this issue Apr 25, 2024 · 4 comments · Fixed by #17212
Closed
1 task done

brew tests should pass with homebrew/core untapped #17147

rrotter opened this issue Apr 25, 2024 · 4 comments · Fixed by #17212
Labels
features New features help wanted We want help addressing this

Comments

@rrotter
Copy link
Contributor

rrotter commented Apr 25, 2024

Verification

Provide a detailed description of the proposed feature

When running brew tests, if homebrew/core isn't tapped we should either automatically tap it (not unprecedented, brew generate-man-completions taps homebrew/command-not-found homebrew/services and homebrew/test-bot) or print a warning that failures are expected (w/ instructions to run brew tap --force homebrew/core).

What is the motivation for the feature?

The PR instructions instruct contributors to run brew tests, if you're working on a PR. This will fail if a user is working on a contribution to homebrew/brew and doesn't have homebrew/core tapped because it's not needed for their present work.

How will the feature be relevant to at least 90% of Homebrew users?

It will help 90% of new contributors to homebrew/core have a smoother experience and be more likely to contribute to this project.

What alternatives to the feature have been considered?

Could also add a note at https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request that brew tap --force homebrew/core is required for running brew tests.

@rrotter rrotter added the features New features label Apr 25, 2024
@MikeMcQuaid
Copy link
Member

print a warning that failures are expected (w/ instructions to run brew tap --force homebrew/core).

Do you have an example of some failures that occur?

What alternatives to the feature have been considered?

Another option could be fixing up tests so homebrew/core isn't required to be tapped.

@rrotter
Copy link
Contributor Author

rrotter commented Apr 26, 2024

Good point. There are 64 failures, every one of them is in rubocops/uses_from_macos or rubocops/provided_by_macos.

@Bo98
Copy link
Member

Bo98 commented Apr 26, 2024

That's useful info - thanks!

This will be because https://github.com/Homebrew/brew/blob/master/Library/Homebrew/test/support/helper/spec/shared_examples/formulae_exist.rb doesn't support API-only installs yet (but should).

If it turns out tricky to fix then skipping the test under such environments could be a compromise.

@MikeMcQuaid MikeMcQuaid added the help wanted We want help addressing this label Apr 26, 2024
@MikeMcQuaid MikeMcQuaid changed the title brew tests should warn user if homebrew/core isn't tapped (and/or tap core) brew tests should pass with homebrew/core untapped Apr 26, 2024
@MikeMcQuaid
Copy link
Member

This will be because master/Library/Homebrew/test/support/helper/spec/shared_examples/formulae_exist.rb doesn't support API-only installs yet (but should).

Yeh, this feels like the best scope for this issue 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
features New features help wanted We want help addressing this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants