-
Notifications
You must be signed in to change notification settings - Fork 10
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
[ign to gz] C++ namespaces #50
Conversation
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
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.
Ideally we'd issue deprecation warnings when using
ignition
. Unfortunately, C++ doesn't allow this:
I assume we will rename the headers and provide ignition/utils/*
headers with #pragma
deprecation warnings inside. I would suggest placing the namespace ignition = gz;
statement inside one of these headers
Can we use this trick? namespace [[deprecated]] ignition {
using namespace gz;
} |
Signed-off-by: Louise Poubel <[email protected]>
Brilliant! ✨ Works like a charm. I added it commented out in 5fee873 so we don't enable warnings just yet. It didn't work with
I was thinking of adding symlinks so we don't duplicate the headers. But I'm open to suggestions about a different place to put the alias. I went for |
I wouldn't suggest using identical headers in |
Ah ok. I'm not sure I fully understand though, do you think we should keep each one of the existing headers, and inside each of them, include the That may work better than symlinks because it's better for cross-platform 🤔 |
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: methylDragon <[email protected]>
Signed-off-by: methylDragon <[email protected]>
This was superceded by #61 because I had to do the namespace migration following the header migration. |
Closing in favor of #61 |
🎉 New feature
ignition
togz
gazebo-tooling/release-tools#711Summary
Changes:
ignition
togz
ignition
still works for users (tick-tock's tick)ignition
still worksIdeally we'd issue deprecation warnings when using
ignition
. Unfortunately, C++ doesn't allow this:Clang's warning is very clear:
So we'll need to either find a workaround, or don't issue deprecation warnings for namespaces.
In any case, we should wait until most of the stack is already using
gz
before we turn on these warnings, otherwise they would hide other warnings.Test it
See the added test. I also expect downstream libraries not to need any modifications because of this PR.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸