Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify rosidl version dependency in CMake #851

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from

Conversation

Ryanf55
Copy link

@Ryanf55 Ryanf55 commented Mar 7, 2025

Avoid annoying issues when you accidentally mix up versions of ROS 2. Jazzy accidentally pulling in humble packages due to docker cache issues cause us a world of hurt when rosidl is built with mixed distros. This is also common when working in vcs and one of the repos fails to switch branches without you noticing.

A trivial change like this allows us to catch it at configure time.

Sponsored by AeroVironment, Inc.

Signed-off-by: Ryan Friedman <[email protected]>
@Ryanf55 Ryanf55 force-pushed the specify-rosidl-version-dependency branch from 9011ad7 to 2feec38 Compare March 7, 2025 00:53
Copy link

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

out of curiosity.

Jazzy accidentally pulling in humble packages due to docker cache issues cause us a world of hurt

how come this could happen? Jazzy is for Noble, and Humble is for Jammy, this can be managed under ubuntu codename via apt-repository?

on the same ubuntu codename, we can see the same packages with different distro. (for example, ros-humble-demo-nodes-cpp, ros-iron-demo-nodes-cpp and ros-rolling-demo-nodes-cpp)

@Ryanf55
Copy link
Author

Ryanf55 commented Mar 7, 2025

As I mentioned, there's two ways this happens.

Docker caching done poorly, or vcs failing to update image tags. It's a pretty regular occurrence for me working on a mixed distribution product team and frequently needing to switch environments with flaky development workflows. Anything that can be done that makes problems like this immediately obvious is extremely helpful. It's exacerbated in ROSIDL because we have a few forks from unmerged ROSIDL features.

This has no negative effect on current users, and only a slight increase in maintenance, however a large potential benefit for people like me.

@christophebedard
Copy link
Member

Would using version constraints in package.xml files work? https://ros.org/reps/rep-0149.html#dependency-tags

@Ryanf55
Copy link
Author

Ryanf55 commented Mar 10, 2025

No, if you have a different version installed than required by rosdep, and only run colcon build, it won't be caught by colcon/CMake.

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