From 35b8fe914c99478071ca1a473987f585fd62e0f0 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 15 Dec 2024 13:55:56 +0100 Subject: [PATCH] Prepare for `--incompatible_struct_has_no_methods` switch (#406) --- 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(