mirror of
https://github.com/golang/go
synced 2024-11-18 12:54:44 -07:00
065b96d36c
Changing build flags (-modfile) while work is happening in the background causes races. Explicitly detect relevant configuration changes and only modify the ProcessEnv then, when the resolver is inactive after the call to ClearForNewMod. This still leaves a very small window for a race: if refreshProcessEnv has already captured env but not yet started priming the cache, it may race with the modification. But I don't expect it to be a problem in practice. Fixes golang/go#39865. Change-Id: I31c79f39be55975fee14aa0e548b060c46cdd882 Reviewed-on: https://go-review.googlesource.com/c/tools/+/241317 Run-TryBot: Heschi Kreinick <heschi@google.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
.. | ||
analysis.go | ||
cache.go | ||
check.go | ||
error_test.go | ||
errors.go | ||
keys.go | ||
load.go | ||
mod_tidy.go | ||
mod.go | ||
os_darwin.go | ||
os_windows.go | ||
parse.go | ||
pkg.go | ||
session.go | ||
snapshot.go | ||
view_test.go | ||
view.go |