-
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: go adds unnecessary module dependency #34290
Comments
Given you're still on 1.12, this is probably #31248, fixed in 1.13. |
/watch |
@alanconway As @zikaeroh mentioned, there were fixes in this area for Go 1.13. If you run through these steps with Go 1.13, does the problem still happen? |
Still happens on 1.13, I uninstalled the 1.12 installation to ensure I wasn't picking up any old libs. My symptoms are different from #31248 - |
I got the same issue as @alanconway and I use go 1.13 |
@alanconway, I'm unable to reproduce the behavior you observed using This may be a duplicate of #34086, but without a current reproducer it's hard to be sure. |
@bcmills 1.13.1 works for me, looks like it's fixed :) Thanks. |
Some supplement for this: it only works when you use go 1.13.1 and also use 1.13.1 in go.mod file. And another question: when using a newer go version, should go.mod's go version be updated automatically @bcmills , thanks! |
The
No. Newer versions of the toolchain can compile older versions of the language spec, so in general it should not be necessary to update the |
@douglarek, the problem originally reported here does not seem to reproduce, so I'm going to close this issue. If you're seeing something you believe to be a bug, please file a new issue with concrete steps to reproduce it — ideally, a repo that we can check out at a specific commit to demonstrate the problem. |
What version of Go are you using (
go version
)?go version go1.12.9 linux/amd64
Does this issue reproduce with the latest release?
Don't know, using latest packaged release on Fedora.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
No incorrect dependencies in go.mod.
Agreement between go tools on what dependencies are required.
After a successful
go build; go mod tidy
, subsequent calls ofgo build
orgo mod tidy
with no code changes should not change go.mod.What did you see instead?
Calling
go list -m
or any go comand (go build etc.) adds a line to go.modCalling
go tidy
removes that line.I suspect this may be some environmental factor on my machine as I haven't heard anyone else with this problem but I don't know what it might be.
The text was updated successfully, but these errors were encountered: