mirror of
https://github.com/golang/go
synced 2024-11-18 08:14:41 -07:00
internal/lsp/cache: show update codelens in go.mod when -mod=vendor
Ignore vendor folder while checking module updates to be able to capture updates. Fixes golang/go#38711 Change-Id: I522246459f98c238c2b5cd28e6028f2b94cde7d9 Reviewed-on: https://go-review.googlesource.com/c/tools/+/232477 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
parent
10921354bc
commit
7521f6f425
5
internal/lsp/cache/mod.go
vendored
5
internal/lsp/cache/mod.go
vendored
@ -240,10 +240,11 @@ func dependencyUpgrades(ctx context.Context, cfg *packages.Config, folder string
|
||||
if len(data.origParsedFile.Require) == 0 {
|
||||
return nil
|
||||
}
|
||||
// Run "go list -u -m all" to be able to see which deps can be upgraded.
|
||||
// Run "go list -mod readonly -u -m all" to be able to see which deps can be
|
||||
// upgraded without modifying mod file.
|
||||
inv := gocommand.Invocation{
|
||||
Verb: "list",
|
||||
Args: []string{"-u", "-m", "all"},
|
||||
Args: []string{"-mod", "readonly", "-u", "-m", "all"},
|
||||
BuildFlags: cfg.BuildFlags,
|
||||
Env: cfg.Env,
|
||||
WorkingDir: folder,
|
||||
|
Loading…
Reference in New Issue
Block a user