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

Rename message_bounds to include typesupport #475

Merged
merged 1 commit into from
Apr 24, 2020
Merged

Conversation

mjcarroll
Copy link
Member

Based on feedback from API review, addresses inconsistency in naming

Closes #467

Signed-off-by: Michael Carroll michael@openrobotics.org

@mjcarroll
Copy link
Member Author

mjcarroll commented Apr 24, 2020

Test up to rclcpp

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

One minor thing to fix by adding documentation. Otherwise looks good to me and fits the pattern for the other "type support" structures.

struct rosidl_message_bounds_t
struct rosidl_bounds_type_support_t
Copy link
Contributor

Choose a reason for hiding this comment

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

While we are in here, we may as well document what this structure is meant to do, and what the fields are. I know we are missing it from the other "type support" structures, but you gotta start somewhere :).

Copy link
Contributor

Choose a reason for hiding this comment

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

I started here to document these headers and structs #472 . @mjcarroll , it would be greate if you can review it .

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll review, thanks for that @ahcorde

@dirk-thomas
Copy link
Member

Maybe I don't understand well enough how this struct is being used. How is it related to type support? Or to ask more generically what is it defining an upper bound for?

@mjcarroll
Copy link
Member Author

mjcarroll commented Apr 24, 2020

Maybe I don't understand well enough how this struct is being used. How is it related to type support? Or to ask more generically what is it defining an upper bound for?

After looking at it, I realized that the implementation remains incomplete (eg ros2/rmw_connext#346 and ros2/rosidl_typesupport_connext#24), but I can summarize the idea.

It is intended to allow users to pass optional upper bounds for messages with unbounded fields in order to get estimates of serialized sizes and appropriately preallocate them. The idea is that it would be an alternative to using entirely fixed sized or bounded messages, which aren't widely used in the ROS2 ecosystem.

@dirk-thomas
Copy link
Member

It is intended to allow users to pass optional upper bounds for messages with unbounded fields in order to get estimates of serialized sizes and appropriately preallocate them. The idea is that it would be an alternative to using entirely fixed sized or bounded messages, which aren't widely used in the ROS2 ecosystem.

That doesn't sound related to "typesupport" then?

@jacobperron
Copy link
Member

I don't see what was wrong with the original name. From the review ticket:

The naming diverges from all other symbols in this package in terms of not having a common prefix.

So, shouldn't the name have the prefix rosidl_runtime_c_?

I think the name rosidl_runtime_c_message_bounds_t would be fine.

@jacobperron
Copy link
Member

On closer look, it looks like the structs in rosidl_runtime_c have two different naming patterns:

rosidl_runtime_c__<NAME>

or

rosidl_<NAME>_type_support_t

The latter seems more consistent to me for the message bounds structure, as it's contents are similar to the others that follow this pattern 🤷‍♂️

@jacobperron
Copy link
Member

Can we typedef the old name with a deprecation?

@dirk-thomas
Copy link
Member

shouldn't the name have the prefix rosidl_runtime_c_?

👍

I think the name rosidl_runtime_c_message_bounds_t would be fine.

First, it isn't a boundary for messages but sequences. Second, it is a single bound - not multiple. And other symbols like the bound for strings doesn't have the _t suffix.

So the offline discussed proposed name is: rosidl_runtime_c__Sequence__bound.

Based on feedback from API review.

Signed-off-by: Michael Carroll <michael@openrobotics.org>
@mjcarroll
Copy link
Member Author

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@mjcarroll
Copy link
Member Author

Missed pushing rmw_connext, trying with just Linux to save some CI cycles:

  • Linux Build Status

@mjcarroll mjcarroll merged commit bedb525 into master Apr 24, 2020
@delete-merged-branch delete-merged-branch bot deleted the message_bounds_t branch April 24, 2020 20:56
@clalancette
Copy link
Contributor

Approved.

@rotu
Copy link

rotu commented Apr 25, 2020

I think you missed something https://github.com/ros2/rmw_cyclonedds/pull/168/checks?check_run_id=617219521#step:4:5834

I'm sorry CI has been such a mess that it's hard to get actionable intelligence out of. I'm working on improving it.

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.

rename rosidl_message_bounds_t
6 participants