Skip to content

Commit

Permalink
Change dash to underscore in generated filenames
Browse files Browse the repository at this point in the history
The generated rust code for my-file.proto is in my_file.rs.
Declared outputs for _proto and _grpc rules should reflect this.
  • Loading branch information
mjduijn authored and Maarten Duijn committed Jan 2, 2019
1 parent 84aa676 commit 6b4f906
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proto/toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6b4f906

Please sign in to comment.