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

dev-cmd/bump-formula-pr: fix type error #18655

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

kou
Copy link
Contributor

@kou kou commented Oct 28, 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.
    • No. Should I add a new test for this? It seems that this was introduced by 587f4ba11bc7be30ece7a5ceae10e3395fdf131 but the commit didn't add any new tests.
  • 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?

The error message:

Error: Parameter 'formula': Expected type String, got type Formulary::FormulaNamespace87ec47e7f9dec2f39e30adcc9fdea28fb57606eab88d4f83e8ebec591964143c::ApacheArrow with value #<Formula apache-arrow (sta...ore/Formula/a/apache-arrow.rb>
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 `<main>'
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

The error message:

    Error: Parameter 'formula': Expected type String, got type Formulary::FormulaNamespace87ec47e7f9dec2f39e30adcc9fdea28fb57606eab88d4f83e8ebec591964143c::ApacheArrow with value #<Formula apache-arrow (sta...ore/Formula/a/apache-arrow.rb>
    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 `<main>'
    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
Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

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

Thanks!

@carlocab carlocab merged commit c81b2e4 into Homebrew:master Oct 28, 2024
25 checks passed
@kou kou deleted the brew-bump-formula-pr-type-error branch October 29, 2024 00:23
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.

2 participants