Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: support -overlay for the go mod subcommand #42491

Closed
stamblerre opened this issue Nov 10, 2020 · 5 comments
Closed

cmd/go: support -overlay for the go mod subcommand #42491

stamblerre opened this issue Nov 10, 2020 · 5 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@stamblerre
Copy link
Contributor

Currently, there is no way to pass the -overlay flag to go mod tidy or other such commands.

/cc @matloob

@matloob
Copy link
Contributor

matloob commented Nov 10, 2020

cc @jayconrod @bcmills

This is a bug, we should fix this for 1.16

@stamblerre stamblerre added this to the Go1.16 milestone Nov 10, 2020
@cagedmantis cagedmantis added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 12, 2020
@heschi
Copy link
Contributor

heschi commented Nov 30, 2020

Is this going to land for 1.16?

@gopherbot
Copy link

Change https://golang.org/cl/274121 mentions this issue: internal/lsp: add go get quick fix on failing imports

gopherbot pushed a commit to golang/tools that referenced this issue Dec 3, 2020
With -mod=readonly set, we no longer automatically add new requires to
go.mod, even the temporary one. We have the go mod tidy code lens, but
that only works on saved files, even in 1.16 due to golang/go#42491.
Plus we may remove the code lens's network access in the future.

Add a simple quick fix for import errors that runs (the moral equivalent
of) go get on the missing import.

Change-Id: Id5764a37ce7db0dce5370da9d648462aefa2042b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/274121
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
marwan-at-work pushed a commit to marwan-at-work/tools that referenced this issue Dec 23, 2020
With -mod=readonly set, we no longer automatically add new requires to
go.mod, even the temporary one. We have the go mod tidy code lens, but
that only works on saved files, even in 1.16 due to golang/go#42491.
Plus we may remove the code lens's network access in the future.

Add a simple quick fix for import errors that runs (the moral equivalent
of) go get on the missing import.

Change-Id: Id5764a37ce7db0dce5370da9d648462aefa2042b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/274121
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
@stamblerre
Copy link
Contributor Author

@matloob: Will this be fixed for 1.16?

@jayconrod
Copy link
Contributor

It looks like this was implemented in CL 272126.

@matloob Please reopen if there's anything left to do here.

@golang golang locked and limited conversation to collaborators Jan 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants