Skip to content

Commit

Permalink
refactor: simplify toolchain registration
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed May 17, 2024
1 parent 3e3836a commit 8f059aa
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions examples/lang_toolchains/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,13 @@ proto_lang_toolchain(
command_line = "--python_out=%s",
progress_message = "Generating Python proto_library %{label}",
runtime = "@pypi//protobuf",
toolchain_type = "@rules_python//python/proto:toolchain_type",
)

proto_lang_toolchain(
name = "protoc_java_toolchain",
command_line = "--java_out=%s",
progress_message = "Generating Java proto_library %{label}",
runtime = "@protobuf-java_3_25_3//jar",
)

# Adapters to the register_toolchains call, adding the toolchain_type to above
toolchain(
name = "protoc_py_toolchain.registration",
toolchain = ":protoc_py_toolchain",
toolchain_type = "@rules_python//python/proto:toolchain_type",
)

toolchain(
name = "protoc_java_toolchain.registration",
toolchain = ":protoc_java_toolchain",
toolchain_type = "@rules_java//java/proto:toolchain_type",
)

0 comments on commit 8f059aa

Please sign in to comment.