Skip to content

fix(dependency_walker): don't get dependencies of non ROS packages#171

Merged
tfoote merged 3 commits intoros-infrastructure:masterfrom
Guillaumebeuzeboc:fix/don_t_get_dependencies_of_non_ros_packages
Dec 19, 2025
Merged

fix(dependency_walker): don't get dependencies of non ROS packages#171
tfoote merged 3 commits intoros-infrastructure:masterfrom
Guillaumebeuzeboc:fix/don_t_get_dependencies_of_non_ros_packages

Conversation

@Guillaumebeuzeboc
Copy link
Contributor

When using the DependencyWalker and calling get_recursive_depends with the ros_packages_only to False, the DependencyWalker tries to get the dependencies of every dependency (even the non-ROS ones).
In order to get the dependencies of a package we must get the corresponding ROS package (for the XML etc). This is not possible for non ROS packages (like CMake, boost etc). Hence this causes a KeyError.

I simply added a check to verify if the package is a ROS package or not before trying to get its dependencies.

@Guillaumebeuzeboc Guillaumebeuzeboc force-pushed the fix/don_t_get_dependencies_of_non_ros_packages branch from c742995 to 76a44b6 Compare April 6, 2023 16:20
@artivis
Copy link

artivis commented Apr 11, 2023

Hi @cottsay, could we get a workflow approval? Thanks.

@tfoote
Copy link
Member

tfoote commented Sep 10, 2025

Sorry for the long delay. This looks like a good change. I'm not sure why the Action workflows aren't triggering. Can you try to rebase this to trigger it?

In case we consider non-ROS dep, we don't want to look for
the ROS dependencies of non ROS packages (ie: cmake)
@Guillaumebeuzeboc Guillaumebeuzeboc force-pushed the fix/don_t_get_dependencies_of_non_ros_packages branch from bdd4e16 to a82c725 Compare October 9, 2025 12:51
@Guillaumebeuzeboc
Copy link
Contributor Author

@tfoote , rebased and pushed the branch. It's now waiting for a "workflow approval"

@tfoote
Copy link
Member

tfoote commented Oct 9, 2025

Approved the workflow it's running now

@codecov-commenter
Copy link

codecov-commenter commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@9e67766). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/rosdistro/dependency_walker.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master     #171   +/-   ##
=========================================
  Coverage          ?   39.79%           
=========================================
  Files             ?       51           
  Lines             ?     3257           
  Branches          ?      660           
=========================================
  Hits              ?     1296           
  Misses            ?     1785           
  Partials          ?      176           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Guillaumebeuzeboc
Copy link
Contributor Author

Guillaumebeuzeboc commented Oct 13, 2025

It seems that one test had a timeout and cancelled the remaining workflows. It looks like I cannot retry it myself.

@tfoote
Copy link
Member

tfoote commented Oct 17, 2025

@cottsay merged in the CI fix and the workflows are running now.

One question for this is that calling this with a non-ROS package seems like an error. Should we make it respond as an error rather than silently return an empty set?

@Guillaumebeuzeboc
Copy link
Contributor Author

@cottsay merged in the CI fix and the workflows are running now.

One question for this is that calling this with a non-ROS package seems like an error. Should we make it respond as an error rather than silently return an empty set?

It has been 2 years, so I honestly do not remember the use case I was covering. It sounds reasonable to respond as an error.
Made the change.

Copy link
Member

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

Thanks for the patience on this and the follow up.

lgtm and I triggered CI successfully

@tfoote tfoote merged commit 02d3707 into ros-infrastructure:master Dec 19, 2025
23 checks passed
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.

5 participants