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) }