Skip to content

Commit 8f059aa

Browse files
committed
refactor: simplify toolchain registration
1 parent 3e3836a commit 8f059aa

File tree

1 file changed

+1
-12
lines changed
  • examples/lang_toolchains

1 file changed

+1
-12
lines changed

examples/lang_toolchains/BUILD

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,13 @@ proto_lang_toolchain(
66
command_line = "--python_out=%s",
77
progress_message = "Generating Python proto_library %{label}",
88
runtime = "@pypi//protobuf",
9+
toolchain_type = "@rules_python//python/proto:toolchain_type",
910
)
1011

1112
proto_lang_toolchain(
1213
name = "protoc_java_toolchain",
1314
command_line = "--java_out=%s",
1415
progress_message = "Generating Java proto_library %{label}",
1516
runtime = "@protobuf-java_3_25_3//jar",
16-
)
17-
18-
# Adapters to the register_toolchains call, adding the toolchain_type to above
19-
toolchain(
20-
name = "protoc_py_toolchain.registration",
21-
toolchain = ":protoc_py_toolchain",
22-
toolchain_type = "@rules_python//python/proto:toolchain_type",
23-
)
24-
25-
toolchain(
26-
name = "protoc_java_toolchain.registration",
27-
toolchain = ":protoc_java_toolchain",
2817
toolchain_type = "@rules_java//java/proto:toolchain_type",
2918
)

0 commit comments

Comments
 (0)