Apply buildifier

This commit is contained in:
Adam Liddell 2022-12-01 22:13:20 +00:00
parent aed1a01df3
commit b5c64a09dc
36 changed files with 268 additions and 206 deletions

View File

@ -10,10 +10,11 @@ def android_grpc_library(name, **kwargs):
android_grpc_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create android library
@ -23,9 +24,10 @@ def android_grpc_library(name, **kwargs):
deps = GRPC_DEPS + kwargs.get("deps", []),
exports = GRPC_DEPS + kwargs.get("exports", []),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GRPC_DEPS = [

View File

@ -10,10 +10,11 @@ def android_proto_library(name, **kwargs):
android_proto_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create android library
@ -23,9 +24,10 @@ def android_proto_library(name, **kwargs):
deps = PROTO_DEPS + kwargs.get("deps", []),
exports = PROTO_DEPS + kwargs.get("exports", []),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
PROTO_DEPS = [

View File

@ -10,10 +10,11 @@ def c_proto_library(name, **kwargs): # buildifier: disable=function-docstring
c_proto_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Filter files to sources and headers
@ -46,9 +47,10 @@ def c_proto_library(name, **kwargs): # buildifier: disable=function-docstring
nocopts = kwargs.get("nocopts"),
strip_include_prefix = kwargs.get("strip_include_prefix"),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
PROTO_DEPS = [

View File

@ -10,10 +10,11 @@ def cpp_grpc_library(name, **kwargs): # buildifier: disable=function-docstring
cpp_grpc_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Filter files to sources and headers
@ -45,9 +46,10 @@ def cpp_grpc_library(name, **kwargs): # buildifier: disable=function-docstring
nocopts = kwargs.get("nocopts"),
strip_include_prefix = kwargs.get("strip_include_prefix"),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GRPC_DEPS = [

View File

@ -10,10 +10,11 @@ def cpp_proto_library(name, **kwargs): # buildifier: disable=function-docstring
cpp_proto_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Filter files to sources and headers
@ -46,9 +47,10 @@ def cpp_proto_library(name, **kwargs): # buildifier: disable=function-docstring
nocopts = kwargs.get("nocopts"),
strip_include_prefix = kwargs.get("strip_include_prefix"),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
PROTO_DEPS = [

View File

@ -10,10 +10,11 @@ def csharp_grpc_library(name, **kwargs):
csharp_grpc_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create csharp library
@ -22,9 +23,10 @@ def csharp_grpc_library(name, **kwargs):
srcs = [name_pb],
deps = GRPC_DEPS + kwargs.get("deps", []),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GRPC_DEPS = [

View File

@ -10,10 +10,11 @@ def csharp_proto_library(name, **kwargs):
csharp_proto_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create csharp library
@ -22,9 +23,10 @@ def csharp_proto_library(name, **kwargs):
srcs = [name_pb],
deps = PROTO_DEPS + kwargs.get("deps", []),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
PROTO_DEPS = [

View File

@ -10,10 +10,11 @@ def d_proto_library(name, **kwargs):
d_proto_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create d library
@ -22,9 +23,10 @@ def d_proto_library(name, **kwargs):
srcs = [name_pb],
deps = PROTO_DEPS + kwargs.get("deps", []),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
PROTO_DEPS = [

View File

@ -10,10 +10,11 @@ def fsharp_grpc_library(name, **kwargs):
fsharp_grpc_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create fsharp library
@ -22,9 +23,10 @@ def fsharp_grpc_library(name, **kwargs):
srcs = [name_pb],
deps = GRPC_DEPS + kwargs.get("deps", []),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GRPC_DEPS = [

View File

@ -10,10 +10,11 @@ def fsharp_proto_library(name, **kwargs):
fsharp_proto_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create fsharp library
@ -22,9 +23,10 @@ def fsharp_proto_library(name, **kwargs):
srcs = [name_pb],
deps = PROTO_DEPS + kwargs.get("deps", []),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
PROTO_DEPS = [

View File

@ -14,8 +14,8 @@ def go_grpc_library(name, **kwargs):
**{
k: v
for (k, v) in kwargs.items()
if (k in proto_compile_attrs.keys() and k != "prefix_path")
or k in bazel_build_rule_common_attrs
if (k in proto_compile_attrs.keys() and k != "prefix_path") or
k in bazel_build_rule_common_attrs
} # Forward args
)
@ -26,9 +26,10 @@ def go_grpc_library(name, **kwargs):
deps = kwargs.get("go_deps", []) + GRPC_DEPS + kwargs.get("deps", []),
importpath = kwargs.get("importpath"),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GRPC_DEPS = [

View File

@ -13,8 +13,8 @@ def go_proto_library(name, **kwargs):
**{
k: v
for (k, v) in kwargs.items()
if (k in proto_compile_attrs.keys() and k != "prefix_path")
or k in bazel_build_rule_common_attrs
if (k in proto_compile_attrs.keys() and k != "prefix_path") or
k in bazel_build_rule_common_attrs
} # Forward args
)
@ -25,9 +25,10 @@ def go_proto_library(name, **kwargs):
deps = kwargs.get("go_deps", []) + PROTO_DEPS + kwargs.get("deps", []),
importpath = kwargs.get("importpath"),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
PROTO_DEPS = [

View File

@ -14,8 +14,8 @@ def go_validate_library(name, **kwargs):
**{
k: v
for (k, v) in kwargs.items()
if (k in proto_compile_attrs.keys() and k != "prefix_path")
or k in bazel_build_rule_common_attrs
if (k in proto_compile_attrs.keys() and k != "prefix_path") or
k in bazel_build_rule_common_attrs
} # Forward args
)
@ -26,9 +26,10 @@ def go_validate_library(name, **kwargs):
deps = kwargs.get("go_deps", []) + VALIDATE_DEPS + kwargs.get("deps", []),
importpath = kwargs.get("importpath"),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
VALIDATE_DEPS = [

View File

@ -14,8 +14,8 @@ def gateway_grpc_library(name, **kwargs):
**{
k: v
for (k, v) in kwargs.items()
if (k in proto_compile_attrs.keys() and k != "prefix_path")
or k in bazel_build_rule_common_attrs
if (k in proto_compile_attrs.keys() and k != "prefix_path") or
k in bazel_build_rule_common_attrs
} # Forward args
)
@ -26,9 +26,10 @@ def gateway_grpc_library(name, **kwargs):
deps = kwargs.get("go_deps", []) + GATEWAY_DEPS + GRPC_DEPS + kwargs.get("deps", []),
importpath = kwargs.get("importpath"),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GATEWAY_DEPS = [

View File

@ -379,16 +379,16 @@ def get_parent_dirname(label):
# These are listed here to be correctly propagated through *_library macros to the underlying
# rules without just passing the entirety of kwargs, although maybe that's the better choice...
bazel_build_rule_common_attrs = [
'compatible_with',
'deprecation',
'distribs',
'exec_compatible_with',
'exec_properties',
'features',
'restricted_to',
'tags',
'target_compatible_with',
'testonly',
'toolchains',
'visibility',
"compatible_with",
"deprecation",
"distribs",
"exec_compatible_with",
"exec_properties",
"features",
"restricted_to",
"tags",
"target_compatible_with",
"testonly",
"toolchains",
"visibility",
]

View File

@ -10,10 +10,11 @@ def java_grpc_library(name, **kwargs):
java_grpc_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create java library
@ -24,9 +25,10 @@ def java_grpc_library(name, **kwargs):
runtime_deps = ["@io_grpc_grpc_java//netty"],
exports = GRPC_DEPS + kwargs.get("exports", []),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GRPC_DEPS = [

View File

@ -10,10 +10,11 @@ def java_proto_library(name, **kwargs):
java_proto_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create java library
@ -23,9 +24,10 @@ def java_proto_library(name, **kwargs):
deps = PROTO_DEPS + kwargs.get("deps", []),
exports = PROTO_DEPS + kwargs.get("exports", []),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
PROTO_DEPS = [

View File

@ -10,10 +10,11 @@ def js_grpc_node_library(name, **kwargs):
js_grpc_node_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Resolve deps
@ -30,9 +31,10 @@ def js_grpc_node_library(name, **kwargs):
package_name = kwargs.get("package_name", name),
strip_prefix = name_pb if not kwargs.get("legacy_path") else None,
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GRPC_DEPS = [

View File

@ -10,10 +10,11 @@ def js_grpc_web_library(name, **kwargs):
js_grpc_web_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Resolve deps
@ -30,9 +31,10 @@ def js_grpc_web_library(name, **kwargs):
package_name = kwargs.get("package_name", name),
strip_prefix = name_pb if not kwargs.get("legacy_path") else None,
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GRPC_DEPS = [

View File

@ -10,10 +10,11 @@ def js_proto_library(name, **kwargs):
js_proto_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Resolve deps
@ -30,9 +31,10 @@ def js_proto_library(name, **kwargs):
package_name = kwargs.get("package_name", name),
strip_prefix = name_pb if not kwargs.get("legacy_path") else None,
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
PROTO_DEPS = [

View File

@ -10,10 +10,11 @@ def objc_grpc_library(name, **kwargs): # buildifier: disable=function-docstring
objc_grpc_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Filter files to sources and headers
@ -45,9 +46,10 @@ def objc_grpc_library(name, **kwargs): # buildifier: disable=function-docstring
nocopts = kwargs.get("nocopts"),
strip_include_prefix = kwargs.get("strip_include_prefix"),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GRPC_DEPS = [

View File

@ -10,10 +10,11 @@ def objc_proto_library(name, **kwargs): # buildifier: disable=function-docstrin
objc_proto_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Filter files to sources and headers
@ -46,9 +47,10 @@ def objc_proto_library(name, **kwargs): # buildifier: disable=function-docstrin
nocopts = kwargs.get("nocopts"),
strip_include_prefix = kwargs.get("strip_include_prefix"),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
PROTO_DEPS = [

View File

@ -10,10 +10,11 @@ def python_grpc_library(name, **kwargs):
python_grpc_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create python library
@ -23,9 +24,10 @@ def python_grpc_library(name, **kwargs):
deps = GRPC_DEPS + kwargs.get("deps", []),
imports = [name_pb],
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GRPC_DEPS = [

View File

@ -10,10 +10,11 @@ def python_grpclib_library(name, **kwargs):
python_grpclib_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create python library
@ -25,9 +26,10 @@ def python_grpclib_library(name, **kwargs):
] + GRPC_DEPS + kwargs.get("deps", []),
imports = [name_pb],
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GRPC_DEPS = [

View File

@ -10,10 +10,11 @@ def python_proto_library(name, **kwargs):
python_proto_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create python library
@ -23,9 +24,10 @@ def python_proto_library(name, **kwargs):
deps = PROTO_DEPS + kwargs.get("deps", []),
imports = [name_pb],
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
PROTO_DEPS = [

View File

@ -10,10 +10,11 @@ def ruby_grpc_library(name, **kwargs):
ruby_grpc_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create ruby library
@ -23,7 +24,8 @@ def ruby_grpc_library(name, **kwargs):
deps = ["@rules_proto_grpc_bundle//:gems"] + kwargs.get("deps", []),
includes = [native.package_name() + "/" + name_pb],
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)

View File

@ -10,10 +10,11 @@ def ruby_proto_library(name, **kwargs):
ruby_proto_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create ruby library
@ -23,7 +24,8 @@ def ruby_proto_library(name, **kwargs):
deps = ["@rules_proto_grpc_bundle//:gems"] + kwargs.get("deps", []),
includes = [native.package_name() + "/" + name_pb],
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)

View File

@ -12,10 +12,11 @@ def rust_grpc_library(name, **kwargs): # buildifier: disable=function-docstring
rust_grpc_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create lib file
@ -31,9 +32,10 @@ def rust_grpc_library(name, **kwargs): # buildifier: disable=function-docstring
srcs = [name_pb, name_lib],
deps = GRPC_DEPS + kwargs.get("deps", []),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GRPC_DEPS = [

View File

@ -12,10 +12,11 @@ def rust_proto_library(name, **kwargs): # buildifier: disable=function-docstrin
rust_proto_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create lib file
@ -31,9 +32,10 @@ def rust_proto_library(name, **kwargs): # buildifier: disable=function-docstrin
srcs = [name_pb, name_lib],
deps = PROTO_DEPS + kwargs.get("deps", []),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
PROTO_DEPS = [

View File

@ -10,10 +10,11 @@ def scala_grpc_library(name, **kwargs): # buildifier: disable=function-docstrin
scala_grpc_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create scala library
@ -23,9 +24,10 @@ def scala_grpc_library(name, **kwargs): # buildifier: disable=function-docstrin
deps = GRPC_DEPS + kwargs.get("deps", []),
exports = GRPC_DEPS + kwargs.get("exports", []),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GRPC_DEPS = [

View File

@ -10,10 +10,11 @@ def scala_proto_library(name, **kwargs): # buildifier: disable=function-docstri
scala_proto_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create scala library
@ -23,9 +24,10 @@ def scala_proto_library(name, **kwargs): # buildifier: disable=function-docstri
deps = PROTO_DEPS + kwargs.get("deps", []),
exports = PROTO_DEPS + kwargs.get("exports", []),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
PROTO_DEPS = [

View File

@ -10,10 +10,11 @@ def swift_grpc_library(name, **kwargs):
swift_grpc_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create swift library
@ -23,9 +24,10 @@ def swift_grpc_library(name, **kwargs):
deps = GRPC_DEPS + kwargs.get("deps", []),
module_name = kwargs.get("module_name"),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
GRPC_DEPS = [

View File

@ -10,10 +10,11 @@ def swift_proto_library(name, **kwargs):
swift_proto_compile(
name = name_pb,
**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args
)
# Create swift library
@ -23,9 +24,10 @@ def swift_proto_library(name, **kwargs):
deps = PROTO_DEPS + kwargs.get("deps", []),
module_name = kwargs.get("module_name"),
**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args
} # Forward Bazel common args
)
PROTO_DEPS = [

View File

@ -93,15 +93,17 @@ var compileRuleTemplate = mustTemplate(`load(
// When editing, note that Go and gateway do not use this snippet and have their own local version
var compileArgsForwardingSnippet = `**{
k: v for (k, v) in kwargs.items()
if k in proto_compile_attrs.keys()
or k in bazel_build_rule_common_attrs
}, # Forward args`
k: v
or (k, v) in kwargs.items()
if k in proto_compile_attrs.keys() or
k in bazel_build_rule_common_attrs
} # Forward args`
var libraryArgsForwardingSnippet = `**{
k: v for (k, v) in kwargs.items()
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
}, # Forward Bazel common args`
} # Forward Bazel common args`
var protoWorkspaceTemplate = mustTemplate(`load("@rules_proto_grpc//{{ .Lang.Dir }}:repositories.bzl", rules_proto_grpc_{{ .Lang.Name }}_repos = "{{ .Lang.Name }}_repos")

View File

@ -35,8 +35,8 @@ def {{ .Rule.Name }}(name, **kwargs):
**{
k: v
for (k, v) in kwargs.items()
if (k in proto_compile_attrs.keys() and k != "prefix_path")
or k in bazel_build_rule_common_attrs
if (k in proto_compile_attrs.keys() and k != "prefix_path") or
k in bazel_build_rule_common_attrs
} # Forward args
)
`

View File

@ -40,8 +40,8 @@ def {{ .Rule.Name }}(name, **kwargs):
**{
k: v
for (k, v) in kwargs.items()
if (k in proto_compile_attrs.keys() and k != "prefix_path")
or k in bazel_build_rule_common_attrs
if (k in proto_compile_attrs.keys() and k != "prefix_path") or
k in bazel_build_rule_common_attrs
} # Forward args
)