From 061905c3e8a670dd567f336b966a5eb55a6cf1e4 Mon Sep 17 00:00:00 2001 From: Heschi Kreinick Date: Thu, 29 Oct 2020 14:44:44 -0400 Subject: [PATCH] internal/lsp/cache: stop unnecessarily waiting for IWL These were added in https://golang.org/cl/237419 and I don't think they actually fixed anything. I'd like to remove them and see if anything goes south. Change-Id: I2f3a48d0e8e40b7a79b963a9319d426cbc6f5d9a Reviewed-on: https://go-review.googlesource.com/c/tools/+/266341 Trust: Heschi Kreinick Run-TryBot: Heschi Kreinick gopls-CI: kokoro TryBot-Result: Go Bot Reviewed-by: Rebecca Stambler --- internal/lsp/cache/mod.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/internal/lsp/cache/mod.go b/internal/lsp/cache/mod.go index f95590f6cd..6d84c501c2 100644 --- a/internal/lsp/cache/mod.go +++ b/internal/lsp/cache/mod.go @@ -202,9 +202,6 @@ func (s *snapshot) ModWhy(ctx context.Context, fh source.FileHandle) (map[string if fh.Kind() != source.Mod { return nil, fmt.Errorf("%s is not a go.mod file", fh.URI()) } - if err := s.awaitLoaded(ctx); err != nil { - return nil, err - } if handle := s.getModWhyHandle(fh.URI()); handle != nil { return handle.why(ctx, s) } @@ -296,9 +293,6 @@ func (s *snapshot) ModUpgrade(ctx context.Context, fh source.FileHandle) (map[st if fh.Kind() != source.Mod { return nil, fmt.Errorf("%s is not a go.mod file", fh.URI()) } - if err := s.awaitLoaded(ctx); err != nil { - return nil, err - } if handle := s.getModUpgradeHandle(fh.URI()); handle != nil { return handle.upgrades(ctx, s) }