diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java index ab7d16641b9e37..983658e2f0eb37 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java @@ -218,9 +218,8 @@ public ProtoConfiguration(BuildOptions buildOptions) { this.options = options; } - @StarlarkMethod(name = "protoc_opts", useStarlarkThread = true, documented = false) - public ImmutableList protocOptsForStarlark(StarlarkThread thread) throws EvalException { - ProtoCommon.checkPrivateStarlarkificationAllowlist(thread); + @StarlarkMethod(name = "experimental_protoc_opts", structField = true, documented = false) + public ImmutableList protocOptsForStarlark() throws EvalException { return protocOpts(); } diff --git a/src/main/starlark/builtins_bzl/common/proto/proto_common.bzl b/src/main/starlark/builtins_bzl/common/proto/proto_common.bzl index 17275e659bcd9f..dd10f0d5ceef82 100644 --- a/src/main/starlark/builtins_bzl/common/proto/proto_common.bzl +++ b/src/main/starlark/builtins_bzl/common/proto/proto_common.bzl @@ -30,7 +30,7 @@ def _create_proto_compile_action( resource_set = None): """Creates proto compile action for compiling *.proto files to language specific sources. - It uses proto configuration fragment to access protoc_opts and strict_proto_deps flags. + It uses proto configuration fragment to access experimental_protoc_opts and strict_proto_deps flags. Args: ctx: The rule context, used to create the action and to obtain label. @@ -68,7 +68,7 @@ def _create_proto_compile_action( else: args.add(arg) - args.add_all(ctx.fragments.proto.protoc_opts()) + args.add_all(ctx.fragments.proto.experimental_protoc_opts) # Include maps # For each import, include both the import as well as the import relativized against its