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

cask/url: accept Class for using in Cask::URL#initialize #15947

Merged
merged 1 commit into from Sep 4, 2023

Conversation

gibfahn
Copy link
Contributor

@gibfahn gibfahn commented Sep 4, 2023

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


Commits (oldest to newest)

b4feaf2 cask/url: accept Class for using in Cask::URL#initialize

#15754 fixed Cask::URL::DSL#initialize, but we also need to fix Cask::URL#initialize as that takes the same parameters.

Error:

Error: Cask 'mycask' definition is invalid: 'url' stanza failed
  with: Parameter 'using': Expected type T.nilable(Symbol), got type Class
  with value MyCustomDownloadStrategy
Caller:
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/sorbet-runtime-0.5.10461/lib/types/private/methods/call_validation.rb:113

Refs: #15750


Homebrew#15754 fixed
`Cask::URL::DSL#initialize`, but we also need to fix
`Cask::URL#initialize` as that takes the same parameters.

Error:

```
Error: Cask 'mycask' definition is invalid: 'url' stanza failed
  with: Parameter 'using': Expected type T.nilable(Symbol), got type Class
  with value MyCustomDownloadStrategy
Caller:
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/sorbet-runtime-0.5.10461/lib/types/private/methods/call_validation.rb:113
```

Refs: Homebrew#15750
@gibfahn
Copy link
Contributor Author

gibfahn commented Sep 4, 2023

cc/ @MikeMcQuaid as this is basically the same as #15754

Copy link
Member

@Bo98 Bo98 left a comment

Choose a reason for hiding this comment

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

Thanks!

@Bo98 Bo98 merged commit 66eb266 into Homebrew:master Sep 4, 2023
24 checks passed
@gibfahn gibfahn deleted the sorbet_cask_url branch September 5, 2023 16:14
@github-actions github-actions bot added the outdated PR was locked due to age label Oct 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants