-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: get -u -t fails to update go.mod when "no non-test Go files in path" #45112
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
Comments
I thought this might be a duplicate of #33526, but it still reproduces at tip. |
This invocation is missing the
This command is failing in step (2), which causes the overall operation to fail. In CL 255970 (for #41315), we decided that we should only update the The |
I've tried |
@kbalk Is |
There's no error, but there's no change to
|
That is an error, is it not? |
Yes ... my apologies, I was thinking of a command line error. |
FWIW, in Go 1.16 the explicit versions on the command line should serve as upper bounds for the implicit
|
I have updated to Go 1.16 and I could use your suggestion. But it would be nice if |
In 1.16,
It sounds like this is working correctly now, so I'll close this issue but let me know if I missed something. |
The problem still exists and I get a command line warning/error. As mentioned in the problem description: "All I have and need in terms of programming is this single go file with a package name of testing. "
|
That error is expected for With the |
So there's currently no way to update go.mod when I just have a test package. I cannot use dependabot to check for updates. |
Use the |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Did not test on the latest version.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have a Go module (
module_test.go
) for testing a Terraform init/plan/apply. All I have and need in terms of programming is this singlego
file with a package name oftesting
. I have ago.mod
file as shown below. The directorytardigrade-ci/tests
mentioned ingo.mod
will containmodule_test.go
,go.mod
,go.sum
and some Terraform files.I ran
go get -u -t
to get updated versions ingo.mod
. In particular,github.com/stretchr/testify
had released an updated version.What did you expect to see?
Updated version for
github.com/stretchr/testify
; instead of v1.6.1, expected to see v1.7.0.What did you see instead?
go.mod
file was unchanged. Will updates togo.mod
only occur when there are non-test files?Note: I also tried running
go clean -modcache
, then runninggo get -u -t
and that had no effect.The text was updated successfully, but these errors were encountered: