-
Notifications
You must be signed in to change notification settings - Fork 791
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
Fix complex member printing for DynamicDataHelper #2957
Fix complex member printing for DynamicDataHelper #2957
Conversation
Signed-off-by: Will Stott <willstott101@gmail.com>
Signed-off-by: methylDragon <methylDragon@gmail.com>
Signed-off-by: methylDragon <methylDragon@gmail.com>
I'm not sure why the tests are failing, they're nowhere close to what this PR has edited Probably flaky tests? |
Yes, those tests fail from time to time and are not related to this PR. Before we review, would you mind adding the changes from #2827, so we merge and backport both at the same time? |
…int' into ch3/hotfix-dynamic-data-helper
Merge conflicts fixed. |
@richiprosima Please test this |
@methylDragon Would you mind fixing the warnings on windows? |
Signed-off-by: methylDragon <methylDragon@gmail.com>
Let's try this df44d8c |
@richiprosima please test this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @methylDragon !
CH3EERS! I can't merge because I don't have write access 😬 |
@Mergifyio backport 2.7.x 2.6.x |
* DynamicDataHelper::print can print Sequences as well as Arrays Signed-off-by: Will Stott <willstott101@gmail.com> * Fix complex member printing Signed-off-by: methylDragon <methylDragon@gmail.com> * Clean up prints Signed-off-by: methylDragon <methylDragon@gmail.com> * Fix FastDDS windows CI error Signed-off-by: methylDragon <methylDragon@gmail.com> Signed-off-by: methylDragon <methylDragon@gmail.com> Co-authored-by: Will Stott <willstott101@gmail.com> (cherry picked from commit 78473a0)
* DynamicDataHelper::print can print Sequences as well as Arrays Signed-off-by: Will Stott <willstott101@gmail.com> * Fix complex member printing Signed-off-by: methylDragon <methylDragon@gmail.com> * Clean up prints Signed-off-by: methylDragon <methylDragon@gmail.com> * Fix FastDDS windows CI error Signed-off-by: methylDragon <methylDragon@gmail.com> Signed-off-by: methylDragon <methylDragon@gmail.com> Co-authored-by: Will Stott <willstott101@gmail.com> (cherry picked from commit 78473a0) # Conflicts: # src/cpp/dynamic-types/DynamicDataHelper.cpp
✅ Backports have been created
|
* Fix complex member printing for DynamicDataHelper (#2957) * DynamicDataHelper::print can print Sequences as well as Arrays Signed-off-by: Will Stott <willstott101@gmail.com> * Fix complex member printing Signed-off-by: methylDragon <methylDragon@gmail.com> * Clean up prints Signed-off-by: methylDragon <methylDragon@gmail.com> * Fix FastDDS windows CI error Signed-off-by: methylDragon <methylDragon@gmail.com> Signed-off-by: methylDragon <methylDragon@gmail.com> Co-authored-by: Will Stott <willstott101@gmail.com> (cherry picked from commit 78473a0) # Conflicts: # src/cpp/dynamic-types/DynamicDataHelper.cpp * Fix conflict Co-authored-by: methylDragon <methylDragon@gmail.com> * Fixing linters Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> Co-authored-by: methylDragon <methylDragon@gmail.com> Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
Description
This is a bugfix for the
DynamicDataHelper
, needed for a dynamic types and type introspection reference implementation for ROS 2 as proposed in REP 2011.The printing methods for the helper segfault on attempting to print sequences of nested structs. This is because the
print_complex_member()
function uses the wrongDynamicData*
. With the changes that this PR introduces, the segfaults disappear.Additionally, this PR also cleans up the printing and adds useful tags for complex types.
Also, the
DynamicDataHelper
still has other bugs that are not addressed by this PR. Namely printing of dynamic sequences, which is addressed in #2827 .I've tested that PR, and it's ready to merge, despite being listed as DRAFT. The REP reference implementation would be expedited if that PR was also merged.
PS: There are no tests for
DynamicDataHelper
, so I'm not implementing any in this PR.Suitable Backports
@Mergifyio backport (branch/2.7.x)
@Mergifyio backport (branch/2.6.x)
Maybe more...
Example
The following is an example printout of a triply nested DynamicData instance printed with this PR's fixes.
Contributor Checklist
versions.md
file (if applicable).Reviewer Checklist