diff --git a/internal/lsp/cache/analysis.go b/internal/lsp/cache/analysis.go index 5c206fa707..b20dc1ab6f 100644 --- a/internal/lsp/cache/analysis.go +++ b/internal/lsp/cache/analysis.go @@ -104,20 +104,26 @@ func (s *snapshot) actionHandle(ctx context.Context, id packageID, mode source.P } deps = append(deps, reqActionHandle) } - // An analysis that consumes/produces facts - // must run on the package's dependencies too. - if len(a.FactTypes) > 0 { - importIDs := make([]string, 0, len(cph.m.deps)) - for _, importID := range cph.m.deps { - importIDs = append(importIDs, string(importID)) - } - sort.Strings(importIDs) // for determinism - for _, importID := range importIDs { - depActionHandle, err := s.actionHandle(ctx, packageID(importID), source.ParseExported, a) - if err != nil { - return nil, err + + // TODO(golang/go#35089): Re-enable this when we doesn't use ParseExported + // mode for dependencies. In the meantime, disable analysis for dependencies, + // since we don't get anything useful out of it. + if false { + // An analysis that consumes/produces facts + // must run on the package's dependencies too. + if len(a.FactTypes) > 0 { + importIDs := make([]string, 0, len(cph.m.deps)) + for _, importID := range cph.m.deps { + importIDs = append(importIDs, string(importID)) + } + sort.Strings(importIDs) // for determinism + for _, importID := range importIDs { + depActionHandle, err := s.actionHandle(ctx, packageID(importID), source.ParseExported, a) + if err != nil { + return nil, err + } + deps = append(deps, depActionHandle) } - deps = append(deps, depActionHandle) } }