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

The command "cyclonedds typeof" fails to reconstruct the IDL of a derived topic #241

Closed
adrianomarto opened this issue Apr 1, 2024 · 1 comment · Fixed by #243
Closed

Comments

@adrianomarto
Copy link
Contributor

I got a crash whilst running the command "cyclonedds typeof Derived".

Here is the IDL:

module Hierarchy
{
@mutable struct Base
{
string fieldA;
};

struct Derived : Base
{
string fieldB;
};
};

Here is the stack-trace:

Exception in thread Thread-1 (type_discovery):
Traceback (most recent call last):
File "/usr/lib64/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib64/python3.11/site-packages/cyclonedds/tools/cli/discovery/main.py", line 281, in type_discovery
datatype, _ = dynamic.get_types_for_typeid(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/cyclonedds/dynamic.py", line 69, in get_types_for_typeid
return XTInterpreter.xt_to_class(type_id, typemap)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/cyclonedds/idl/_xt_builder.py", line 1458, in xt_to_class
main_type = cls._from_typeid(ident, state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/cyclonedds/idl/_xt_builder.py", line 1503, in _from_typeid
return cls._from_typeobject(ident, state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/cyclonedds/idl/_xt_builder.py", line 1524, in _from_typeobject
return cls._make_complete_struct(ident, complete_obj.struct_type, state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/cyclonedds/idl/_xt_builder.py", line 1592, in _make_complete_struct
struct = make_idl_struct(
^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/cyclonedds/idl/init.py", line 39, in make_idl_struct
bases = tuple(list(*bases) + [IdlStruct])
^^^^^^^^^^^^
TypeError: 'IdlMeta' object is not iterable

@adrianomarto
Copy link
Contributor Author

I created the pull request #242 to demonstrate this issue.

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 a pull request may close this issue.

1 participant