Repository navigation
fix: exclude exec_depends from the ABI reverse-dependency set - #18
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DGA.scanbuilt dependency edges by unioningbuild_depends,exec_dependsandbuild_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_dependsonly.
catkin_pkgexpands<depend>into all three lists, so packagesdeclared with
<depend>remain tracked viabuild_depends; onlyexec-only dependents (<exec_depend>) are dropped. The BFS queries(
get_reverse_deps/get_forward_deps) andtopological_sortareunchanged — narrowing edge construction in
scan()is sufficient.CLI and config contracts are unchanged → patch release.
Changes
dga.py: dropexec_dependsfromscan()edge construction; update docstringsconftest.py: addmixed_deps_wsfixture covering each dependency categorytest_dga.py: addTestExecDependExclusion(new behaviour +<depend>regression guard)README.md: document that exec-only dependents are excludedTesting
uv run pytest tests/unit/test_dga.py -q→ 15 passeduv run pytest tests/ -q→ 183 passed