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

“Error: comparison of PkgVersion with String failed” when running brew upgrade #18028

Closed
3 tasks done
nwhetsell opened this issue Aug 12, 2024 · 3 comments · Fixed by #18030
Closed
3 tasks done

“Error: comparison of PkgVersion with String failed” when running brew upgrade #18028

nwhetsell opened this issue Aug 12, 2024 · 3 comments · Fixed by #18030
Labels
bug Reproducible Homebrew/brew bug

Comments

@nwhetsell
Copy link
Sponsor Contributor

nwhetsell commented Aug 12, 2024

brew doctor output

Your system is ready to brew.

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

HOMEBREW_VERSION: 4.3.15-46-gaafa81b
ORIGIN: https://github.com/Homebrew/brew
HEAD: aafa81b3d9612613118654c8f66b9e6d34c65b11
Last commit: 5 minutes ago
Core tap HEAD: cff82b5ff3090c95cdffff170665b80ca395f278
Core tap last commit: 4 minutes ago
Core tap JSON: 12 Aug 19:33 UTC
Core cask tap HEAD: 1afd27094177e8f7925b9ca71a8d31595eb589c0
Core cask tap last commit: 39 minutes ago
Core cask tap JSON: 12 Aug 19:33 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/bin/ruby
CPU: dodeca-core 64-bit arm_blizzard_avalanche
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 13.6.9-arm64
CLT: 15.1.0.0.1.1700200546
Xcode: 15.2
Rosetta 2: false

What were you trying to do (and why)?

Run brew upgrade, to upgrade formulae.

What happened (include all command output)?

Running brew upgrade results in:

Error: comparison of PkgVersion with String failed
Warning: Removed Sorbet lines from backtrace!
Rerun with `--verbose` to see the original backtrace
/opt/homebrew/Library/Homebrew/attestation.rb:66:in `<'
/opt/homebrew/Library/Homebrew/attestation.rb:66:in `enabled?'
/opt/homebrew/Library/Homebrew/cmd/upgrade.rb:137:in `run'
/opt/homebrew/Library/Homebrew/brew.rb:94:in `<main>'
Please report this issue:
  https://docs.brew.sh/Troubleshooting

Here’s the output of brew upgrade --verbose:

Error: comparison of PkgVersion with String failed
/opt/homebrew/Library/Homebrew/attestation.rb:66:in `<'
/opt/homebrew/Library/Homebrew/attestation.rb:66:in `enabled?'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11518/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11518/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11518/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/opt/homebrew/Library/Homebrew/cmd/upgrade.rb:137:in `run'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11518/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11518/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11518/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/opt/homebrew/Library/Homebrew/brew.rb:94:in `<main>'
Please report this issue:
  https://docs.brew.sh/Troubleshooting

What did you expect to happen?

brew upgrade to run to completion, without producing an error.

Step-by-step reproduction instructions (by running brew commands)

brew upgrade
@ProfFan
Copy link

ProfFan commented Aug 12, 2024

Can confirm same issue, M1 14.6.1

@pheiduck
Copy link

Confirm on macOS: 14.6.1-x86_64

@woodruffw
Copy link
Member

Thanks all; #18030 will fix this.

@Homebrew Homebrew locked and limited conversation to collaborators Aug 12, 2024
@Homebrew Homebrew unlocked this conversation Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/brew bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants