cmd/go: improve "invalid pseudo-version: does not match version-control timestamp" error message UX #36974
Labels
FrozenDueToAge
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, I found this in 1.13.5, and
devel +866920a073
is current as of a clone on 2020-02-01.What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I encountered a
go mod tidy
error in the wild (the cause of the error is irrelevant & fixed, the error message is what I want to focus on):Full Repro
What did you expect to see?
It would be nice if the error message date format matched the go.mod/go.sum date format. This would allow for cut-and-paste-ability to fix the error. Essentially, I believe the following two lines should use the same date format:
go/src/cmd/go/internal/modfetch/pseudo.go
Line 58 in 1fb7d54
go/src/cmd/go/internal/modfetch/coderepo.go
Line 492 in 1fb7d54
What did you see instead?
I saw
2019-07-26T14:27:06Z
in the error message and did not realize that this datestamp was directly relatable to the corrupted20190626162700
datestamp in the pseudo version. I probably sank an hour or two tracking down the above lines and reinventing the following wheel:Before I facepalmed and realized that the timestamp I wanted was in the error message all along, just formatted differently than what
go.mod
expected.The text was updated successfully, but these errors were encountered: