From c3a9932c6e328e3d1f31666656379c13e78b07fc Mon Sep 17 00:00:00 2001 From: maleo Date: Fri, 13 Dec 2024 13:05:14 +0000 Subject: [PATCH] Prepare for --incompatible_struct_has_no_methods switch --- ros2/interfaces.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ros2/interfaces.bzl b/ros2/interfaces.bzl index 1ff2558f..ff0bd5f0 100644 --- a/ros2/interfaces.bzl +++ b/ros2/interfaces.bzl @@ -96,7 +96,7 @@ def _run_adapter(ctx, package_name, srcs): adapter_arguments_file = ctx.actions.declare_file( "{}/rosidl_adapter_args.json".format(package_name), ) - ctx.actions.write(adapter_arguments_file, adapter_arguments.to_json()) + ctx.actions.write(adapter_arguments_file, json.encode(adapter_arguments)) adapter_map = ctx.actions.declare_file( "{}/rosidl_adapter_map.idls".format(package_name), ) @@ -192,7 +192,7 @@ def run_generator( template_dir = generator_templates[0].dirname, target_dependencies = [], # TODO(mvukov) Do we need this? ) - ctx.actions.write(generator_arguments_file, generator_arguments.to_json()) + ctx.actions.write(generator_arguments_file, json.encode(generator_arguments)) generator_cmd_args = ctx.actions.args() generator_cmd_args.add(