From 2fa56504410c9e2bf4d020874e716f64be4c08d4 Mon Sep 17 00:00:00 2001 From: Will Schmitt Date: Sun, 11 Aug 2024 13:52:58 -0700 Subject: [PATCH] fix: join `--descriptor_set_in` with host path separator 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. --- ts/private/ts_proto_library.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/private/ts_proto_library.bzl b/ts/private/ts_proto_library.bzl index ccd08927..77884c77 100644 --- a/ts/private/ts_proto_library.bzl +++ b/ts/private/ts_proto_library.bzl @@ -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)