fix(model): Skip excluded projects in getDependencies when omitExcluded is true#11926
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11926 +/- ##
=========================================
Coverage 58.43% 58.43%
+ Complexity 1809 1807 -2
=========================================
Files 361 361
Lines 13499 13499
Branches 1383 1383
=========================================
Hits 7888 7888
Misses 5115 5115
Partials 496 496
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3cb7615 to
34175bd
Compare
The point is (@fviernau may correct me if I'm wrong): It should never happen that we miss entries in the linkage map, due to the way that map is populated. That's why |
34175bd to
57d7300
Compare
| getProjects().forEach { project -> | ||
| val projects = if (omitExcluded) getProjects().filter { !isExcluded(it.id) } else getProjects() | ||
|
|
||
| projects.forEach { project -> |
There was a problem hiding this comment.
Just pass on omitExcluded to getProjects() in the original code: getProjects(omitExcluded)
There was a problem hiding this comment.
I'll do this quickly myself to ensure the change makes it into tomorrow's release.
57d7300 to
af31633
Compare
Previously, `getDependencies(omitExcluded = true)` only filtered excluded packages from results but still traversed all projects. This caused inconsistencies when dependency edges only exist in excluded projects (e.g. test-only submodules). Now excluded projects are also skipped during traversal, ensuring that dependencies which are only reachable through excluded projects are not discovered. Signed-off-by: Kai Hodžić <hodzic.e.k@outlook.com>
Head branch was pushed to by a user without write access
af31633 to
2c80503
Compare
Previously, getDependencies(omitExcluded=true) only filtered excluded packages
from results but still traversed all projects. This caused inconsistencies when
dependency edges only exist in excluded projects (e.g., test-only submodules).
Now excluded projects are also skipped during traversal, ensuring dependencies
only reachable through excluded projects are not discovered.