Skip to content

Conversation

esteve
Copy link
Collaborator

@esteve esteve commented Aug 11, 2025

This PR removes the examples , to be merged after ros2-rust/examples#6 is resolved.

@mxgrey
Copy link
Collaborator

mxgrey commented Aug 11, 2025

Can I suggest that we just put a workspace Cargo.toml at the root of this repo instead of moving examples into their own repo?

It's much easier to keep the examples in sync with the library when they're collocated.

@esteve
Copy link
Collaborator Author

esteve commented Aug 11, 2025

@mxgrey at first I tried that, but for some reason I couldn't get colcon-cargo to build a rclrs workspace (see colcon/colcon-cargo#65), and following the discussion at #502 (comment) , this would all align (release-plz running, rclrs workspace and mimic rclcpp/rclpy repo structure).

Copy link
Collaborator

@luca-della-vedova luca-della-vedova left a comment

Choose a reason for hiding this comment

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

I agree with Grey's concern, I guess my hope is that if rclrs is on track to be feature complete enough and become "the official" Rust library we could aim at having rclrs examples just be a subfolder of the official examples repo.
@esteve should we clone of the examples into all the distro's repos files so that going forward examples will still be included in rclrs workspaces? That would make it easier to keep things in sync and would make CI fail if a PR broke API but the examples were not updated.
Because of the repo split it will be a bit more churn-y to merge API breakages in both examples and the rclrs library but at least we can catch those.

@mxgrey
Copy link
Collaborator

mxgrey commented Aug 12, 2025

At the working group meeting last night there was a consensus that we all prefer a cargo workspace solution, but we should prioritize the ability to keep releases happening. So we'll move the examples to their own repo for now, with the expectation that we might move them back after the colcon infrastructure is ready to support it.

In the meantime, @luca-della-vedova 's suggestion to add the examples to the .repos file is interesting. My only hesitation is that it's not a strictly necessary member of the colcon workspace. A middle ground could be to simply add a step to the CI that clones the new examples repo.

But if our strongest preference is to have the examples hosted in this repo as siblings of rclrs (making them mandatory workspace members for all users building from source) then it makes perfect sense to also include them in the repos file that we encourage for users who are building from source.

@luca-della-vedova
Copy link
Collaborator

Also happy with a change in the CI to manually clone examples, but as is this introduces potential error surface of introducing breaking changes without fixing the examples

Signed-off-by: Esteve Fernandez <[email protected]>
@esteve
Copy link
Collaborator Author

esteve commented Aug 12, 2025

I actually thought I had added the examples to the repos files 😅, I just pushed a change (34cb2ee) that adds them. My goal is to keep the CI functionally the same, but moving the examples to another repository to avoid the issues with Cargo workspaces.

We can reevaluate later on if we want the examples to be part of the ros2-rust workspace or not when a user clones the repos files, but for now I prefer to not disrupt the dev workflow too much.

@esteve
Copy link
Collaborator Author

esteve commented Aug 13, 2025

@luca-della-vedova thanks for the review!

@esteve esteve merged commit d16172a into ros2-rust:main Aug 13, 2025
13 checks passed
@esteve esteve deleted the remove-examples branch August 13, 2025 09:46
@esteve esteve mentioned this pull request Aug 16, 2025
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