From 694e01d8ca8808d609820cc0c23cb16bc0848915 Mon Sep 17 00:00:00 2001 From: Googler Date: Tue, 1 Mar 2022 16:35:02 -0800 Subject: [PATCH] Automated rollback of commit 8f269bbe37d4597e41c1268dadeb8d9deb7ba719. *** Reason for rollback *** Causing problems with globaldb indexer The original CL had the unexpected side effect of causing certain errors not being detected in the expected way. The globaldb indexer for example assumes that if a proto builds successfully then all its dependencies must be correct. Some errors stopped being detected at presubmit time as well, since a build_test() of a proto_library no longer checks all dependencies. I have some ideas for how to fix these problems but in the short term I think we need to roll this back to get the globaldb back into a healthy state. PiperOrigin-RevId: 431804322 --- src/main/starlark/builtins_bzl/common/proto/proto_library.bzl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/starlark/builtins_bzl/common/proto/proto_library.bzl b/src/main/starlark/builtins_bzl/common/proto/proto_library.bzl index 54866fe99266f5..56f7b3e282653b 100644 --- a/src/main/starlark/builtins_bzl/common/proto/proto_library.bzl +++ b/src/main/starlark/builtins_bzl/common/proto/proto_library.bzl @@ -225,6 +225,8 @@ def _write_descriptor_set(ctx, deps, proto_info, descriptor_set): ctx.actions.write(descriptor_set, "") return + dependencies_descriptor_sets = depset(transitive = [dep.transitive_descriptor_sets for dep in deps]) + args = ctx.actions.args() if ctx.fragments.proto.experimental_proto_descriptorsets_include_source_info(): args.add("--include_source_info") @@ -253,6 +255,7 @@ def _write_descriptor_set(ctx, deps, proto_info, descriptor_set): mnemonic = "GenProtoDescriptorSet", progress_message = "Generating Descriptor Set proto_library %{label}", outputs = [descriptor_set], + additional_inputs = dependencies_descriptor_sets, additional_args = args, strict_imports = strict_public_imports_mode != "OFF" and strict_public_imports_mode != "DEFAULT", )