Update vendored interface packages#423
Merged
esteve merged 3 commits intoros2-rust:mainfrom Nov 15, 2024
Merged
Conversation
This updates the vendor_interfaces.py script to also vendor in the action_msgs and unique_identifier_msgs packages. The script is modified to always use a list of package names rather than hard-coding the package names everywhere.
In case a user enforces clippy linting on these generated packages, silence expected warnings. This is already the case in rclrs, but should be applied directly to the generated packages for the sake of downstream users. The `clippy::derive_partial_eq_without_eq` lint was already being disabled for the packages vendored by rclrs, but is now moved to the rosidl_generator_rs template instead. This is necessary since we always derive the PartialEq trait, but can't necessary derive Eq, and so don't. The `clippy::upper_case_acronyms` is new and was added to account for message type names being upper-case acrynyms, like unique_identifier_msgs::msg::UUID.
This updates the message packages vendored under the rclrs `vendor` module. The vendor_interfaces.py script was used for reproducibility. The existing packages – rcl_interfaces, rosgraph_msgs, and builtin_interfaces – are only modified in that they now use the std::ffi::c_void naming for c_void instead of the std::os::raw::c_void alias and disable certain clippy lints. The action_msgs and unique_identifier_msgs packages are newly added to enable adding action support to rclrs. action_msgs is needed for interaction with action goal info and statuses, and has a dependency on unique_identifier_msgs.
f5ed817 to
7eaf213
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In preparation for
rclrssupporting actions (#410), it will need new dependencies on certain interface packages: specifically,action_msgsand its dependencyunique_identifier_msgs. Sincerclrsis a crate on crates.io and the interface packages are not, they need to be vendored into therclrscode. This PR does so.In the first commit, the
rclrs/vendor_interfaces.pyscript is updated to vendor the above message packages in addition to the existing ones. In the process, the set of vendored packages is collapsed into a single list rather than being repeated throughout the script. Support is also added for packages with anaction.rsfile, though this is not currently used.The second commit silences the
clippy::derive_partial_eq_without_eqandclippy::upper_case_acronymslints in the generated code for interface packages. This was already being done by the vendored packages inrclrs, but was moved torosidl_generator_rsfor the sake of downstream users who may also enforceclippyon them.The third commit is the result of running the updated script on the
installoutput of the desired packages with the latest version of therosidl_generator_rsgenerator. In addition to introducing the new vendored packages, this resulted in some trivial changes to the existing ones: replacingstd::os::raw::c_voidwith its aliasstd::ffi::c_voidand a whitespace change.