Skip to content

Commit

Permalink
Generate a lockfile for the distribution archive on the fly (third_party
Browse files Browse the repository at this point in the history
changes from PR #21302)

The MODULE.bazel.lock file we have in our source tree is generated by the version of Bazel specified in the .bazelversion file. We currently use this lockfile for our distribution archives, which means whenever we increment the lockfile version, we need to manually transform the checked-in lockfile to make it work with HEAD Bazel too.

This commit generates a lockfile for HEAD Bazel on the fly and uses that for the distribution archive. This lockfile doesn't have any module extension content, since we only need to make sure that no network access happens during tests that use the distribution archive. See #21283 (comment) for more context.

Change-Id: I5266bd1caf2e4cc3d7d18cb8695af73488064ae1
Signed-off-by: Xudong Yang <[email protected]>
  • Loading branch information
Wyverald committed Feb 13, 2024
1 parent 2ce2960 commit ad73064
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion third_party/googleapis/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ license(
license_text = "LICENSE",
)

exports_files(["LICENSE"])
exports_files([
"LICENSE",
"MODULE.bazel",
])

filegroup(
name = "srcs",
Expand Down
5 changes: 4 additions & 1 deletion third_party/remoteapis/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ package(default_visibility = ["//visibility:public"])

licenses(["notice"])

exports_files(["LICENSE"])
exports_files([
"LICENSE",
"MODULE.bazel",
])

load("@io_bazel//third_party/grpc:build_defs.bzl", "java_grpc_library")
load("@io_bazel//tools/build_rules:utilities.bzl", "java_library_srcs")
Expand Down

0 comments on commit ad73064

Please sign in to comment.