-
Notifications
You must be signed in to change notification settings - Fork 18k
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
x/tools/internal/imports: breaks when gopls specifies GOPROXY=off #43333
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Comments
I can't reproduce this. Do you have a log? |
Reproduced in experimental workspace mode with
|
Change https://golang.org/cl/283172 mentions this issue: |
rinchsan
pushed a commit
to rinchsan/gosimports
that referenced
this issue
May 30, 2021
Now that gopls is passing GOPROXY=off, running go list -m gives an error if any modules aren't downloaded. We need to pass -e to get results for the modules that we do have. Also add the missing error handling that resulted in silent failure. That, in turn, reveals that we need to explicitly ignore an expected error. Fixes golang/go#43333. Change-Id: I77604650b67a3c480d8231c65f0486f22e4a6722 Reviewed-on: https://go-review.googlesource.com/c/tools/+/283172 Trust: Heschi Kreinick <heschi@google.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Unimported completions work as expected, but imports-on-save does not add imports for unknown symbols that refer to exported variables.
Adding
debug.VersionInfo
to a package ingolang.org/x/tools/internal/lsp
will add an import for https://pkg.go.dev/golang.org/x/tools/internal/lsp/debug, whereas addingdebug.Version
does not. The only different is thatVersionInfo
is a function andVersion
is an exported variable./cc @heschik
The text was updated successfully, but these errors were encountered: