diff options
author | Rebecca Stambler <rstambler@golang.org> | 2019-10-15 14:47:05 -0400 |
---|---|---|
committer | Rebecca Stambler <rstambler@golang.org> | 2019-10-16 19:48:01 +0000 |
commit | f0068bd333b234c38cb0ed6b2946665a40ad171b (patch) | |
tree | 418e5e7c04d3a3c5581b0ebf883d93733fba2972 | |
parent | ba31bb905655611fcaee0e9db7433118a68d4de2 (diff) | |
download | golang-x-tools-f0068bd333b234c38cb0ed6b2946665a40ad171b.tar.gz |
internal/lsp: remove misleading check span
This span resulted in misleading information, since it would appear any
time you called the Check function. This function often returns cached
results, so it's not particularly useful.
Change-Id: I26be652a99b906fb2e8703ff9af86fbe2ef5fc5d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/201219
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r-- | internal/lsp/cache/check.go | 3 | ||||
-rw-r--r-- | internal/lsp/cache/pkg.go | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/internal/lsp/cache/check.go b/internal/lsp/cache/check.go index 620f3021a..d22be5132 100644 --- a/internal/lsp/cache/check.go +++ b/internal/lsp/cache/check.go @@ -174,9 +174,6 @@ func (cph *checkPackageHandle) Check(ctx context.Context) (source.Package, error } func (cph *checkPackageHandle) check(ctx context.Context) (*pkg, error) { - ctx, done := trace.StartSpan(ctx, "cache.checkPackageHandle.check", telemetry.Package.Of(cph.m.id)) - defer done() - v := cph.handle.Get(ctx) if v == nil { return nil, errors.Errorf("no package for %s", cph.m.id) diff --git a/internal/lsp/cache/pkg.go b/internal/lsp/cache/pkg.go index 9b3256a4e..d570cbaf4 100644 --- a/internal/lsp/cache/pkg.go +++ b/internal/lsp/cache/pkg.go @@ -23,9 +23,10 @@ type pkg struct { view *view // ID and package path have their own types to avoid being used interchangeably. - id packageID - mode source.ParseMode - pkgPath packagePath + id packageID + pkgPath packagePath + mode source.ParseMode + files []source.ParseGoHandle errors []packages.Error imports map[packagePath]*pkg |