ros2_rust icon indicating copy to clipboard operation
ros2_rust copied to clipboard

Depending on RCLRS with the `serde` feature fails to compile

Open S3ckShUn21 opened this issue 4 months ago • 2 comments

Bug Report

It looks like a couple of the autogenerated vendor bindings in rclrs/src/vendor have been improperly generated.

Both example_interfaces/action.rs and test_msgs/action.rs have multiple definitions of the

use serde::{Deserialize, Serialize};

After deleting the second copy of that line within both files, my binary compiled just fine.

Environment

  • Arch: x86_64
  • OS: Ubuntu 24.04.2LTS
  • ROS: ROS2 Jazzy
  • rclrs commit: 3c706a2207cbba415
  • I'm declaring the dependency on rlcrs with rclrs = { version = "*", features = ["serde"] }

S3ckShUn21 avatar Sep 05 '25 21:09 S3ckShUn21

Thanks for reporting this. I've opened some PRs to fix this problem:

  • https://github.com/ros2-rust/rosidl_rust/pull/9
  • https://github.com/ros2-rust/ros2_rust/pull/538

mxgrey avatar Oct 10 '25 08:10 mxgrey

@S3ckShUn21 thanks for the report, could you try again? I've merged both of @mxgrey 's PRs (thanks!)

esteve avatar Oct 13 '25 11:10 esteve