-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update xtypes #113
Update xtypes #113
Conversation
MiguelBarro
commented
Jan 16, 2023
- Fix errors associated to peg library improvements
- Provide windows OS support
- Update ci
9fd6d40
to
fb63906
Compare
…orm dependent. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
…bjects. Fixes issue #105 Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
f83752d
to
2a6168a
Compare
I just tried to replicate the issue and was unable to. Now that I am thinking about it, it is possible I had a dirty build environment (where old version of xtypes was being used amongst new versions). I will do some more tests with my code base running new xtypes. |
Signed-off-by: laura-eprosima <laura@eprosima.com>
Signed-off-by: laura-eprosima <laura@eprosima.com>
Signed-off-by: laura-eprosima <laura@eprosima.com>
b22286e
to
8565e03
Compare
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
8565e03
to
f7be0a3
Compare
Signed-off-by: laura-eprosima <laura@eprosima.com>
Will this PR be merged into main when approved, or are there more pending work? I'm eager to test the library (from main). |
That's the idea ... whenever we can spare a reviewer. Meanwhile, I will introduce some bugfix from time to time because I'm working on dependent repos. |
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>
tools/idl_validator.cpp
Outdated
context.include_paths.push_back("/opt/ros/foxy/share/"); | ||
|
||
// Introduce current ros2 paths | ||
std::string distro(std::getenv("ROS_DISTRO")); |
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.
If the environment variable is undefined, std::getenv
returns a null pointer. The std::string
constructor throws a std::logic_error
instead of the graceful exit message. Suggest const char* distro = std::getenv("ROS_DISTRO");
, check for null pointer and construct distro string in else .. + std::string(distro) +..
.
Is the xtypes_idl_validator
only intended for ROS? The current implementation demands ROS_DISTRO
to be defined.
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.
Got me! I turns out that construct a std::string
from nullptr
is undefined behavior. On MSVC leads to an empty string and in gcc a std::logic_error
is raised. Crossplatform pitfalls 🙄.
We only used xtypes_idl_validator
in an Integration-Service ROS2-SH related project. It is interesting for us to fail without a ROS2 overlay. But is a good hint too. Let's turn it into a warning.
Signed-off-by: Miguel Barro <miguelbarro@eprosima.com>