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 #76

Open
wants to merge 2 commits into
base: kinetic-devel
Choose a base branch
from

Conversation

wkentaro
Copy link

@wkentaro wkentaro commented May 14, 2018

Close #67

Why?

I needed to remove or migrate some messages/services from packages, and I'd like to show deprecation warning for users. This PR enables that feature.

Usage

add_message_files(
  DEPRECATED
  DIRECTORY msg
  FILES ADeprecatedMessage.msg
)
add_service_files(
  DEPRECATED
  DIRECTORY srv
  FILES ADeprecatedService.srv
)

gencpp example: ros/gencpp#35

wkentaro added a commit to wkentaro/gencpp that referenced this pull request May 14, 2018
list(APPEND ${PROJECT_NAME}_DEPRECATED_MESSAGE_FILES ${FILES_W_PATH})
else()
list(APPEND ${PROJECT_NAME}_MESSAGE_FILES ${FILES_W_PATH})
endif()
Copy link
Member

Choose a reason for hiding this comment

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

Using two different lists doesn't seem to be a good data structure for this. As a consequence you have to change code which shouldn't need to be touched.

Instead I would suggest to keep ${PROJECT_NAME}_MESSAGE_FILES as it is and have a second map which additionally stores the ones which are deprecated.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks! Updated.

@mikepurvis
Copy link
Member

Looks great, I dig it! +1

@dirk-thomas dirk-thomas changed the base branch from indigo-devel to kinetic-devel August 12, 2019 17:55
kohei306 added a commit to kohei306/gencpp that referenced this pull request Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature to show deprecation warning on using ROS message
3 participants