Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ Other enhancements:

Bug fixes:

* Stack's `dot` and `ls dependencies` commands no longer prune a package with
dependencies only because all its direct dependencies are to be pruned.

## v3.9.3 - 2026-02-19

Release notes:
Expand Down
3 changes: 1 addition & 2 deletions doc/commands/dot_command.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ By default:
project packages). Pass the `--reach <packages>` option to exclude packages
(including project packages) that cannot reach any of the specified packages
in the dependency graph. In both cases, `<packages>` is a list of package
names separated by commas. A package with dependencies is pruned if all of
its direct dependencies are pruned;
names separated by commas;
* for all relevant project packages, relevant dependencies are included in the
output. However, each project package for which dependencies are included
can be specified as a target argument. The argument uses the same format as
Expand Down
3 changes: 1 addition & 2 deletions doc/commands/ls_command.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ By default:
project packages). Pass the `--reach <packages>` option to exclude packages
(including project packages) that cannot reach any of the specified packages
in the dependency graph. In both cases, `<packages>` is a list of package
names separated by commas. A package with dependencies is pruned if all of
its direct dependencies are pruned;
names separated by commas;
* for all relevant project packages, relevant dependencies are included in the
output. However, each project package for which dependencies are included
can be specified as a target argument. The argument uses the same format as
Expand Down
4 changes: 1 addition & 3 deletions src/Stack/DependencyGraph.hs
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,7 @@ pruneGraph dontPrune names =
if pkg `F.elem` names
then Nothing
else let filtered = Set.filter (`F.notElem` names) pkgDeps
in if Set.null filtered && not (Set.null pkgDeps)
then Nothing
else Just (filtered, x))
in Just (filtered, x))

-- | Make sure that all unreachable nodes (orphans) are pruned
pruneUnreachable ::
Expand Down