Skip to content

fix: exclude exec_depends from the ABI reverse-dependency set - #18

Merged
HansRobo merged 1 commit into
mainfrom
fix/exec-depends-rdeps
Jun 1, 2026
Merged

HansRobo merged 1 commit into
mainfrom
fix/exec-depends-rdeps

Conversation

@HansRobo

@HansRobo HansRobo commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary

DGA.scan built dependency edges by unioning build_depends,
exec_depends and build_export_depends. Reverse-dependency resolution
(the ABI "affected set" rebuilt when a package changes) therefore pulled
in runtime-only consumers, causing over-broad rebuilds in large
workspaces.

This narrows graph edges to build_depends + build_export_depends
only. catkin_pkg expands <depend> into all three lists, so packages
declared with <depend> remain tracked via build_depends; only
exec-only dependents (<exec_depend>) are dropped. The BFS queries
(get_reverse_deps / get_forward_deps) and topological_sort are
unchanged — narrowing edge construction in scan() is sufficient.

CLI and config contracts are unchanged → patch release.

Changes

  • dga.py: drop exec_depends from scan() edge construction; update docstrings
  • conftest.py: add mixed_deps_ws fixture covering each dependency category
  • test_dga.py: add TestExecDependExclusion (new behaviour + <depend> regression guard)
  • README.md: document that exec-only dependents are excluded

Testing

  • uv run pytest tests/unit/test_dga.py -q → 15 passed
  • uv run pytest tests/ -q → 183 passed

DGA.scan unioned build_depends, exec_depends and build_export_depends
into a single edge set, so changing a package forced a rebuild of its
runtime-only (exec) consumers even though their ABI is unaffected,
causing over-broad rebuilds in large workspaces.

Build edges are now drawn from build_depends and build_export_depends
only. catkin_pkg expands <depend> into all three lists, so packages
declared with <depend> stay tracked via build_depends; only exec-only
dependents (declared with <exec_depend>) are dropped. get_reverse_deps,
get_forward_deps and topological_sort are unchanged -- narrowing the
edges in scan() is sufficient.

Add a mixed_deps_ws fixture and TestExecDependExclusion covering each
dependency category, and document the behaviour in README.
@HansRobo HansRobo added the release:patch Bump patch version on merge label Jun 1, 2026
@HansRobo
HansRobo merged commit d1a93af into main Jun 1, 2026
11 of 12 checks passed
@HansRobo
HansRobo deleted the fix/exec-depends-rdeps branch June 1, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:patch Bump patch version on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant