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>
This commit is contained in:
Rebecca Stambler 2019-10-15 14:47:05 -04:00
parent ba31bb9056
commit f0068bd333
2 changed files with 4 additions and 6 deletions

View File

@ -174,9 +174,6 @@ func (cph *checkPackageHandle) Check(ctx context.Context) (source.Package, error
} }
func (cph *checkPackageHandle) check(ctx context.Context) (*pkg, 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) v := cph.handle.Get(ctx)
if v == nil { if v == nil {
return nil, errors.Errorf("no package for %s", cph.m.id) return nil, errors.Errorf("no package for %s", cph.m.id)

View File

@ -23,9 +23,10 @@ type pkg struct {
view *view view *view
// ID and package path have their own types to avoid being used interchangeably. // ID and package path have their own types to avoid being used interchangeably.
id packageID id packageID
mode source.ParseMode pkgPath packagePath
pkgPath packagePath mode source.ParseMode
files []source.ParseGoHandle files []source.ParseGoHandle
errors []packages.Error errors []packages.Error
imports map[packagePath]*pkg imports map[packagePath]*pkg