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

Add missing build_export_depends to controller_interface #989

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

cottsay
Copy link
Contributor

@cottsay cottsay commented Apr 14, 2023

These missing dependencies are not currently causing buildfarm problems because downstream packages have test dependencies on these, so they're getting installed anyway.

In an effort to streamline the buildfarm, we're considering disabling the tests in packaging jobs and dropping the unused dependencies. Test builds with this configuration have uncovered a few packaging bugs, and this is one of them.

To avoid regressing this package when we make this change, please release this change soon.

Thanks!

@cottsay
Copy link
Contributor Author

cottsay commented Apr 14, 2023

Here's where the dependencies are exported:

ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS})

@destogl
Copy link
Member

destogl commented Apr 14, 2023

@cottsay thank you very much for this!!! We just had an issue because of it a few days ago, and I couldn't figure out why is this happening! Now it's clear.

Nevertheless, can you please clarify, why do we need this export in the package.xml because usually, we don't need it. Is it because we are using solely <build_depend> tag? And when we are using <depends> tag, then we get automatically <build_export_depend>?

@destogl destogl enabled auto-merge (squash) April 14, 2023 06:46
Copy link
Member

@destogl destogl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, really, really, thank you very, very much!!!!

@destogl destogl merged commit 437d37b into ros-controls:master Apr 14, 2023
1 check failed
@bmagyar
Copy link
Member

bmagyar commented Apr 14, 2023

@Mergifyio backport humble

@mergify
Copy link
Contributor

mergify bot commented Apr 14, 2023

backport humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Apr 14, 2023
(cherry picked from commit 437d37b)

# Conflicts:
#	controller_interface/package.xml
bmagyar added a commit that referenced this pull request Apr 14, 2023
…) (#990)

* Add missing build_export_depends to controller_interface (#989)

(cherry picked from commit 437d37b)

# Conflicts:
#	controller_interface/package.xml

* fix conflict

---------

Co-authored-by: Scott K Logan <[email protected]>
Co-authored-by: Bence Magyar <[email protected]>
@cottsay cottsay deleted the missing-deps branch April 14, 2023 18:24
@cottsay
Copy link
Contributor Author

cottsay commented Apr 14, 2023

can you please clarify, why do we need this export in the package.xml because usually, we don't need it. Is it because we are using solely <build_depend> tag? And when we are using <depends> tag, then we get automatically <build_export_depend>?

In this particular case, I noticed the problem when joint_state_broadcaster failed to build. It calls find_package(controller_interface REQUIRED) which required hardware_interface because of the ament_export_dependencies invocation in this package. Under the current buildfarm, hardware_interface was getting installed due to a test dependency, but with tests disabled there was nothing indicating that the package was needed, so it wasn't installed.

This package was declaring a build_depend on hardware_interface, which ensures that the package is present to build THIS package, but it doesn't affect downstream builds of packages which depend on this package. That's the role of build_export_depends, which specifically affects builds of packages which declare a build dependency on THIS package. In general, every package referenced by a ament_export_dependencies in CMake should have a corresponding build_export_depends dependency in the manifest.

A depends entry in the manifest does indeed cover build_export_depends (here's where that's discussed in the spec: https://ros.org/reps/rep-0149.html#depend-multiple)

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

Successfully merging this pull request may close these issues.

3 participants