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

Revert smart pointer type change in PointCloud and deprecate getMapping() #3563

Merged
merged 1 commit into from
Jan 17, 2020

Conversation

taketwo
Copy link
Member

@taketwo taketwo commented Jan 16, 2020

Even though pcl::detail::getMapping() is not officially a public API, it is used outside of PCL (in pcl_ros). Changing the smart pointer type from boost to std broke that code. (More information in #2792.)

This commit partially reverses the changes from #3474, unbreaking pcl_ros. It also properly deprecates the function so that other (unknown to us) clients have time to update their code.

@taketwo taketwo added this to the pcl-1.10.0 milestone Jan 16, 2020
@@ -603,17 +606,17 @@ namespace pcl

protected:
// This is motivated by ROS integration. Users should not need to access mapping_.
std::shared_ptr<MsgFieldMap> mapping_;
[[deprecated("rewrite your code to avoid using it")]] boost::shared_ptr<MsgFieldMap> mapping_;
Copy link
Member

@kunaltyagi kunaltyagi Jan 17, 2020

Choose a reason for hiding this comment

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

Maybe reword the message to include what to do instead. Like Use pcl::createMapping(vector<pcl::PCLPointField>, pcl::MsgFieldMap&) instead

Copy link
Member Author

Choose a reason for hiding this comment

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

I also had this thought but was not sure since it's not a true replacement. But since you also think this way, I'll update the message.

Copy link
Member

Choose a reason for hiding this comment

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

It's not public, but since there was a public usage, people (maintainers) who compile from source (and check warnings 😅 ) will know

Copy link
Member

Choose a reason for hiding this comment

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

I like the new sassy one 🤣

Copy link
Member Author

Choose a reason for hiding this comment

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

Well yeah, sounds a bit presumptuous, but what else can I say :D Here it's not about how to create a mapping, but rather about not using PCL's protected space to store your stuff.

Even though pcl::detail::getMapping() is not officially a public API, it
is used outside of PCL (in pcl_ros). Changing the smart pointer type
from boost to std broke that code.

This commit partially reverses the changes from PointCloudLibrary#3474, unbreaking
pcl_ros. It also properly deprecates the function so that other (unknown
to us) clients have time to update their code.
@kunaltyagi kunaltyagi merged commit 5f4561e into PointCloudLibrary:master Jan 17, 2020
@taketwo taketwo deleted the deprecate-get-mapping branch January 17, 2020 20:05
@taketwo taketwo added changelog: deprecation Meta-information for changelog generation module: common labels Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: deprecation Meta-information for changelog generation module: common
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants