-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
base: master
Are you sure you want to change the base?
Conversation
CC @Homebrew/maintainers, @jacobbednarz, @colindean for thoughts on this vs #19636 |
40d385d
to
b1e4f09
Compare
4c9a304
to
e3ea5e9
Compare
@@ -273,6 +260,28 @@ def run | |||
require "bundle/commands/remove" | |||
Homebrew::Bundle::Commands::Remove.run(*named_args, type: selected_types.first, global:, file:) | |||
end | |||
when *BUNDLE_EXEC_COMMANDS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to not move this so the diff is easier to follow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was moved by brew style --fix
😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carlocab oh no! will review harder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split out the changes from brew style --fix
so you can review b20a908 for the substantive changes.
@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 ❤️ |
d0768ca
to
971440d
Compare
`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.
971440d
to
b68987e
Compare
There was a problem hiding this 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 🎉 ✅
There was a problem hiding this 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.
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?brew bundle exec
behaves correctly only after doingbrew bundle install
.Running
brew bundle check
can be slow, so let's add a--check
flagto
brew bundle exec
which will also runbrew bundle check
beforebrew bundle exec
to ensure that theBrewfile
has been installedbefore proceeding.
Alternative to #19636 which makes
--check
the default behaviour. I have a mildpreference for this version since the additional
brew bundle check
makesbrew bundle env
andbrew bundle exec true
60% slower.Another option is to merge #19636 while adding a
--no-check
flag for users whoalready know their
Brewfile
is installed and don't want to incur the overheadof
brew bundle check
.