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

using: CustomDownloadStrategy erroring since sorbet was enabled #15750

Closed
3 tasks done
gibfahn opened this issue Jul 25, 2023 · 3 comments · Fixed by #15754
Closed
3 tasks done

using: CustomDownloadStrategy erroring since sorbet was enabled #15750

gibfahn opened this issue Jul 25, 2023 · 3 comments · Fixed by #15754
Assignees
Labels
bug Reproducible Homebrew/brew bug in progress Maintainers are working on this outdated PR was locked due to age

Comments

@gibfahn
Copy link
Contributor

gibfahn commented Jul 25, 2023

brew doctor output

❯ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: The filesystem on /System/Volumes/Data appears to be case-sensitive.
The default macOS filesystem is case-insensitive. Please report any apparent problems.

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  pycparser
  cffi

Warning: Homebrew's "sbin" was not found in your PATH but you have installed
formulae that put executables in /opt/homebrew/sbin.
Consider setting your PATH for example like so:
  echo 'export PATH="/opt/homebrew/sbin:$PATH"' >> ~/.zshrc

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

❯ brew config
HOMEBREW_VERSION: 4.1.1-20-db86a40ef8
ORIGIN: https://github.com/homebrew/brew
HEAD: db86a40ef8b5808a37a32b057d5aba18a1ce4054
Last commit: 2 hours ago
Core tap origin: https://github.com/homebrew/homebrew-core
Core tap HEAD: f0eded11a20dc323633def3fefbf39a023f298c0
Core tap last commit: 49 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_BAT_THEME: TwoDark
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: nvim
HOMEBREW_MAKE_JOBS: 10
HOMEBREW_NO_ANALYTICS: set
HOMEBREW_NO_GITHUB_API: set
HOMEBREW_NO_INSTALL_FROM_API: set
Homebrew Ruby: 2.6.10 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/2.6.10_1/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 14.0.3 build 1403
Git: 2.41.0 => /opt/homebrew/bin/git
Curl: 8.1.2 => /usr/bin/curl
macOS: 13.4-arm64
CLT: N/A
Xcode: 14.0 => /Applications/Xcode.app/Contents/Developer
Rosetta 2: false

What were you trying to do (and why)?

Running an automatic script to update casks to their latest versions.

What happened (include all command output)?

❯ brew bump-cask-pr --write-only --version 10.3,28 --no-audit --no-style my-org/tap/my-cask
Error: Cask 'my-cask' 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
Definition: /opt/homebrew/Library/Homebrew/cask/url.rb:171

Bisect shows this error started with the enabling of sorbet: #15705

What did you expect to happen?

I believe this is still supported as it's mentioned in the docs: https://docs.brew.sh/Formula-Cookbook#specifying-the-download-strategy-explicitly

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

cask "my-cask" do
  version "1.2.3"
  sha256 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

  url "https://example.com/my-org/my-cask", using: CustomDownloadStrategy
  name "MyCask"
  app "MyCask.app"
end


- Have example cask ^
- Try to update it with e.g. `brew bump-cask-pr --write-only --version 10.3,28 --no-audit --no-style my-org/tap/my-cask`
@gibfahn gibfahn added the bug Reproducible Homebrew/brew bug label Jul 25, 2023
@gibfahn
Copy link
Contributor Author

gibfahn commented Jul 25, 2023

The undocumented HOMEBREW_NO_SORBET_RUNTIME=1 works around the issue.

@MikeMcQuaid MikeMcQuaid self-assigned this Jul 25, 2023
@MikeMcQuaid MikeMcQuaid added the in progress Maintainers are working on this label Jul 25, 2023
@gibfahn
Copy link
Contributor Author

gibfahn commented Jul 26, 2023

Thanks for the quick fix!

@MikeMcQuaid
Copy link
Member

@gibfahn you're welcome, thanks for the good report and saying thanks!

@github-actions github-actions bot added the outdated PR was locked due to age label Aug 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug in progress Maintainers are working on this outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants