From 0c3e207b2403c77593b3519b459222e2c028cde1 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Tue, 29 Oct 2024 06:32:24 +0900 Subject: [PATCH] dev-cmd/bump-formula-pr: fix type error The error message: Error: Parameter 'formula': Expected type String, got type Formulary::FormulaNamespace87ec47e7f9dec2f39e30adcc9fdea28fb57606eab88d4f83e8ebec591964143c::ApacheArrow with value # Caller: /opt/homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:152 Definition: /opt/homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:417 (Homebrew::DevCmd::BumpFormulaPr#check_for_mirrors) /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11618/lib/types/configuration.rb:296:in `call_validation_error_handler_default' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11618/lib/types/configuration.rb:303:in `call_validation_error_handler' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11618/lib/types/private/methods/call_validation.rb:310:in `report_error' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11618/lib/types/private/methods/call_validation.rb:218:in `block in validate_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11618/lib/types/private/methods/signature.rb:213:in `each_args_value_type' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11618/lib/types/private/methods/call_validation.rb:215:in `validate_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11618/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added' /opt/homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:152:in `run' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11618/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.11618/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.11618/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added' /opt/homebrew/Library/Homebrew/brew.rb:94:in `
' Please report this issue: https://docs.brew.sh/Troubleshooting This happened when I use the following command line: brew bump-formula-pr \ --commit \ --no-audit \ --sha256="abcf1934cd0cdddd33664e9f2d9a251d6c55239d1122ad0ed223b13a583c82a9" \ --url="https://www.apache.org/dyn/closer.lua?path=arrow/arrow-18.0.0/apache-arrow-18.0.0.tar.gz" \ --verbose \ --write-only \ apache-arrow --- Library/Homebrew/dev-cmd/bump-formula-pr.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index 167ea9134ae1b..a924c07d01a2a 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -148,7 +148,7 @@ def run new_mirrors ||= args.mirror if new_url.present? && (new_mirror = determine_mirror(new_url)) new_mirrors ||= [new_mirror] - check_for_mirrors(formula, old_mirrors, new_mirrors) + check_for_mirrors(formula.name, old_mirrors, new_mirrors) end old_hash = formula_spec.checksum&.hexdigest