Skip to content

Commit

Permalink
Add docs, and add to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Silic0nS0ldier committed Jun 15, 2024
1 parent 67a07d7 commit f349322
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions tools/build_defs/repo/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ genrule(
)

REPO_BZL_FILES = [
"cache",
"git",
"http",
"local",
Expand Down
9 changes: 8 additions & 1 deletion tools/build_defs/repo/cache.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ machines without the file in the cache. This behavior can be disabled with
""".format(env = DEFAULT_CANONICAL_ID_ENV)

def get_default_canonical_id(repository_ctx, urls):
"""Returns the default canonical id to use for downloads."""
"""Returns the default canonical id to use for downloads.
Args:
repository_ctx: The repository context of the repository rule calling this utility
function.
urls: A list of URLs matching what is passed to `repository_ctx.download` and
`repository_ctx.download_and_extract`.
"""
if repository_ctx.os.environ.get(DEFAULT_CANONICAL_ID_ENV) == "0":
return ""

Expand Down

0 comments on commit f349322

Please sign in to comment.