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

Add missing utils/service require #18900

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

apainintheneck
Copy link
Contributor

  • 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?

This was originally added in #18865.

$ brew ruby -e 'p "activemq".f.service.to_systemd_unit'
/usr/local/Homebrew/Library/Homebrew/service.rb:458:in `block in to_systemd_unit': uninitialized constant Utils::Service (NameError)
        from /usr/local/Homebrew/Library/Homebrew/service.rb:458:in `map'
        from /usr/local/Homebrew/Library/Homebrew/service.rb:458:in `to_systemd_unit'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/call_validation.rb:278:in `bind_call'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/call_validation.rb:278:in `validate_call'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
        from -e:1:in `<main>'
$ brew ruby -e 'p "activemq".f.service.to_systemd_unit'
"[Unit]\nDescription=Homebrew generated unit for activemq\n\n[Install]\nWantedBy=default.target\n\n[Service]\nType=simple\nExecStart=\"/usr/local/opt/activemq/bin/activemq\" \"console\"\nWorkingDirectory=/usr/local/opt/activemq/libexec\n"

This was originally added in #18865.

```console
$ brew ruby -e 'p "activemq".f.service.to_systemd_unit'
/usr/local/Homebrew/Library/Homebrew/service.rb:458:in `block in to_systemd_unit': uninitialized constant Utils::Service (NameError)
        from /usr/local/Homebrew/Library/Homebrew/service.rb:458:in `map'
        from /usr/local/Homebrew/Library/Homebrew/service.rb:458:in `to_systemd_unit'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/call_validation.rb:278:in `bind_call'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/call_validation.rb:278:in `validate_call'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
        from -e:1:in `<main>'
```

```console
$ brew ruby -e 'p "activemq".f.service.to_systemd_unit'
"[Unit]\nDescription=Homebrew generated unit for activemq\n\n[Install]\nWantedBy=default.target\n\n[Service]\nType=simple\nExecStart=\"/usr/local/opt/activemq/bin/activemq\" \"console\"\nWorkingDirectory=/usr/local/opt/activemq/libexec\n"
```
Copy link
Member

@ZhongRuoyu ZhongRuoyu left a comment

Choose a reason for hiding this comment

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

Whoops, thanks @apainintheneck!

@apainintheneck apainintheneck merged commit f16f641 into master Dec 7, 2024
28 checks passed
@apainintheneck apainintheneck deleted the fix-utils-service-require-error branch December 7, 2024 19:01
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