-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: 'go get -d' does not diagnose dependencies with errors #41315
Comments
Change https://golang.org/cl/254819 mentions this issue: |
Change https://golang.org/cl/254820 mentions this issue: |
Due to an inverted condition, we were emitting a "matched no packages" warning twice in some cases and not at all in others. For #41315 Change-Id: I472cd2d4f75811c8734852f2bdd7346f4c612816 Reviewed-on: https://go-review.googlesource.com/c/go/+/254819 Trust: Bryan C. Mills <bcmills@google.com> Trust: Michael Matloob <matloob@golang.org> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> Reviewed-by: Michael Matloob <matloob@golang.org>
For #37438 For #41315 For #36460 Change-Id: I17041c35ec91ff6ffb547e0f32572673d191b1ed Reviewed-on: https://go-review.googlesource.com/c/go/+/254820 Trust: Bryan C. Mills <bcmills@google.com> Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
You could argue (maybe) that we shouldn't error out due to syntax errors in However, a similar problem can be reproduced with only missing imports (no syntax errors), which |
Change https://golang.org/cl/255969 mentions this issue: |
Change https://golang.org/cl/255970 mentions this issue: |
For #41315 Change-Id: I3989bcb051ae57dd2d8f89759d241d4cdce49659 Reviewed-on: https://go-review.googlesource.com/c/go/+/255969 Trust: Bryan C. Mills <bcmills@google.com> Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
go get -d
“instructsget
to download the source code needed to build the named packages, including downloading necessary dependencies ….”As such, I would expect that if a dependency cannot be found or downloaded, or has a syntax error that prevents its own transitive dependencies from being identified, then
go get
should print an error and exit with a nonzero status code.Instead, on all
go
versions I tested, it silently succeeds in the face of syntax errors.CC @jayconrod @matloob
The text was updated successfully, but these errors were encountered: