-
Notifications
You must be signed in to change notification settings - Fork 77
No need to have generate_parameter_library at runtime #354
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
base: main
Are you sure you want to change the base?
Changes from all commits
d195135
e1ed640
07afd2b
a346f40
37ce1e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is a build dependency of downstream packages, right? is exec_depend then the right dependency type?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How can these be used in the build process of another package?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are right about using it in python using generate_parameter_library/generate_parameter_library/cmake/generate_parameter_library.cmake Line 32 in d366f2d
coming from
But because this will "execute" generate_parameter_library_cpp at build time, maybe |
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.
if we change libexpected-dev to build_export_depend, then almost every dependency is of type build_export_depend here?
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.
This one is not in the generated header files, the other ones are.
So the other ones are actually required to be installed for the dependend package.
libexpected-devdoesn't show up in the generated header files, that's the difference.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.
as this package is not "building" any code but only creating cmake modules for downstream packages, isn't basically anything a
build_export_depend? Or do I misunderstand the package manifest?From a different perspective:
If it is not included in generated files, do we need libexpected-dev here at all?
Or should we add it as an include explicitly? Because generated code creates something like this, with
validation_resultbeing of typetl::expectedbeing pulled in fromrsl/parameter_validators.hpp(and listed as<depend>there).Uh oh!
There was an error while loading. Please reload this page.
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.
Well now I am in over my head 😄
Being a bit pragmatic here, most users will just install everything in a package.xml (via tooling).
Slighly more advanced users will install everything (perhaps not
exec_depend) and build their binaries.Then they have a robot (or container o.a.). where they need only those binaries and all
dependsandexec_depends.For that latter group I'm trying to prevent
libexpected-devto end up on their robot.Initially this PR started with making
generate_parameter_libraryitself abuild_dependin the examples, but that was wrong (and I forgot why).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.
ok, currently this is still the case because it is a
<depend>in RSL. So maybe it is cleaner to add it as an include to the jinja template and leave it as a build_depend as you suggested, maybe changing it also in RSL.btw: I appreciate any cleanup in this direction, but want to understand it myself ;)
Uh oh!
There was an error while loading. Please reload this page.
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.
Yeah, this package is a bit of an odd one.
I remember now why it could not be just a
build_dependof the examples. And that's because it generates a header file with dependencies. Otherwise the example package would technically need to list these and that would be impractical in the README.md I guess.Or we need a
generate_parameter_library_runtimepackage just like the message generation has a build time and a runtime part.OK, that last part sounded like a big refactor, but actually the runtime package only needs to contain a package.xml with
exec_depends.README would say:
This would all be fully backwards compatible with folks having
Uh oh!
There was an error while loading. Please reload this page.
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't we have the same without adding a new package?
In my ideal world (which might be incorrect, and I might have forgotten something) it could work as follows:
for python setup.py packages: my_python_package has on generate_parameter_library_py.
colcon build)for cmake/cmake_python: my_cmake_package has on generate_parameter_library.
generate_parameter_library_pyneeded for generating the code at build time (transitive build dependency, which itself pulls stuff like python3-jinja2 from above)I see a drawback for cmake_python packages to pull rclcpp*, maybe we should ship the generate_parameter_module cmake function from a dedicated package to solve that.
Will resolve rosdep (and bloom) the packages as desired?