cmd/go: modules not keeping downgraded version of dependency #34794
Labels
FrozenDueToAge
GoCommand
cmd/go
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
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?
github.com/jinzhu/gorm v1.9.11
go get
to an older version (in this casego get github.com/jinzhu/[email protected]
)github.com/jinzhu/gorm v1.9.8
At this point, any go commands I run, whether
go build
orgo mod
commands, overwrite my go.mod file and revert the dependency in go.mod to v1.9.11 (the latest), as well as build with it.What did you expect to see?
I expected the project to leave the dependency as I pinned it (at v1.9.8), and to build with it at that tagged version.
What did you see instead?
The build happened with the latest version of the dependency (including the breaking update), and my go.mod/go.sum files were overwritten to the latest version of the dependency.
The text was updated successfully, but these errors were encountered: