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

Tinyxml2 support #9

Merged
merged 5 commits into from
Mar 19, 2018
Merged

Tinyxml2 support #9

merged 5 commits into from
Mar 19, 2018

Conversation

clalancette
Copy link
Collaborator

@clalancette clalancette commented Feb 22, 2018

Based on this comment this PR is an alternative to #4. Instead of removing the TinyXML APIs completely, we deprecate them and add the TinyXML2 APIs alongside. That way we won't break everything that depends on us, while still moving forward. Sometime in the future we can actually remove the TinyXML APIs.

Note that I've targeted this at kinetic-devel instead of melodic-devel, since we can add this to kinetic without breaking anything, and thus not branch off. If we decide to go with this PR, then we can delete the melodic-devel branch completely.

In addition to this work, this PR also cleans up the code and adds some tests.

@rojkov, @sloretz FYI

@clalancette clalancette changed the base branch from kinetic-devel to melodic-devel February 22, 2018 16:32
@clalancette clalancette changed the base branch from melodic-devel to kinetic-devel February 22, 2018 16:34
@rojkov
Copy link
Contributor

rojkov commented Feb 22, 2018

Looks good to me.

I guess this makes #4 obsolete then.

@mikaelarguedas
Copy link
Member

Adding new dependencies needs to be reflected in the package.xml (even if the tinyxml2 module is provided by cmake-modules it doesnt provide the dependency)

Building on top of the original contribution will allow the original contributor to be credited.

Testing deprecated features will generate deprecated warnings so the test compile arguments should be updated accordingly

@clalancette
Copy link
Collaborator Author

Adding new dependencies needs to be reflected in the package.xml (even if the tinyxml2 module is provided by cmake-modules it doesnt provide the dependency)

Oh, good call, I missed that bit. Will fix.

Building on top of the original contribution will allow the original contributor to be credited.

True, but I wanted to restructure the whole thing in a pretty significant way. I think what I'll do here is modify the last commit to make @rojkov the author, since most of the code is his.

Testing deprecated features will generate deprecated warnings so the test compile arguments should be updated accordingly

Sure, I'll add -Wno-deprecated to the list.

@clalancette
Copy link
Collaborator Author

Looks good to me.

I guess this makes #4 obsolete then.

Great. It sounds like you are good with this direction, so I'm going to go ahead and close out #4, and we can iterate with any changes here.

clalancette and others added 5 commits February 28, 2018 19:42
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Also add in some tests, and add in a deprecation warning
for the TinyXML versions of the APIs.

Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette
Copy link
Collaborator Author

@sloretz Gentle ping for a review here. I'd like to get this into Melodic, as this will be holding up doing a similar change in i.e. kdl_parser.

Copy link
Contributor

@sloretz sloretz left a comment

Choose a reason for hiding this comment

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

Looks good to me with one hesitation about the deprecation warning.

@@ -55,9 +58,13 @@ class Model : public ModelInterface
{
public:
/// \brief Load Model from TiXMLElement
URDF_EXPORT bool initXml(TiXmlElement * xml);
URDF_EXPORT URDF_DEPRECATED("TinyXML API is deprecated, use the TinyXML2 version instead") bool initXml(TiXmlElement * xml);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this break someone downstream using -Werror? If so maybe the target branch should be melodic.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's a good point. The downside to targeting a melodic branch is that we'll probably end up supporting 3 branches: kinetic-devel (with only tinyxml APIs), melodic-devel (with tinyxml and tinyxml2 APIs and the deprecation warning), and n-turtle-devel (with only tinyxml2 APIs). But that is more conservative, and ensures we don't break kinetic, so I think I'll go ahead and do that.

Thanks for the review!

@clalancette clalancette changed the base branch from kinetic-devel to melodic-devel March 19, 2018 13:03
@clalancette clalancette merged commit 5553ad5 into melodic-devel Mar 19, 2018
@clalancette clalancette deleted the tinyxml2 branch March 19, 2018 13:04
@wjwwood
Copy link
Member

wjwwood commented May 9, 2018

Now that the TinyXML interface is deprecated, can you guys mention this in the migration guide for Melodic and maybe point to an example diff for how to port it?

https://wiki.ros.org/melodic/Migration

@clalancette
Copy link
Collaborator Author

Now that the TinyXML interface is deprecated, can you guys mention this in the migration guide for Melodic and maybe point to an example diff for how to port it?

https://wiki.ros.org/melodic/Migration

Good idea, I'll do that now.

@wjwwood
Copy link
Member

wjwwood commented May 9, 2018

Thanks!

dreuter pushed a commit to dreuter/urdf that referenced this pull request Jun 2, 2022
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
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.

5 participants