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

Feature to show deprecation warning for msg/srv #35

Open
wants to merge 1 commit into
base: indigo-devel
Choose a base branch
from

Conversation

wkentaro
Copy link

@wkentaro wkentaro commented May 14, 2018

Depends on ros/genmsg#76

Why?

See ros/genmsg#76

Example

Warnings   << pcl_msgs:make /home/wkentaro/Documents/catkin_wss/genmsg/logs/pcl_msgs/build.make.003.log
In file included from /home/wkentaro/Documents/catkin_wss/genmsg/src/pcl_msgs/src/example.cpp:2:0:
/home/wkentaro/Documents/catkin_wss/genmsg/devel/include/pcl_msgs/Vertices.h:19:2: warning: #warning "ROS message pcl_msgs/Vertices.msg is deprecated. Please stop using it." [-Wcpp]
 #warning "ROS message pcl_msgs/Vertices.msg is deprecated. Please stop using it."
  ^
In file included from /home/wkentaro/Documents/catkin_wss/genmsg/devel/include/pcl_msgs/UpdateFilename.h:11:0,
                 from /home/wkentaro/Documents/catkin_wss/genmsg/src/pcl_msgs/src/example.cpp:3:
/home/wkentaro/Documents/catkin_wss/genmsg/devel/include/pcl_msgs/UpdateFilenameRequest.h:19:2: warning: #warning "ROS message pcl_msgs/UpdateFilenameRequest.msg is deprecated. Please stop using it." [-Wcpp]
 #warning "ROS message pcl_msgs/UpdateFilenameRequest.msg is deprecated. Please stop using it."
  ^
In file included from /home/wkentaro/Documents/catkin_wss/genmsg/devel/include/pcl_msgs/UpdateFilename.h:12:0,
                 from /home/wkentaro/Documents/catkin_wss/genmsg/src/pcl_msgs/src/example.cpp:3:
/home/wkentaro/Documents/catkin_wss/genmsg/devel/include/pcl_msgs/UpdateFilenameResponse.h:19:2: warning: #warning "ROS message pcl_msgs/UpdateFilenameResponse.msg is deprecated. Please stop using it." [-Wcpp]
 #warning "ROS message pcl_msgs/UpdateFilenameResponse.msg is deprecated. Please stop using it."
  ^
In file included from /home/wkentaro/Documents/catkin_wss/genmsg/src/pcl_msgs/src/example.cpp:3:0:
/home/wkentaro/Documents/catkin_wss/genmsg/devel/include/pcl_msgs/UpdateFilename.h:14:2: warning: #warning "ROS service pcl_msgs/UpdateFilename.srv is deprecated. Please stop using it." [-Wcpp]
 #warning "ROS service pcl_msgs/UpdateFilename.srv is deprecated. Please stop using it."
  ^
cd /home/wkentaro/Documents/catkin_wss/genmsg/build/pcl_msgs; catkin build --get-env pcl_msgs | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
...............................................................................................................................................................................................
Finished  <<< pcl_msgs                          [ 3.1 seconds ]
[build] Summary: All 8 packages succeeded!
[build]   Ignored:   8 packages were skipped or are blacklisted.
[build]   Warnings:  1 packages succeeded with warnings.
[build]   Abandoned: None.
[build]   Failed:    None.

@# Deprecation Warning
@##############################
@[if is_deprecated]@
#warning "ROS message @(spec.package)/@(spec.short_name).msg is deprecated. Please stop using it."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning doesn't provide any helpful context to users what they should do instead.

Also there is no way to suppress the warning.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you agree with adding a deprecation message interface to genmsg?

Also there is no way to suppress the warning.

If it is necessary, I suggest below:

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcpp"
#include <a_pkg/DEPRECATED_HEADER.h>
#pragma GCC diagnostic pop

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 this pull request may close these issues.

None yet

2 participants