+13
-3
lines changedFilter options
+13
-3
lines changed Original file line number Diff line number Diff line change
@@ -14,7 +14,10 @@ load("//bazel/common:proto_lang_toolchain_info.bzl", "ProtoLangToolchainInfo")
14
14
load("//bazel/private:toolchain_helpers.bzl", "toolchains")
15
15
16
16
def _rule_impl(ctx):
17
-
provided_proto_sources = depset(transitive = [bp[ProtoInfo].transitive_sources for bp in ctx.attr.blacklisted_protos]).to_list()
17
+
if ctx.attr.blacklisted_protos and ctx.attr.denylisted_protos:
18
+
fail("Only one of 'denylisted_protos' and 'blacklisted_protos' can be set (prefer 'denylisted_protos').")
19
+
denylisted_protos = ctx.attr.denylisted_protos or ctx.attr.blacklisted_protos
20
+
provided_proto_sources = depset(transitive = [bp[ProtoInfo].transitive_sources for bp in denylisted_protos]).to_list()
18
21
19
22
flag = ctx.attr.command_line
20
23
if flag.find("$(PLUGIN_OUT)") > -1:
@@ -121,13 +124,20 @@ passed to the proto-compiler:
121
124
A language-specific library that the generated code is compiled against.
122
125
The exact behavior is LANG_proto_library-specific.
123
126
Java, for example, should compile against the runtime."""),
124
-
"blacklisted_protos": attr.label_list(
127
+
"denylisted_protos": attr.label_list(
125
128
providers = [ProtoInfo],
126
129
doc = """
127
130
No code will be generated for files in the <code>srcs</code> attribute of
128
-
<code>blacklisted_protos</code>.
131
+
<code>denylisted_protos</code>.
129
132
This is used for .proto files that are already linked into proto runtimes, such as
130
133
<code>any.proto</code>.""",
134
+
),
135
+
# TODO: Remove this once it is safe to do so in OSS.
136
+
"blacklisted_protos": attr.label_list(
137
+
providers = [ProtoInfo],
138
+
doc = """
139
+
Deprecated. Alias for <code>denylisted_protos</code>. Will be removed in a future release.
140
+
""",
131
141
),
132
142
# TODO: add doc
133
143
"allowlist_different_package": attr.label(
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4