From 9888b3acdb944a9ac657a122b472e0c554c44602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?X=C3=B9d=C5=8Dng=20Y=C3=A1ng?= Date: Mon, 12 Feb 2024 14:32:31 -0500 Subject: [PATCH] Generate a lockfile for the distribution archive on the fly (third_party 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 https://github.com/bazelbuild/bazel/pull/21283#issuecomment-1938398252 for more context. Change-Id: I5266bd1caf2e4cc3d7d18cb8695af73488064ae1 Signed-off-by: Xudong Yang --- third_party/googleapis/BUILD.bazel | 5 ++++- third_party/remoteapis/BUILD.bazel | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/third_party/googleapis/BUILD.bazel b/third_party/googleapis/BUILD.bazel index 0a3ee0ddc60ab2..fd9ef80b59a527 100644 --- a/third_party/googleapis/BUILD.bazel +++ b/third_party/googleapis/BUILD.bazel @@ -20,7 +20,10 @@ license( license_text = "LICENSE", ) -exports_files(["LICENSE"]) +exports_files([ + "LICENSE", + "MODULE.bazel", +]) filegroup( name = "srcs", diff --git a/third_party/remoteapis/BUILD.bazel b/third_party/remoteapis/BUILD.bazel index 44a308c764bc23..ab36e13fed69f4 100644 --- a/third_party/remoteapis/BUILD.bazel +++ b/third_party/remoteapis/BUILD.bazel @@ -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")