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

colcon dependency management does not support <doc_depend> #150

Open
guillaumeautran opened this issue Nov 23, 2023 · 1 comment
Open

colcon dependency management does not support <doc_depend> #150

guillaumeautran opened this issue Nov 23, 2023 · 1 comment

Comments

@guillaumeautran
Copy link

Based on the code, colcon-ros does not seem to support the <doc_depend> type of dependencies. These dependencies behave similarly as <build_depend> but are more proper as <doc_depend> when related to doc generation. Thinks like Doxygen or Sphinx (or rosdoc2 in my case of interest).

@mikepurvis
Copy link

Mentioned briefly in #128 (comment), with the context of wanting an accurate dependency picture for the purposes of running documentation builds from colcon (also ros-infrastructure/rosdoc2#15).

I think the easiest first pass would just be to add a stanza to this block which propagates the doc_depends from catkin_pkg into desc.dependencies['doc']:

for d in pkg.build_depends + pkg.buildtool_depends:
assert d.evaluated_condition is not None
if d.evaluated_condition:
desc.dependencies['build'].add(DependencyDescriptor(
d.name, metadata=_create_metadata(d)))
for d in (
pkg.build_export_depends +
pkg.buildtool_export_depends +
pkg.exec_depends
):
assert d.evaluated_condition is not None
if d.evaluated_condition:
desc.dependencies['run'].add(DependencyDescriptor(
d.name, metadata=_create_metadata(d)))
for d in pkg.test_depends:
assert d.evaluated_condition is not None
if d.evaluated_condition:
desc.dependencies['test'].add(DependencyDescriptor(
d.name, metadata=_create_metadata(d)))

Though of course to actually do something meaningful with these, the relevant calls to PackageDescriptor.get_recursive_dependencies would need to specify the correct categories:

https://github.com/colcon/colcon-core/blob/a6aef1515b946f5af47b16d55b4f9ffaaaa27126/colcon_core/package_descriptor.py#L95-L96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants