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

Handle tap migrations in CaskLoader. #16596

Merged
merged 4 commits into from Feb 6, 2024

Conversation

reitermarkus
Copy link
Member

@reitermarkus reitermarkus commented Feb 6, 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?

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.

Makes sense to me! Some tests might be nice. Is this a companion to #16595? Do either of those PRs require the other?

@reitermarkus
Copy link
Member Author

Is this a companion to #16595? Do either of those PRs require the other?

Yes, but they don't require each other. This one follows the refactored logic from #16595 though.

@reitermarkus reitermarkus merged commit 6775171 into Homebrew:master Feb 6, 2024
24 checks passed
@reitermarkus reitermarkus deleted the cask-rename-migrations branch February 6, 2024 19:35
@aivus
Copy link

aivus commented Feb 6, 2024

@reitermarkus I'm getting lots of such errors.

Also during the brew upgrade:

➜  ~ brew upgrade
...

==> Upgrading htop
  3.2.2 -> 3.3.0 

==> Pouring htop--3.3.0.monterey.bottle.tar.gz
==> Caveats
htop requires root privileges to correctly display all running processes,
so you will need to run `sudo htop`.
You should be certain that you trust any software you grant root privileges.
==> Summary
🍺  /usr/local/Cellar/htop/3.3.0: 12 files, 354KB
==> Running `brew cleanup htop`...
Removing: /usr/local/Cellar/htop/3.2.2... (12 files, 346.3KB)
==> Upgrading jasper
  4.1.0 -> 4.1.2 

==> Pouring jasper--4.1.2.monterey.bottle.tar.gz
Error: Invalid tap name 'jasper/'
➜  ~ brew remove -v -d --cask vagrant
/usr/local/Homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading vagrant
Error: Invalid tap name 'vagrant/'
/usr/local/Homebrew/Library/Homebrew/tap.rb:48:in `fetch'
/usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:460:in `tap_cask_token_type'
/usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:502:in `block in for'
/usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:495:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:495:in `for'
/usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:455:in `load'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:159:in `block in load_formula_or_cask'
/usr/local/Homebrew/Library/Homebrew/api.rb:199:in `with_no_api_env_if_needed'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11230/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11230/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11230/lib/types/private/methods/_methods.rb:272:in `block in _on_method_added'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:118:in `load_formula_or_cask'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:83:in `block in to_formulae_and_casks'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:81:in `each'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:81:in `flat_map'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:81:in `to_formulae_and_casks'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11230/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11230/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11230/lib/types/private/methods/_methods.rb:272:in `block in _on_method_added'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:317:in `to_kegs_to_casks'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11230/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11230/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11230/lib/types/private/methods/_methods.rb:272:in `block in _on_method_added'
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:48:in `uninstall'
/usr/local/Homebrew/Library/Homebrew/brew.rb:86:in `<main>'
➜  ~ 

@williammck
Copy link

Seeing the same issues as @aivus. Reverting to the commit prior to this merge (cd9c3fc) allows formulae and casks to install again.

@github-actions github-actions bot added the outdated PR was locked due to age label Mar 9, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 9, 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

4 participants