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
Implement @optional annotation #4364
base: master
Are you sure you want to change the base?
Conversation
@tmayoff Others have expressed interest in moving this PR forward and contributing to it. From your perspective, what else is left to do and/or what would help you the most (advice, guidance, code, design, etc.)? |
For the most part I believe the code generation is all there, types should all be wrapped and accessed in an std::optional. Right now the tests are failing but I think they might not be setup properly, I'm not sure how to deal with this, and the pub/subs are segfaulting due to not being able to get a domain participant. After this fixing the tests, I think it's just dealing with edge cases and/or anything related to the MPC builds or compilers without support, like these errors |
Looks like it's missing DDS_ROOT in the environment based on this line in the log:
|
From this conversation, how can I skip the optional tests in MPC for compilers that don't support C++17 |
Could someone give some pointers to help fix the new CI failures after that merge, it's all the KeyOnly_ tests |
I'll take a look at it. |
@tmayoff It looks like you had some typos when merging. |
@@ -0,0 +1,10 @@ | |||
############### |
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.
This needs to be updated with an actual description.
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.
It was previously mentioned that it might be better to move these tests to the xcdr test, but can't directly as it doesn't require C++17. If the tests don't need to be moved in this PR I can add a description and maybe a note to move the tests another time
}; | ||
|
||
@appendable | ||
struct OptionalMembers { | ||
boolean bool_field; |
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.
should boolean
be optional?
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.
This was originally added to debug some issues with a struct with both optional and non-optional members, but can be made optional now.
Once #4632 is merged, we can take out a lot of the workarounds for C++17 and move the tests. |
This is the first part of my adding support for the
@optional
annotation, this PR will not contain a custom implementation of optional for older compilers.