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
Fix deprecation warnings for message constants #750
Fix deprecation warnings for message constants #750
Conversation
Fixes ros2#743 This patch fixes two issues: 1. Code generation for `rosidl_typesupport_introspection_cpp` was overriding user-provided compile definitons, hiding the `-Wdeprecated` warnings in generated code, that users did see in `rosidl_typesupport_fastrtps_cpp`, which was not overriding those compile flags. This inconsistent result confused the issue of why we were seeing deprecation warnings in some portion of the build but not others 1. `#ifdef`s out a variable definition for message constant members that is now deprecated in C++17. In C++14 it was still necessary to define a `static constexpr` member variable outside the class, but as of C++17 those `static constexpr` vars are now automatically inlined so the declaration and definiton are the same line, making the external definition redundant. Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
d5f3921
to
90f4b61
Compare
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.
Thanks for tracking this down! This looks good to me with green CI. I'll also suggest that once we merge this and ros2/rosidl_typesupport_fastrtps#102 , we do a more-or-less immediate release into Rolling just to make sure there isn't any fallout from them. I can help with that.
Pulls: #750, ros2/rosidl_typesupport#145, ros2/rosidl_typesupport_fastrtps#102 |
OK - now it's just the |
@Mergifyio backport iron humble |
❌ Command disallowed due to command restrictions in the Mergify configuration.
|
@Mergifyio backport iron humble |
✅ Backports have been created
|
Fixes #743 This patch fixes two issues: 1. Code generation for `rosidl_typesupport_introspection_cpp` was overriding user-provided compile definitons, hiding the `-Wdeprecated` warnings in generated code, that users did see in `rosidl_typesupport_fastrtps_cpp`, which was not overriding those compile flags. This inconsistent result confused the issue of why we were seeing deprecation warnings in some portion of the build but not others 1. `#ifdef`s out a variable definition for message constant members that is now deprecated in C++17. In C++14 it was still necessary to define a `static constexpr` member variable outside the class, but as of C++17 those `static constexpr` vars are now automatically inlined so the declaration and definiton are the same line, making the external definition redundant. Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com> (cherry picked from commit 1228f54)
Fixes #743 This patch fixes two issues: 1. Code generation for `rosidl_typesupport_introspection_cpp` was overriding user-provided compile definitons, hiding the `-Wdeprecated` warnings in generated code, that users did see in `rosidl_typesupport_fastrtps_cpp`, which was not overriding those compile flags. This inconsistent result confused the issue of why we were seeing deprecation warnings in some portion of the build but not others 1. `#ifdef`s out a variable definition for message constant members that is now deprecated in C++17. In C++14 it was still necessary to define a `static constexpr` member variable outside the class, but as of C++17 those `static constexpr` vars are now automatically inlined so the declaration and definiton are the same line, making the external definition redundant. Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com> (cherry picked from commit 1228f54)
Fix deprecation warnings for message constants (backport #750)
Fix deprecation warnings for message constants (backport #750)
Fixes #743
This patch fixes two issues:
rosidl_typesupport_introspection_cpp
was overriding user-provided compile definitons, hiding the-Wdeprecated
warnings in generated code, that users did see inrosidl_typesupport_fastrtps_cpp
, which was not overriding those compile flags. This inconsistent result confused the issue of why we were seeing deprecation warnings in some portion of the build but not others#ifdef
s out a variable definition for message constant members that is now deprecated in C++17. In C++14 it was still necessary to define astatic constexpr
member variable outside the class, but as of C++17 thosestatic constexpr
vars are now automatically inlined so the declaration and definiton are the same line, making the external definition redundant.