mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
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:
parent
ba31bb9056
commit
f0068bd333
3
internal/lsp/cache/check.go
vendored
3
internal/lsp/cache/check.go
vendored
@ -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)
|
||||
|
7
internal/lsp/cache/pkg.go
vendored
7
internal/lsp/cache/pkg.go
vendored
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user