Skip to content

Conversation

esteve
Copy link
Collaborator

@esteve esteve commented Aug 13, 2025

This PR vendorizes the example_interfaces and test_msgs packages so that cargo update can work during the release-plz job (see https://github.com/ros2-rust/ros2_rust/actions/runs/16942715079/job/48016392561)

esteve added 5 commits August 13, 2025 18:30
Signed-off-by: Esteve Fernandez <[email protected]>
Signed-off-by: Esteve Fernandez <[email protected]>
@esteve esteve requested review from maspe36 and jhdcs August 14, 2025 14:42
@esteve esteve marked this pull request as ready for review August 14, 2025 14:42
@@ -159,17 +159,17 @@ where
/// signatures and which returns a `()` (a.k.a. nothing).
/// ```
/// # use rclrs::*;
/// # use rclrs::vendor::test_msgs::srv::{Empty, Empty_Request, Empty_Response};
/// # use crate::rclrs::vendor::test_msgs;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused about the leading crate:: here since I thought doctests give a compilation error when you do use crate::. But I guess if the tests are passing then 🤷

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we even need crate::. Locally, doctests seem to be passing with out it

Copy link
Collaborator

@mxgrey mxgrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it makes you feel any better about the vendoring, r2r is currently vendoring many more interface packages than we are: https://docs.rs/r2r/latest/r2r/#modules

Since the only interface packages we're adding here are for examples and tests, I don't think there's any substantial risk that users will run into the diamond dependency problem with them, the way they currently do with builtin_interfaces::msg::Time. So I don't think this PR will make the vendoring problem any worse.

@esteve
Copy link
Collaborator Author

esteve commented Aug 15, 2025

@mxgrey thanks for the review. I'd really like to find a different path, but for now it is what it is and vendorizing the messages gets the job done. We might end up just uploading all the standard messages to crates.io, each as a separate crate, perhaps that could pave the way for the different Rust bindings to iteroperate.

@@ -189,7 +193,7 @@ mod service;
mod subscription;
mod time;
mod time_source;
mod vendor;
pub mod vendor;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this needs to be pub because doctest only links to public stuff... Jeez, I can see this causing some confusion. I think we need to re-evaluate our message consumption more and more everyday 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, and I had to modify the vendorize script to not complain about missing docs for messages because now they are public 😅

@@ -159,17 +159,17 @@ where
/// signatures and which returns a `()` (a.k.a. nothing).
/// ```
/// # use rclrs::*;
/// # use rclrs::vendor::test_msgs::srv::{Empty, Empty_Request, Empty_Response};
/// # use crate::rclrs::vendor::test_msgs;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we even need crate::. Locally, doctests seem to be passing with out it

@esteve esteve merged commit 75cd88e into ros2-rust:main Aug 15, 2025
9 checks passed
@esteve esteve deleted the vendorize-messages branch August 15, 2025 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants