Open sluongng opened 1 year ago
Discussing this repo with @steeve and it seems like we should be able to make our ProtocGenPbjs action setup a less complicated by re-using Bazel's proto_common.compile().
ProtocGenPbjs
proto_common.compile()
Some usage examples from Steeve:
bin.protoc_gen_ts_binary( name = "protoc_gen_ts", env = {"BAZEL_BINDIR": "$(BINDIR)"}, chdir = package_name(), visibility = ["//visibility:public"], ) proto_lang_toolchain( name = "toolchain", blacklisted_protos = [], command_line = "--ts_out=add_pb_suffix,output_javascript:$(OUT)", plugin_format_flag = "--plugin=protoc-gen-ts=%s", plugin = ":protoc_gen_ts", visibility = ["//visibility:public"], )
Usage in rule definition
proto_common.compile( actions = ctx.actions, proto_info = proto_info, proto_lang_toolchain_info = toolchain, generated_files = output_sources, plugin_output = plugin_output, )
Related thread: https://groups.google.com/g/protobuf/c/c4Tmvxt_m4g
Discussing this repo with @steeve and it seems like we should be able to make our
ProtocGenPbjs
action setup a less complicated by re-using Bazel'sproto_common.compile()
.Some usage examples from Steeve:
Usage in rule definition