mirror of
https://github.com/golang/go
synced 2024-11-18 08:54:45 -07:00
internal/lsp/cache: handle missing mod file
If the config changes in non-module mode, don't look at the nonexistant mod file. I actually caught this case after review but didn't finish the job. Fixes golang/go#40121. Change-Id: Ic888f7eab5f882e6ca79b046b5a3fb37b3b19e5c Reviewed-on: https://go-review.googlesource.com/c/tools/+/241520 Run-TryBot: Heschi Kreinick <heschi@google.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
7370b03448
commit
31b9a74881
2
internal/lsp/cache/view.go
vendored
2
internal/lsp/cache/view.go
vendored
@ -407,7 +407,7 @@ func (v *View) RunProcessEnvFunc(ctx context.Context, fn func(*imports.Options)
|
||||
}
|
||||
v.cleanupProcessEnv()
|
||||
}
|
||||
v.cachedModFileIdentifier = modFH.Identity().Identifier
|
||||
v.cachedModFileIdentifier = modFileIdentifier
|
||||
v.cachedBuildFlags = currentBuildFlags
|
||||
v.cleanupProcessEnv, err = v.populateProcessEnv(ctx, modFH, sumFH)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user