-
Notifications
You must be signed in to change notification settings - Fork 40
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 -> gz Header Migration : ign-common #348
Conversation
9f27672
to
9bcab9a
Compare
This is pending the merge and nightly of |
9254bfa
to
724125f
Compare
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.
LGTM with green CI. My comments below can be addressed in follow-up PRs if that's easier.
@@ -0,0 +1,2 @@ | |||
add_subdirectory(gz) | |||
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL}) |
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.
geospatial
is a new component from Garden, so we don't need to add ignition
headers and can go straight to gz
, because no downstream users should be using it yet anyway.
One caveat is that our libraries are already using it, so one strategy we could take would be to keep ignition/geospatial
while we're updating all libraries, and then remove it afterwards.
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.
Might be neater to remove it during the namespace (or maybe the source) migration? I'm not sure :o
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.
I think any time after the header migration for all libraries should work, because none of the libraries should be using them anymore. So I'm fine either way. It's probably good to do it as a standalone PR for visibility. We just shouldn't forget to do it.
@@ -0,0 +1,196 @@ | |||
/* |
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.
We're deprecating all the *Plugin*
files from ign-common
on Garden, in favor of using the ign-plugin
library. So I think we don't need to add gz
counterparts to it.
I'd be ok doing this in a separate PR, we don't even have IGN_DEPRECATED
notices on them anyway.
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.
Let's do this in a separate PR, so it can be tracked independently.
I'll track this in the issue here: #349
But I suspect I'll be focused on the other libraries.
@@ -15,98 +15,4 @@ | |||
* | |||
*/ | |||
|
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.
Since the detail
directories aren't part of the public API, I think we can just remove them.
If include/ignition/common/Plugin.hh
isn't including include/ignition/common/detail/Plugin.hh
, no one else is.
This is valid for all libraries.
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.
Can I double check if this means that I delete all detail redirection headers across all libraries?
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.
Since the
detail
directories aren't part of the public API, I think we can just remove them.If
include/ignition/common/Plugin.hh
isn't includinginclude/ignition/common/detail/Plugin.hh
, no one else is.This is valid for all libraries.
I disagree. These are installed header files, so they are part of the public API, and they are included from the header files not in the detail
folder, though often from the bottom of the file so it is easy to miss:
- https://github.com/ignitionrobotics/ign-math/blob/ignition-math6_6.10.0/include/ignition/math/Box.hh#L224
- https://github.com/ignitionrobotics/ign-common/blob/ignition-common4_4.5.0/include/ignition/common/Plugin.hh#L194
I think it would be best to keep the redirection headers for all the contents of the detail
subfolders
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.
These are installed header files, so they are part of the public API,
I understand that we've never explicitly declared our public API, and we should. But the reason that the detail
directories exist is that they're not meant to be directly used by downstream. They're installed because of technicalities of the language which require those templates to be installed, but that's an implementation detail, not our API. And as such, we don't need to tick-tock them.
ROS QL1 packages explicitly call this out. I ticketed this issue so we document this properly for Gazebo:
I think it would be best to keep the redirection headers for all the contents of the detail subfolders
Having them there wouldn't break anything, but those should be dead files that no one is using. I'd say that keeping them there sends the wrong message that those are part of our public API and subject to tick-tock.
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.
I'm getting a very different impression from your first and most recent comments. I think your points are reasonable, but the way they were initially phrased was a bit alarming to me.
Since the
detail
directories aren't part of the public API, I think we can just remove them.
I've gathered from your subsequent comment that the context is specifically about redirection headers in a detail
subfolder, but on first glance it sounded to me like you were saying we can delete detail
headers at any time from anywhere with no impact on API, which is absolutely not true. I now think you meant we don't need to tick-tock them, which is reasonable.
If
include/ignition/common/Plugin.hh
isn't includinginclude/ignition/common/detail/Plugin.hh
, no one else is.
Again, I now gather that this context is about redirection headers, not public headers in general, since gz/common/Plugin.hh
does include gz/common/detail/Plugin.hh
This is valid for all libraries.
Nothing specific here but it added to my alarm! 😅
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.
Ah sorry I should have been clearer. Yes, what I meant is that we can remove the ignition/*/detail/*.hh
headers that just include gz/*/detail/*.hh
✅
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.
I think downstream users are less likely to need the ignition/*/detail/*
redirection headers. I would lean towards redirecting all headers for now until we've migrated headers for all the ignition libraries and then consider removing the detail
redirects when we add the deprecation warnings to the primary redirection headers.
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.
I think downstream users are less likely to need the ignition//detail/ redirection headers
If they're including them directly, that's a mistake on their part.
I would lean towards redirecting all headers for now until we've migrated headers
I'm ok with that if it makes things easier. We already have a long list of things to go back to, and long PRs to review. If the script could be updated to skip the detail
folders automatically I think that would make our lives easier...
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.
* | ||
*/ | ||
|
||
#include <gz/common/testing/AutoLogFixture.hh> |
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.
The testing
component is also new on Garden, just like geospatial
. So we don't need to provide ignition/testing
headers.
Codecov Report
@@ Coverage Diff @@
## main #348 +/- ##
=======================================
Coverage 91.66% 91.66%
=======================================
Files 1 1
Lines 48 48
=======================================
Hits 44 44
Misses 4 4 Continue to review full report at Codecov.
|
Signed-off-by: methylDragon <[email protected]>
Signed-off-by: methylDragon <[email protected]>
Signed-off-by: methylDragon <[email protected]>
Signed-off-by: methylDragon <[email protected]>
724125f
to
fcf8f68
Compare
See gazebo-tooling/release-tools#711