Skip to content

bundle/commands/exec: check that Brewfile is installed with --check #19637

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

Merged
merged 2 commits into from
Apr 24, 2025

Conversation

carlocab
Copy link
Member

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

brew bundle exec behaves correctly only after doing brew bundle install.

Running brew bundle check can be slow, so let's add a --check flag
to brew bundle exec which will also run brew bundle check before
brew bundle exec to ensure that the Brewfile has been installed
before proceeding.

Alternative to #19636 which makes --check the default behaviour. I have a mild
preference for this version since the additional brew bundle check makes
brew bundle env and brew bundle exec true 60% slower.

Another option is to merge #19636 while adding a --no-check flag for users who
already know their Brewfile is installed and don't want to incur the overhead
of brew bundle check.

@carlocab
Copy link
Member Author

carlocab commented Mar 28, 2025

CC @Homebrew/maintainers, @jacobbednarz, @colindean for thoughts on this vs #19636

@carlocab carlocab force-pushed the bundle-exec-with-optional-check branch from 40d385d to b1e4f09 Compare March 28, 2025 05:59
@carlocab carlocab self-assigned this Mar 28, 2025
@carlocab carlocab force-pushed the bundle-exec-with-optional-check branch 2 times, most recently from 4c9a304 to e3ea5e9 Compare March 28, 2025 06:10
@MikeMcQuaid
Copy link
Member

CC @Homebrew/maintainers, @jacobbednarz, @colindean for thoughts on this vs #19636

@carlocab and I chatted privately about the performance differences and, given that #19636 is a fairly major performance regression: I'm 👍🏻 on this approach.

Thanks for opening PRs to compare both, though ❤️

@carlocab carlocab force-pushed the bundle-exec-with-optional-check branch 3 times, most recently from 971440d to b68987e Compare March 28, 2025 09:25
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.

Thanks for making this easier to review! Would be great to have some more test coverage here but otherwise 🎉 ✅

Copy link
Contributor

@colindean colindean left a comment

Choose a reason for hiding this comment

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

LGTM on a visual check. I'd prefer the behavior here to that in #19636.

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Apr 20, 2025
@carlocab carlocab marked this pull request as ready for review April 24, 2025 08:31
`brew bundle exec` behaves correctly only after doing `brew bundle install`.

Running `brew bundle check` can be slow, so let's add a `--check` flag
to `brew bundle exec` which will also run `brew bundle check` before
`brew bundle exec` to ensure that the `Brewfile` has been installed
before proceeding.
@carlocab carlocab force-pushed the bundle-exec-with-optional-check branch from b68987e to 08d5ca0 Compare April 24, 2025 08:34
@carlocab carlocab removed the stale No recent activity label Apr 24, 2025
@carlocab carlocab enabled auto-merge April 24, 2025 08:35
@carlocab carlocab added this pull request to the merge queue Apr 24, 2025
Merged via the queue into master with commit acf455b Apr 24, 2025
45 checks passed
@carlocab carlocab deleted the bundle-exec-with-optional-check branch April 24, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants