-
Notifications
You must be signed in to change notification settings - Fork 45
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
Generate messages in downstream builds #339
Conversation
8eca9ee
to
9e55508
Compare
79041c4
to
3a66601
Compare
Just checking, we can't compile the whole |
Could you help me a bit with the expectations after this PR? What can I do and what can't I do yet (if any)? |
Does this PR require https://github.com/gazebosim/gz-cmake/pull/345/files? |
Correct, I am working on the corresponding downstream modifications.
I still owe some documentation here. The general expectation is that We should expect that with this PR, you should be able to add messages to your project, as demonstrated in this example: https://github.com/mjcarroll/mjcarroll-custom-msgs This will also provide users a way to define custom messages downstream with simple cmake macros.
Correct, it was just merged, and I'm going to cut a release shortly. |
@osrf-jenkins retest this please |
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 compiling Harmonic
with the understanding that it won't successfully compile all libraries. After running colcon
I see generated .pb.h
files under ./build/gz-msgs10/gz_msgs_gen/gz/msgs
. Is that expected?
I also see these two warning messages:
|
Yes, this is correct. They are being generated to run the tests. |
@caguero I have opened PRs for all downstream libraries and added examples/READMEs. |
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.
Update Migradtion.md guide?
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Co-authored-by: Addisu Z. Taddese <[email protected]> Signed-off-by: Michael Carroll <[email protected]> Signed-off-by: Michael Carroll <[email protected]>
d299cbb
to
a775cb5
Compare
Okay, all feedback addressed and rebased to get DCO happy. I think we are good here, and then a prerelease? |
include(${@PROJECT_NAME@_DIR}/gz_msgs_generate.cmake) | ||
include(${@PROJECT_NAME@_DIR}/target_link_messages.cmake) | ||
|
||
set(@PROJECT_NAME@_INSTALL_PATH "${@PROJECT_NAME@_DIR}/../../..") |
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.
given the other issues I've been seeing with the /usr/lib/<arch>
folder in gazebo-release/gz-msgs10-release#3 and gazebosim/gz-cmake#360, I'm a bit suspicious that this hard-coded ../../..
is wrong
This reverts commit 0c78b96. Signed-off-by: Michael Carroll <[email protected]>
* Revert "Use cmake extras path variables (#359)" This reverts commit 786b42a. Signed-off-by: Michael Carroll <[email protected]> * Revert "Unconditionally find the python interpreter (#356)" This reverts commit 16de9ef. Signed-off-by: Michael Carroll <[email protected]> * Revert "Generate messages in downstream builds (#339)" This reverts commit 0c78b96. Signed-off-by: Michael Carroll <[email protected]> --------- Signed-off-by: Michael Carroll <[email protected]>
🎉 New feature
Expose message generation functionality to downstream packages and remove message generation from the
msgs
package.Summary
Background
Up until now, we have:
proto
files - each describing a gz-msgs message.cc
and.hh
files in thegz-msgs
packagegz-msgs
library that is also distributed in the binary package.The issue with this approach is that it means that each change to a proto message will cause the ABI to break, which is inconvenient. We have multiple issues addressing this in
New Approach
This new approach will now distribute the proto files, but will no longer distribute a binary library that downstream users will link against. Instead, downstream users can generate the messages that they need themselves or add new message definitions in their own packages.
A summary of the changes required to make this happen:
core
library that has the gz-msgs functionality minus the generated code.compiled
library that maintains the CLI functionality.conversions
a header-only operation, so that the core library doesn't need to depend on the generated messages.Downstream changes required:
Checklist
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.