Skip to content

Commit

Permalink
internal/lsp/cache: remove unused function
Browse files Browse the repository at this point in the history
This function was actually left behind, after making suggested changes
to CL 413683.

Change-Id: I6933e870ded9da5af06724c28839c37d58fb4cdc
Reviewed-on: https://go-review.googlesource.com/c/tools/+/414856
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
  • Loading branch information
findleyr committed Jun 30, 2022
1 parent c77473f commit 9358add
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions internal/lsp/cache/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,3 @@ func (g *metadataGraph) reverseTransitiveClosure(includeInvalid bool, ids ...Pac
visitAll(ids)
return seen
}

func collectReverseTransitiveClosure(g *metadataGraph, includeInvalid bool, ids []PackageID, seen map[PackageID]struct{}) {
for _, id := range ids {
if _, ok := seen[id]; ok {
continue
}
m := g.metadata[id]
// Only use invalid metadata if we support it.
if m == nil || !(m.Valid || includeInvalid) {
continue
}
seen[id] = struct{}{}
collectReverseTransitiveClosure(g, includeInvalid, g.importedBy[id], seen)
}
}

0 comments on commit 9358add

Please sign in to comment.