Skip to content

Commit

Permalink
Add has_parallel_download feature to detect if rctx.download supports…
Browse files Browse the repository at this point in the history
… parallel downloads (#29)

Coming in 7.1.0,
[repository_ctx#download](https://bazel.build/rules/lib/builtins/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.
  • Loading branch information
mortenmj authored Dec 17, 2023
1 parent f4fcf76 commit 52bf4a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions features.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ _external_deps = struct(
# Whether module_extension has the os_dependent and arch_dependent parameters.
# https://github.com/bazelbuild/bazel/commit/970b9dda7cd215a29d73a53871500bc4e2dc6142
module_extension_has_os_arch_dependent = ge("6.4.0"),
# Whether repository_ctx#download has the block parameter, allowing parallel downloads (#19674)
download_has_block_param = ge("7.1.0")
)

_flags = struct(
Expand Down

0 comments on commit 52bf4a1

Please sign in to comment.