From 9605c7093c269a4767b9c4a57e2ca021c725644d Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 19 Jul 2019 00:46:17 +0200 Subject: Revert previous fix - to_list() is too new, or...? --- bazel/upb_proto_library.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bazel') diff --git a/bazel/upb_proto_library.bzl b/bazel/upb_proto_library.bzl index d62770b..ab8b409 100644 --- a/bazel/upb_proto_library.bzl +++ b/bazel/upb_proto_library.bzl @@ -175,7 +175,7 @@ def _upb_proto_rule_impl(ctx): "_WrappedGeneratedSrcsInfo (aspect should have handled this).") cc_info = dep[_WrappedCcInfo].cc_info srcs = dep[_WrappedGeneratedSrcsInfo].srcs - lib = cc_info.linking_context.libraries_to_link.to_list()[0] + lib = cc_info.linking_context.libraries_to_link[0] files = _filter_none([ lib.static_library, lib.pic_static_library, -- cgit v1.2.3 From 6e85c2bf036c4a18a45224dd9d929ab3639e67f3 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Mon, 22 Jul 2019 22:25:13 +0200 Subject: Fixing the separator string. --- bazel/upb_proto_library.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bazel') diff --git a/bazel/upb_proto_library.bzl b/bazel/upb_proto_library.bzl index ab8b409..528d34b 100644 --- a/bazel/upb_proto_library.bzl +++ b/bazel/upb_proto_library.bzl @@ -159,7 +159,7 @@ def _compile_upb_protos(ctx, proto_info, proto_sources, ext): arguments = [ "--upb_out=" + _get_real_root(srcs[0]), "--plugin=protoc-gen-upb=" + ctx.executable._upbc.path, - "--descriptor_set_in=" + ":".join([f.path for f in transitive_sets]), + "--descriptor_set_in=" + ctx.configuration.host_path_separator.join([f.path for f in transitive_sets]), ] + [_get_real_short_path(file) for file in proto_sources], progress_message = "Generating upb protos for :" + ctx.label.name, -- cgit v1.2.3 From a2013f0fc21300768b87714d8a4db0a5cd845028 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 23 Jul 2019 00:05:43 +0200 Subject: Trying to be more flexible with the version of bazel we can use here. --- bazel/upb_proto_library.bzl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bazel') diff --git a/bazel/upb_proto_library.bzl b/bazel/upb_proto_library.bzl index 528d34b..cc6bcff 100644 --- a/bazel/upb_proto_library.bzl +++ b/bazel/upb_proto_library.bzl @@ -175,7 +175,10 @@ def _upb_proto_rule_impl(ctx): "_WrappedGeneratedSrcsInfo (aspect should have handled this).") cc_info = dep[_WrappedCcInfo].cc_info srcs = dep[_WrappedGeneratedSrcsInfo].srcs - lib = cc_info.linking_context.libraries_to_link[0] + if (type(cc_info.linking_context.libraries_to_link) == "list"): + lib = cc_info.linking_context.libraries_to_link[0] + else: + lib = cc_info.linking_context.libraries_to_link.to_list()[0] files = _filter_none([ lib.static_library, lib.pic_static_library, -- cgit v1.2.3