eclipse-cyclonedds / eclipse-cyclonedds/cyclonedds-python
Generated Python code is not interoperable when a union contains a member called "value"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 110
- Forks
- 68
- Avg merge
- 1h 8m
- Merged PRs (30d)
- 1
Description
When using an IDL file which defines a union, which contains a member called "value" - the generated python code is no longer interoperable with other language implementations.
For example:
module AddressSpace {
union QualifiedName switch (boolean) {
case TRUE:
string value;
};
struct Node {
long node_id;
QualifiedName browse_name;
string display_name;
};
};
I used this IDL as a replacement for the "hello world" examples in both the python and C repositories (C acting as the publisher, python as the subscriber). With the IDL file exactly as above, the publisher never matches with a reader. Simply changing the above IDL file to replace the "value" member with something else (say, for example "the_value"), and regenerating the C and python code - causes everything to work as expected.
I am also aware of the @optional IDL syntax - but unfortunately cannot use it in this case.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the provided QualifiedName IDL in the Python and C hello-world examples. Compare the generated code and wire behavior for a union member named value versus the_value. Done means the publisher and reader match and communicate successfully with value unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100