aboutsummaryrefslogtreecommitdiff
path: root/internal/lsp/cache/parse.go
diff options
context:
space:
mode:
authorHeschi Kreinick <heschi@google.com>2020-07-15 17:15:09 -0400
committerHeschi Kreinick <heschi@google.com>2020-07-28 17:34:24 +0000
commit051e64e62c92c71c5e37637586b2708cf96e06ba (patch)
treef0bc4c22494917b343a494c2a4e011bc2cb9d411 /internal/lsp/cache/parse.go
parent2ad651e9e297cfdbf8cf95c55f5347c701de15d3 (diff)
downloadgolang-x-tools-051e64e62c92c71c5e37637586b2708cf96e06ba.tar.gz
internal/lsp: minimize PackageHandle interface
The PackageHandle interface is fairly redundant with the Package interface. As much as convenient, move users to Package and weaken/remove methods from PackageHandle. I would like to get rid of CompiledGoFiles too but NarrowestPackageHandle is a little annoying. I think this is unambiguously a step forward so I figured we can get it in and keep iterating. Change-Id: I6c5a3f462b1f19cbca6a267fedc36ce54613b6fc Reviewed-on: https://go-review.googlesource.com/c/tools/+/244018 Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Diffstat (limited to 'internal/lsp/cache/parse.go')
-rw-r--r--internal/lsp/cache/parse.go9
1 files changed, 0 insertions, 9 deletions
diff --git a/internal/lsp/cache/parse.go b/internal/lsp/cache/parse.go
index 45ca29849..d5165ba56 100644
--- a/internal/lsp/cache/parse.go
+++ b/internal/lsp/cache/parse.go
@@ -256,15 +256,6 @@ func buildASTCache(ctx context.Context, parseHandle *memoize.Handle) *astCacheDa
return data
}
-func hashParseKeys(pghs []*parseGoHandle) string {
- b := bytes.NewBuffer(nil)
- for _, pgh := range pghs {
- b.WriteString(pgh.file.Identity().String())
- b.WriteByte(byte(pgh.Mode()))
- }
- return hashContents(b.Bytes())
-}
-
func parseGo(ctx context.Context, fset *token.FileSet, fh source.FileHandle, mode source.ParseMode) *parseGoData {
ctx, done := event.Start(ctx, "cache.parseGo", tag.File.Of(fh.URI().Filename()))
defer done()