You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes
What did you do?
Added: replace gerrit.levenlabs.com/ctxtime => gerrit.levenlabs.com/ctxtime latest
to my go.mod file.
Run go get
What did you expect to see?
I expected it to leave latest in replace line so that the latest version is always fetched when go get is run. Ideally we can commit latest and when CI runs and calls go get it'll always get the latest version of this particular module (which is an internal/private module). Additionally, when developers run go get they also get the latest version of that module and when they run go get -u the go.mod file won't be changed to remove the latest directive.
What did you see instead?
When go mod tidy or go get is run, the latest is replaced with the latest version at that time.
The text was updated successfully, but these errors were encountered:
katiehockman
changed the title
Module replace line with "latest" is replaced with version
cmd/go: replace directive for "latest" is replaced with latest version
Sep 3, 2019
This is intentional behavior as described in https://golang.org/cmd/go/#hdr-The_go_mod_file. It's important that go.mod files only have versions in semver form to have reproducible builds for other modules that may depend on it.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
replace gerrit.levenlabs.com/ctxtime => gerrit.levenlabs.com/ctxtime latest
to my
go.mod
file.go get
What did you expect to see?
I expected it to leave
latest
in replace line so that the latest version is always fetched whengo get
is run. Ideally we can commitlatest
and when CI runs and callsgo get
it'll always get the latest version of this particular module (which is an internal/private module). Additionally, when developers rungo get
they also get the latest version of that module and when they rungo get -u
thego.mod
file won't be changed to remove thelatest
directive.What did you see instead?
When
go mod tidy
orgo get
is run, thelatest
is replaced with the latest version at that time.The text was updated successfully, but these errors were encountered: