-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: list -e -json [absolute directory outside gopath] fails #34273
Labels
Milestone
Comments
Change https://golang.org/cl/195065 mentions this issue: |
gopherbot
pushed a commit
to golang/tools
that referenced
this issue
Sep 12, 2019
If an absolute directory path being listed is outside any modules, go list -e returns a non-zero exit status and non-empty stderr, but should suppress the error. This was causing a weird bug when golang.org/cl/186337 was submitted because that changed the conditions when -export was passed, which in turn affected how we suppressed the go list -e error (because -export causes a compile it overtriggers errors, so we explicitly suppress errors in that case). The way the error was being suppressed, no error was generated, and no fake package was generated (which go list is supposed to do), so the contains query fallback code wasn't run. Fixes golang/go#34265 Updates golang/go#34273 Change-Id: I1213cff0e03a62c6976e50db5b2d805aa3ddbb7a Reviewed-on: https://go-review.googlesource.com/c/tools/+/195065 Run-TryBot: Michael Matloob <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Rebecca Stambler <[email protected]>
bcmills
added
modules
NeedsFix
The path to resolution is known, but the work has not been done.
labels
Sep 13, 2019
clintjedwards
pushed a commit
to clintjedwards/tools
that referenced
this issue
Sep 19, 2019
If an absolute directory path being listed is outside any modules, go list -e returns a non-zero exit status and non-empty stderr, but should suppress the error. This was causing a weird bug when golang.org/cl/186337 was submitted because that changed the conditions when -export was passed, which in turn affected how we suppressed the go list -e error (because -export causes a compile it overtriggers errors, so we explicitly suppress errors in that case). The way the error was being suppressed, no error was generated, and no fake package was generated (which go list is supposed to do), so the contains query fallback code wasn't run. Fixes golang/go#34265 Updates golang/go#34273 Change-Id: I1213cff0e03a62c6976e50db5b2d805aa3ddbb7a Reviewed-on: https://go-review.googlesource.com/c/tools/+/195065 Run-TryBot: Michael Matloob <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Rebecca Stambler <[email protected]>
Another variation of this error:
|
I believe this is fixed in Go 1.15:
@matloob can you confirm this is now working as intended? |
Yeah, it's now working as intended. Closing. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
GO111MODULE=on
go list -e -json /Users/matloob/Desktop
(or list any existing directory outside of any module)What did you expect to see?
exit status of 0, empty stderr, and a "Fake" package with errors set to a message saying the directory is outside any modules.
What did you see instead?
exit status of 1 and stderr of "go: directory ../Desktop outside available modules\n"
The text was updated successfully, but these errors were encountered: