cmd/go: error out in 'go mod tidy' if the result uses a module for multiple paths #34650
Labels
FrozenDueToAge
help wanted
modules
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
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?
https://play.golang.org/p/LTTwK6ldWiB
I put below files in current directory.
main.go
go.mod
go build
command is success.$ go clean --modcache $ rm go.sum $ go build . // build ok
And, I did
go mod tidy
command for formatgo.mod
. As a result,go mod tidy
changedgo.mod
file.But,
go build
now failed.What did you expect to see?
I expect the result of
go mod tidy
is able to buld, orgo mod tidy
failed ifgo.mod
file is invalid.What did you see instead?
I tried same procedures, on docker. Unfortunately, I get same result.
$ docker container run -it --name my_golang -v $(pwd):/go/src/ golang:latest
go env
Output ( on container)The text was updated successfully, but these errors were encountered: