From 6b4f9065e73eadd39bc1d90323b4aebae799e868 Mon Sep 17 00:00:00 2001 From: mjduijn Date: Mon, 31 Dec 2018 16:20:48 +0100 Subject: [PATCH] Change dash to underscore in generated filenames The generated rust code for my-file.proto is in my_file.rs. Declared outputs for _proto and _grpc rules should reflect this. --- proto/toolchain.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/toolchain.bzl b/proto/toolchain.bzl index 511baa1536..91b6417837 100644 --- a/proto/toolchain.bzl +++ b/proto/toolchain.bzl @@ -49,7 +49,7 @@ def rust_generate_proto( if not protos: fail("Protobuf compilation requested without inputs!") - paths = ["%s/%s" % (output_dir, file_stem(i)) for i in protos.to_list()] + paths = ["%s/%s" % (output_dir, file_stem(i).replace("-", "_")) for i in protos.to_list()] outs = [ctx.actions.declare_file(path + ".rs") for path in paths] output_directory = outs[0].dirname