Skip to content

Export ROS_VERSION as 2#187

Closed
jspricke wants to merge 1 commit intoros2:ros2from
jspricke:export_ros_version
Closed

Export ROS_VERSION as 2#187
jspricke wants to merge 1 commit intoros2:ros2from
jspricke:export_ros_version

Conversation

@jspricke
Copy link
Copy Markdown

@jspricke jspricke commented Nov 8, 2021

Needed for:

<member_of_group condition="$ROS_VERSION == 2">

I hope this fixes:

https://build.ros2.org/view/Rbin_uF64/job/Rbin_uF64__plotjuggler_msgs__ubuntu_focal_amd64__binary/73/consoleFull

Needed for:

<member_of_group condition="$ROS_VERSION == 2">
Copy link
Copy Markdown
Member

@nuclearsandwich nuclearsandwich left a comment

Choose a reason for hiding this comment

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

This environment variable is exported as part of the ros_environment package. If a package needs that environment variable at build or runtime it should set the appropriate dependencies in its package.xml on ros_environment.

@jspricke
Copy link
Copy Markdown
Author

jspricke commented Nov 8, 2021

Ah, that was the missing bit, thanks :).

@jspricke jspricke closed this Nov 8, 2021
@jspricke jspricke deleted the export_ros_version branch November 8, 2021 22:03
@nuclearsandwich
Copy link
Copy Markdown
Member

<member_of_group condition="$ROS_VERSION == 2">

@jspricke I think that there's probably more work required to resolve any dependency issues.

Group membership and dependencies are completely unimplemented in bloom and ros_buildfarm. Core ROS 2 packages handle this by manually "exploding" the known group members in packages with group dependencies in the source package.xml so the group dependencies are only used as auxiliary dependencies in colcon workspaces and explicit dependencies are present for the build farm.

Here's an example: https://github.com/ros2/rmw_implementation/blob/0bb811c54eb0138aa20ecbb4494ad0947d834243/rmw_implementation/package.xml#L20-L28

So if there's a dependency resolution failure, depending on ros_environment at build time won't help because bloom will already have resolved the package dependencies. Conditions are supported in bloom but member_of_group and group_depend keys are completely ignored. There are facts and circumstances why this is the case but they're not relevant or easy to change. Fleshing out groups is a project that will likely start before Humble is released but won't be complete enough to be be supported in Humble.

Is there an upstream issue or PR for this build failure that I can contribute to?

@jspricke
Copy link
Copy Markdown
Author

jspricke commented Nov 8, 2021

Is there an upstream issue or PR for this build failure that I can contribute to?

There is none, can you open one here? https://github.com/PlotJuggler/plotjuggler_msgs
(I was only asked to investigate why the build started failing)

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.

2 participants