-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
formula*: add source download support for download queue. #20327
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
Conversation
This should allow downloading the formula files from GitHub in parallel too.
Will this also fix this error we are getting recently when running: /opt/homebrew/Library/Homebrew/brew.rb (Formulary::FromNameLoader): loading sba-cli
/opt/homebrew/Library/Homebrew/brew.rb (Formulary::FromPathLoader): loading /opt/homebrew/Library/Taps/gradle/homebrew-sba/Formula/sba-cli.rb
==> Fetching sba-cli from gradle/sba
/usr/bin/env PATH=/opt/homebrew/opt/gh/bin:/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin HOME=/Users/user gh auth token --hostname github.com
/usr/bin/env PATH=/opt/homebrew/opt/gh/bin:/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin HOME=/Users/user gh auth token --hostname github.com
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.5.13-12-g3b61b44\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 15.5\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --location https://api.github.com/repos/gradle/support-bundle-analyzer --header Accept:\ application/vnd.github+json --write-out '
'\%{http_code} --header Authorization:\ token\ ****** --header X-GitHub-Api-Version:2022-11-28 --dump-header /private/tmp/github_api_headers<DATE>-<PID>-<ID>
==> Downloading https://github.com/gradle/support-bundle-analyzer/releases/download/v1.7.9/sba-cli-1.7.9-osx-aarch_64.zip
/usr/bin/env PATH=/opt/homebrew/opt/gh/bin:/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin HOME=/Users/user gh auth token --hostname github.com
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.5.13-12-g3b61b44\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 15.5\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --location https://api.github.com/repos/gradle/support-bundle-analyzer/releases/tags/v1.7.9 --header Accept:\ application/vnd.github+json --write-out '
'\%{http_code} --header Authorization:\ token\ ****** --header X-GitHub-Api-Version:2022-11-28 --dump-header /private/tmp/github_api_headers<DATE>-<PID>-<ID>
Error: undefined method 'start_with?' for false
/opt/homebrew/Library/Homebrew/download_strategy.rb:471:in `CurlDownloadStrategy#fetch'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/call_validation.rb:282:in `UnboundMethod#bind_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/call_validation.rb:282:in `T::Private::Methods::CallValidation.validate_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/_methods.rb:277:in `block in CurlDownloadStrategy#_on_method_added'
/opt/homebrew/Library/Homebrew/downloadable.rb:111:in `Downloadable#fetch'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/call_validation.rb:179:in `UnboundMethod#bind_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/call_validation.rb:179:in `T::Private::Methods::CallValidation.validate_call_skip_block_type'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/call_validation.rb:121:in `block in Downloadable#create_validator_slow_skip_block_type'
/opt/homebrew/Library/Homebrew/resource.rb:145:in `Resource#fetch'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/call_validation.rb:282:in `UnboundMethod#bind_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/call_validation.rb:282:in `T::Private::Methods::CallValidation.validate_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/_methods.rb:277:in `block in Resource#_on_method_added'
/opt/homebrew/Library/Homebrew/retryable_download.rb:63:in `Homebrew::RetryableDownload#fetch'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/call_validation.rb:282:in `UnboundMethod#bind_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/call_validation.rb:282:in `T::Private::Methods::CallValidation.validate_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/_methods.rb:277:in `block in Homebrew::RetryableDownload#_on_method_added'
/opt/homebrew/Library/Homebrew/download_queue.rb:27:in `block in Homebrew::DownloadQueue#enqueue'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promises.rb:1593:in `Concurrent::Promises::AbstractPromise#evaluate_to'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promises.rb:1776:in `block in Concurrent::Promises::ChainPromise#on_resolvable'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:359:in `Concurrent::RubyThreadPoolExecutor::Worker#run_task'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:350:in `block (3 levels) in Concurrent::RubyThreadPoolExecutor::Worker#create_worker'
<internal:kernel>:168:in `Kernel#loop'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:341:in `block (2 levels) in Concurrent::RubyThreadPoolExecutor::Worker#create_worker'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:340:in `Kernel#catch'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:340:in `block in Concurrent::RubyThreadPoolExecutor::Worker#create_worker'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promises.rb:1268:in `Kernel#raise'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promises.rb:1268:in `Concurrent::Promises::Future#wait_until_resolved!'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby/concurrent/promises.rb:988:in `Concurrent::Promises::Future#wait!'
/opt/homebrew/Library/Homebrew/download_queue.rb:37:in `block in Homebrew::DownloadQueue#fetch'
/opt/homebrew/Library/Homebrew/download_queue.rb:36:in `Hash#each'
/opt/homebrew/Library/Homebrew/download_queue.rb:36:in `Homebrew::DownloadQueue#fetch'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/call_validation.rb:282:in `UnboundMethod#bind_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/call_validation.rb:282:in `T::Private::Methods::CallValidation.validate_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/_methods.rb:277:in `block in Homebrew::DownloadQueue#_on_method_added'
/opt/homebrew/Library/Homebrew/cmd/fetch.rb:178:in `Homebrew::Cmd::FetchCmd#run'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/call_validation.rb:282:in `UnboundMethod#bind_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/call_validation.rb:282:in `T::Private::Methods::CallValidation.validate_call'
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12357/lib/types/private/methods/_methods.rb:277:in `block in Homebrew::Cmd::FetchCmd#_on_method_added'
/opt/homebrew/Library/Homebrew/brew.rb:113:in `<main>'
Please report this issue:
https://docs.brew.sh/Troubleshooting |
@jonnybbb no, I don't imagine so. Please report an issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense! We should do the same for api/cask.rb
probably
Edit: ahh, I see now that it's already worked into #20328
FTR: I fixed the issue mentioned above by removing a custom |
This should allow downloading the formula files from GitHub in parallel too.