mirror of https://github.com/golang/go.git
This CL fixes a several bugs in workspace invalidation: - When invalidating the workspace due to a change in gopls.mod or go.work files, we should not update the workspace if the change does not parse. There was a comment to this effect, but it was not properly implemented. - Check go.work before gopls.mod, consistent with our intitial workspace load. - If we get an 'unchanged' change (such as a save) to go.work, don't continue looking for gopls.mod. A regression test that inadvertently relied on our mishandling of broken go.work files is updated to have the correct syntax. A new regtest expectation is added to assert on a clean workspace. For golang/go#44696 Change-Id: I2b7e739573e225cadfbf8cc892a0b5daf0191e40 Reviewed-on: https://go-review.googlesource.com/c/tools/+/382115 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> |
||
|---|---|---|
| .. | ||
| doc.go | ||
| env.go | ||
| env_test.go | ||
| expectation.go | ||
| regtest.go | ||
| runner.go | ||
| wrappers.go | ||