Skip to content

tap: fix autobump logic for unofficial taps#19854

Merged
bevanjkay merged 2 commits intoHomebrew:masterfrom
botantony:autobump-fix
Apr 30, 2025
Merged

tap: fix autobump logic for unofficial taps#19854
bevanjkay merged 2 commits intoHomebrew:masterfrom
botantony:autobump-fix

Conversation

@botantony
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 audit on unofficial taps throws error because autobump_packages tries to audit all official packages in external tap. Package list should be empty if neither core_tap? nor core_cask_tap? are true

@scpeters
Copy link
Contributor

thanks for the quick response!

I get the following error now:

$ brew audit --except=installed --tap=osrf/simulation 
Error: undefined method 'keys' for an instance of Array
Warning: Removed Sorbet lines from backtrace!
Rerun with `--verbose` to see the original backtrace
/usr/local/Homebrew/Library/Homebrew/tap.rb:998:in 'Tap#autobump'
/usr/local/Homebrew/Library/Homebrew/tap_auditor.rb:19:in 'block in Homebrew::TapAuditor#initialize'
/usr/local/Homebrew/Library/Homebrew/api.rb:191:in 'Homebrew.with_no_api_env'
/usr/local/Homebrew/Library/Homebrew/tap_auditor.rb:12:in 'Homebrew::TapAuditor#initialize'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:188:in 'Class#new'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:188:in 'block in Homebrew::DevCmd::Audit#run'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:184:in 'Array#each'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:184:in 'Enumerable#each_with_object'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:184:in 'Homebrew::DevCmd::Audit#run'
/usr/local/Homebrew/Library/Homebrew/brew.rb:95:in '<main>'

Signed-off-by: botantony <antonsm21@gmail.com>
Signed-off-by: botantony <antonsm21@gmail.com>
Copy link
Contributor

@scpeters scpeters left a comment

Choose a reason for hiding this comment

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

LGTM, it's fixed now for me in local testing with this branch

@Bo98 Bo98 added this pull request to the merge queue Apr 30, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 30, 2025
@scpeters
Copy link
Contributor

github-merge-queue bot removed this pull request from the merge queue due to failed status checks

Installing 1password
Installing 1password cask with --adopt. It is not currently installed.
==> Downloading https://downloads.1password.com/mac/1Password-8.10.74-aarch64.zip
Error: SHA256 mismatch
Expected: 8b547c094b6e0506a05e92b80170205123e59a98b93995a9e06d5475bc3c5e1c
  Actual: 96323a92e9162e1f3aec197479802c9bfe9fec9e4c34d8a6c2e7f6f1a6f9f6d2
    File: /Users/runner/Library/Caches/Homebrew/downloads/4d714391ae51a4e9e1b91a603059e8098bfc340e5c77ba18a167c18f5e00c3cb--1Password-8.10.74-aarch64.zip
To retry an incomplete download, remove the file above.

Installing 1password has failed!

is this typically flaky? it seems unrelated to this PR

@rgoldberg
Copy link
Contributor

rgoldberg commented Apr 30, 2025

Does this PR fix the error I mentioned in my new discussion?

I unsuccessfully searched for an issue for autobump, but I didn't search for a PR, as I had assumed that a PR would have had an associated issue.

Thanks for already having a fix ready before I even experienced the problem (assuming that this PR does indeed address the problem I encountered, instead of addressing a different issue).

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Apr 30, 2025
@MikeMcQuaid
Copy link
Member

Does this PR fix the error I mentioned in my new discussion?

Should do.

I had assumed that a PR would have had an associated issue.

This assumption is not always correct on Homebrew, no.

@bevanjkay
Copy link
Member

This PR is likely blocked until after Homebrew/homebrew-cask#210680 merges (and possibly the API regenerates).

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 30, 2025
@bevanjkay bevanjkay added this pull request to the merge queue Apr 30, 2025
Merged via the queue into Homebrew:master with commit f3a418a Apr 30, 2025
35 checks passed
@rgoldberg
Copy link
Contributor

This did indeed fix the problem I encountered. Thanks for fixing it.

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.

6 participants