зеркало из https://github.com/golang/tools.git
internal/lsp/cache: fix data races to view.options
Use the concurrency-safe view.Options method. Fixes golang/go#54214 Change-Id: If75a544ae477ee7361540c3933a18e3366d8ffd7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/420954 Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dylan Le <dungtuanle@google.com>
This commit is contained in:
Родитель
0d04f65da9
Коммит
ddb90ecd31
|
@ -141,7 +141,7 @@ func (s *snapshot) load(ctx context.Context, allowNetwork bool, scopes ...interf
|
|||
}
|
||||
|
||||
moduleErrs := make(map[string][]packages.Error) // module path -> errors
|
||||
filterer := buildFilterer(s.view.rootURI.Filename(), s.view.gomodcache, s.view.options)
|
||||
filterer := buildFilterer(s.view.rootURI.Filename(), s.view.gomodcache, s.view.Options())
|
||||
newMetadata := make(map[PackageID]*KnownMetadata)
|
||||
for _, pkg := range pkgs {
|
||||
// The Go command returns synthetic list results for module queries that
|
||||
|
|
|
@ -392,7 +392,7 @@ func (s *snapshot) locateTemplateFiles(ctx context.Context) {
|
|||
relativeTo := s.view.folder.Filename()
|
||||
|
||||
searched := 0
|
||||
filterer := buildFilterer(dir, s.view.gomodcache, s.view.options)
|
||||
filterer := buildFilterer(dir, s.view.gomodcache, s.view.Options())
|
||||
// Change to WalkDir when we move up to 1.16
|
||||
err := filepath.Walk(dir, func(path string, fi os.FileInfo, err error) error {
|
||||
if err != nil {
|
||||
|
|
Загрузка…
Ссылка в новой задаче