Skip to content

feat(model): Add indicator nodes for cycles in the dependency graph#11627

Open
oheger-bosch wants to merge 1 commit into
oss-review-toolkit:mainfrom
boschglobal:oheger-bosch/dependency_graph_cycle_nodes
Open

feat(model): Add indicator nodes for cycles in the dependency graph#11627
oheger-bosch wants to merge 1 commit into
oss-review-toolkit:mainfrom
boschglobal:oheger-bosch/dependency_graph_cycle_nodes

Conversation

@oheger-bosch
Copy link
Copy Markdown
Member

When during construction of the dependency graph a cycle in the dependencies is detected, add a special marker node for the package that closes the cycle that does not have any dependencies. That way, the referenced package is still visible in the graph, but the graph remains free of cycles.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.49%. Comparing base (40ef461) to head (954b8ed).
⚠️ Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
...el/src/main/kotlin/utils/DependencyGraphBuilder.kt 86.66% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11627      +/-   ##
============================================
+ Coverage     58.30%   58.49%   +0.18%     
- Complexity     1766     1816      +50     
============================================
  Files           356      362       +6     
  Lines         13275    13521     +246     
  Branches       1323     1385      +62     
============================================
+ Hits           7740     7909     +169     
- Misses         5047     5114      +67     
- Partials        488      498      +10     
Flag Coverage Δ
funTest-external-tools 14.62% <0.00%> (-0.04%) ⬇️
funTest-no-external-tools 30.25% <0.00%> (-0.44%) ⬇️
test-ubuntu-24.04 41.86% <86.66%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@oheger-bosch oheger-bosch force-pushed the oheger-bosch/dependency_graph_cycle_nodes branch from d068876 to f8f4c31 Compare March 26, 2026 14:01
@oheger-bosch oheger-bosch marked this pull request as ready for review March 26, 2026 15:33
@oheger-bosch oheger-bosch requested a review from a team as a code owner March 26, 2026 15:33
@oheger-bosch oheger-bosch force-pushed the oheger-bosch/dependency_graph_cycle_nodes branch from f8f4c31 to ab535d6 Compare March 27, 2026 08:18
@oheger-bosch
Copy link
Copy Markdown
Member Author

The approach has been verified against a real-life Yarn2 project that has a cyclic dependency.

When during construction of the dependency graph a cycle in the
dependencies is detected, add a special marker node for the package
that closes the cycle that does not have any dependencies. That way,
the referenced package is still visible in the graph, but the graph
remains free of cycles.

Signed-off-by: Oliver Heger <oliver.heger@bosch.com>
@oheger-bosch oheger-bosch force-pushed the oheger-bosch/dependency_graph_cycle_nodes branch from ab535d6 to 954b8ed Compare June 2, 2026 14:13
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.

1 participant