sbt/notes/2.0.0
BrianHotopp 3eeac9deae
[2.x] fix: Collapse duplicate subtrees in dependency tree rendering (#9226)
Fixes #6886.

dependencyTree, dependencyBrowseTree, and inspect tree re-explore
the same node once per incoming edge. In a DAG with N levels and M
children per node the rendered output is O(M^N) -- the OP needed
>16 GB heap, #7360 has a 6 GB heap dump, and Friendseeker's analysis
on the issue showed the exponential re-traversal directly.

Fix: track a visited set across the renderer's recursion. The first
time a node is encountered it is rendered in full; on subsequent
visits the entry collapses to a one-line +- <id> (*) (ASCII) or a
<id> (*) leaf (JSON), matching Maven's dependency:tree (*)
convention. Cycle detection (separate parents set, (cycle) marker)
is unchanged.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 19:15:47 -04:00
..
cache-version.md [2.x] feat: Add cacheVersion setting for global cache invalidation (#8993) 2026-04-01 11:23:10 +09:00
dependency-tree-dedup.md [2.x] fix: Collapse duplicate subtrees in dependency tree rendering (#9226) 2026-05-18 19:15:47 -04:00
migration.md [sbt 2.x] remote cache (#7464) 2024-02-07 10:34:06 -05:00
remote-project-update.md [2.x] fix: addressing review comments 2026-03-13 09:34:32 +03:00