Skip to content

Commit

Permalink
fix: join --descriptor_set_in with host path separator
Browse files Browse the repository at this point in the history
Fixes #670.

As described in #670, protoc splits the arguments to `--proto_path` and `--descriptor_set_in` using an OS-specific path-separator. On posix, this is `:`, but on Windows this is `;`. The protobuf library takes the approach for its bazel rules to join on `ctx.configuration.host_path_separator`, so I've taken the same approach here as well.
  • Loading branch information
willjschmitt authored Aug 11, 2024
1 parent c06bb78 commit 2fa5650
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ts/private/ts_proto_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _protoc_action(ctx, proto_info, outputs):
args.add_joined(["--connect-query_out", ctx.bin_dir.path], join_with = "=")

args.add("--descriptor_set_in")
args.add_joined(proto_info.transitive_descriptor_sets, join_with = ":")
args.add_joined(proto_info.transitive_descriptor_sets, join_with = ctx.configuration.host_path_separator)

args.add_all(proto_info.direct_sources)

Expand Down

0 comments on commit 2fa5650

Please sign in to comment.