gopls/internal/lsp/cache: don't pass snapshot.fset to go/packages

...since we do our own parsing.

Change-Id: Id762cca408692b9535b8bb36017d6719180e5bb1
Reviewed-on: https://go-review.googlesource.com/c/tools/+/449498
Run-TryBot: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Alan Donovan 2022-11-10 15:07:47 -05:00 committed by Gopher Robot
parent d56532ab0e
commit 6f99366264
1 changed files with 1 additions and 1 deletions

View File

@ -345,7 +345,7 @@ func (s *snapshot) config(ctx context.Context, inv *gocommand.Invocation) *packa
packages.NeedModule |
packages.LoadMode(packagesinternal.DepsErrors) |
packages.LoadMode(packagesinternal.ForTest),
Fset: s.FileSet(),
Fset: nil, // we do our own parsing
Overlay: s.buildOverlay(),
ParseFile: func(*token.FileSet, string, []byte) (*ast.File, error) {
panic("go/packages must not be used to parse files")