fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
ffe8eff0
patching
1"""Helper that wraps --proto_compiler into a ProtoLangToolchainInfo for backwards 2compatibility with --noincompatible_enable_proto_toolchain_resolution. 3 4Borrowed from https://github.com/bazelbuild/rules_go/pull/3919 5""" 6 7load ( 8"@rules_proto//proto:proto_common.bzl" , 9"ProtoLangToolchainInfo" , 10) 11 12def _legacy_proto_toolchain_impl ( ctx ): 13return [ 14ProtoLangToolchainInfo ( 15proto_compiler = ctx . attr . _protoc . files_to_run , 16), 17] 18 19legacy_proto_toolchain = rule ( 20implementation = _legacy_proto_toolchain_impl , 21attrs = { 22"_protoc" : attr . label ( 23cfg = "exec" , 24default = configuration_field ( fragment = "proto" , name = "proto_compiler" ), 25), 26}, 27fragments = [ "proto" ], 28)