From f349322d2bbb136220c8f4a020b335c8c5939ef3 Mon Sep 17 00:00:00 2001 From: Jordan Mele Date: Sat, 15 Jun 2024 15:34:43 +0000 Subject: [PATCH] Add docs, and add to docs --- tools/build_defs/repo/BUILD | 1 + tools/build_defs/repo/cache.bzl | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/build_defs/repo/BUILD b/tools/build_defs/repo/BUILD index 5106cd4aa4a06e..7f4421ec4a22bf 100644 --- a/tools/build_defs/repo/BUILD +++ b/tools/build_defs/repo/BUILD @@ -40,6 +40,7 @@ genrule( ) REPO_BZL_FILES = [ + "cache", "git", "http", "local", diff --git a/tools/build_defs/repo/cache.bzl b/tools/build_defs/repo/cache.bzl index c4b13695c6ec3a..c25f03a0a3d51c 100644 --- a/tools/build_defs/repo/cache.bzl +++ b/tools/build_defs/repo/cache.bzl @@ -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 ""