mirror of
https://github.com/golang/go
synced 2024-11-18 21:44:45 -07:00
563860d11d
Resolvers are lazy initialized. That worked fine until the addition of the scan semaphore -- it's not a good idea to create that lazily, since you can't synchronize on a channel that doesn't exist. Specifically, this caused a gopls hang when completion finished without needing to use the resolver. In that case, we'd call ClearForNewScan/Mod on an uninitialized resolver, and then hang receiving from a nil channel. Instead, eagerly initialize where convenient, and particularly the scan semaphore. Change-Id: I3adb1ae76b751650995e50f50346e06fd9c9f88d Reviewed-on: https://go-review.googlesource.com/c/tools/+/214258 Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
.. | ||
apidiff | ||
fastwalk | ||
gopathwalk | ||
imports | ||
jsonrpc2 | ||
lsp | ||
memoize | ||
module | ||
semver | ||
span | ||
telemetry | ||
testenv | ||
tool | ||
xcontext |