1
0
mirror of https://github.com/golang/go synced 2024-11-18 13:14:47 -07:00
go/internal/lsp/mod
Rebecca Stambler 125cc70a40 internal/lsp: add new go.mod requires to files with unused require
This change addresses an underlying issue with the go.mod code, which is
that it was modifying go.mod files without cloning them. This could've
resulted in some ugly race conditions.

We also handle the fact that new dependencies weren't being added
cleanly to files that already had unused dependencies.

Fixes golang/go#39041

Change-Id: I96ee0052d8d29a25e24f0bda9688e780a0fa7442
Reviewed-on: https://go-review.googlesource.com/c/tools/+/241443
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-07-10 04:15:23 +00:00
..
testdata/unchanged internal/lsp/tests: fix reset of golden files 2020-02-19 14:42:13 +00:00
code_lens.go internal/lsp: refactor various module-specific handles in cache 2020-06-23 18:31:46 +00:00
diagnostics.go internal/lsp: add new go.mod requires to files with unused require 2020-07-10 04:15:23 +00:00
format.go internal/lsp: refactor various module-specific handles in cache 2020-06-23 18:31:46 +00:00
hover.go internal/lsp: refactor various module-specific handles in cache 2020-06-23 18:31:46 +00:00
mod_test.go internal/lsp: use a new temporary go.mod for every go list call 2020-06-18 02:37:23 +00:00