XTypes compatibility workarounds#2333
Merged
eboasson merged 3 commits intoeclipse-cyclonedds:masterfrom Jan 7, 2026
Merged
Conversation
These are invalid per the spec. However, Cyclone 0.9 got that wrong, as do some other implementations. Thus there is an option to allow them. Signed-off-by: Erik Boasson <eb@ilities.com>
c3f132a to
b87357c
Compare
dpotman
approved these changes
Jan 7, 2026
Contributor
dpotman
left a comment
There was a problem hiding this comment.
Looks good. Just one tiny detail: the symbol export check is failing because ddsi_typeid_compare_assignability_check is not in symbol_export.c
Signed-off-by: Erik Boasson <eb@ilities.com>
Some vendors provide broken type information or type lookup replies, or they do it properly but run into Cyclone's limited type lookup implementation. This commit adds an option to completely ignore the "type information" parameter in discovery from specified vendors. If you know that matching on type name is equivalent to performing the assignability check in the system, this can save the day. The direct reason is I could not find a decent workaround for various problems with the Fast-DDS version used by ROS2 late 2025 (commit 33bb952a0e80e2b158571cb2d64ed6b2003609db on the 3.2.x branch), which set TRY_CONSTRUCT incorrectly on collection elements and responded to type lookup requests for a minimal type with a complete type but without the required complete-to-minimal identifier mapping and so any attempt at converting from a complete type object to a minimal will fail. The latter could be mitigated by switching to using complete type objects for assignability checks if the response to a request for a minimal type object was a complete type object and properly loading dependent types. Those are valuable improvements, but bring their own complications. It also turns out that Fast-DDS didn't request the types from Cyclone, and therefore can't be performing the assignability check to begin with. All-in-all adding a setting to ignore the TYPE_INFORMATION is a pragmatic choice to get things working. Signed-off-by: Erik Boasson <eb@ilities.com>
b87357c to
319dadb
Compare
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.
This fixes a bug in TypeObject validation by rejecting cases where "try construct" is set to 0, which is undefined. Originally Cyclone itself had this bug, but that's been fixed for several years. This changes the validation code to reject the invalid setting, but it does provide an option to accept it for compatibility with that ancient version as well as with other broken implementations.
It also turns out that type lookup is problematic with some other implementations. If all types are assignable (the normal case), then ignoring the "type information" part of the discovery data altogether (and falling back to name-based type matching) can help. So this also adds an option for that.
The latter definitely makes a big difference in letting Cyclone and Fast-DDS interoperate in the ROS 2 test suite.