bazel-contrib / bazel_features

Support Bazel "feature detection" from starlark
https://docs.google.com/document/d/1HJf3gMYIrzmTRqbD4nWXH2eJRHXjLrOU0mmIeZplUzY/edit#heading=h.5mcn15i0e1ch
Apache License 2.0
17 stars 13 forks source link

Add has_parallel_download feature to detect if rctx.download supports parallel downloads #29

Closed mortenmj closed 9 months ago

mortenmj commented 9 months ago

Coming in 7.1.0, repository_ctx#download has a new argument, block:

If set to false, the call returns immediately and instead of the regular return value, it returns a token with one single method, wait(), which blocks until the download is finished and returns the usual return value or throws as usual.

It would be useful to be able to update repository rules to use this feature when available.