Pseudo version showing different in go1.12 and go1.13

218 views
Skip to first unread message

Nitish Saboo

unread,
Apr 1, 2020, 8:07:19 AM4/1/20
to golang-nuts
Hi,

I created go.mod file from two different go versions 1.12 and 1.13:

module /home/nsaboo/project

go 1.13

require (
github.com/aws/aws-sdk-go v1.8.3-0.20170325041625-2150862edc16                <<<<<<<<<<<<
github.com/go-ini/ini v1.55.0 // indirect
github.com/jmespath/go-jmespath v0.3.0 // indirect
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20150102060019-636edb2500d2 // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20150102055932-2df3c0c80243 // indirect
github.com/xeipuuv/gojsonschema v0.0.0-20150523020227-6ea07b2b0148 // indirect
gopkg.in/ini.v1 v1.55.0 // indirect
)


module /home/nsaboo/project

go 1.12

require (
github.com/aws/aws-sdk-go v0.0.0-20170325041625-2150862edc16                  <<<<<<<<<<<<<<
github.com/go-ini/ini v1.55.0 // indirect
github.com/jmespath/go-jmespath v0.3.0 // indirect
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20150102060019-636edb2500d2 // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20150102055932-2df3c0c80243 // indirect
github.com/xeipuuv/gojsonschema v0.0.0-20150523020227-6ea07b2b0148 // indirect
gopkg.in/ini.v1 v1.55.0 // indirect
)

What I see for aws/aws-sdk-go dependency is,  In the case of go1.13 the pseudo-version is showing v1.8.3-0 whereas in the case of go1.12 the pseudo-version is showing v0.0.0 though the commitid hash and timestamp is the same in both the cases.

1) Is this expected behavior?

2) Has the pseudo version format/logic changed from go1.12 to go1.13?

Thanks,
Nitish

Nitish Saboo

unread,
Apr 2, 2020, 3:19:50 AM4/2/20
to golang-nuts
Hi,

Apologies forgot to mention, I am treying to migrate from go deps to go modules.
Following is what is present in the Godeps for aws-sdk-go dependency
{
"ImportPath": "github.com/aws/aws-sdk-go",
"Rev": "2150862edc16fe370b0ad7e34e30cb7b06f9b265"
}

Please let me know what am I missing here?

Thanks,
Nitish

Nitish Saboo

unread,
Apr 3, 2020, 8:37:22 AM4/3/20
to golang-nuts
Hi,

Can someone please guide me on this ?

Thanks,
Nitish

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1cd47484-9cfc-4383-8dfb-61b8d7727acb%40googlegroups.com.

Sean Liao

unread,
Apr 3, 2020, 11:46:15 AM4/3/20
to golang-nuts
https://golang.org/cmd/go/#hdr-Pseudo_versions

The note about v0.0.0 originally being the only form is relevant

Nitish Saboo

unread,
Apr 3, 2020, 2:02:30 PM4/3/20
to Sean Liao, golang-nuts
Hi,

I have already gone through this doc.
The thing is I am getting two different pseudo versions for two different go versions.
Are you saying I should get pseudo version v0.0.0 for both the go versions?

Thanks,
Nitish

On Fri, 3 Apr 2020, 21:16 Sean Liao, <seank...@gmail.com> wrote:
https://golang.org/cmd/go/#hdr-Pseudo_versions

The note about v0.0.0 originally being the only form is relevant

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.

Sean Liao

unread,
Apr 3, 2020, 2:04:28 PM4/3/20
to golang-nuts
> (This was originally the only form, so some older go.mod files use this form even for commits that do follow tags.)

older refers to vgo, go1.11, go1.12

Nitish Saboo

unread,
Apr 4, 2020, 11:07:44 AM4/4/20
to Sean Liao, golang-nuts
Hi Sean,

Thank you for your response.
The pseudo version that I am getting in go-1.13 is 'v1.8.3-0' and if you see there is a "-0" in the pseudo version.
Whereas,
The pseudo version that I am getting in go-1.12 is 'v0.0.0' .

1)We get such outputs only when the dependency version that is being used in go.mod is not tagged ...am I correct?

> (This was originally the only form, so some older go.mod files use this form even for commits that do follow tags.)

older refers to vgo, go1.11, go1.12

2)Are you saying I am getting the expected output for both the versions and pseudo format changed from go1.13 onwards?

Thanks,
Nitish


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.

Sean Liao

unread,
Apr 4, 2020, 11:09:47 AM4/4/20
to Nitish Saboo, golang-nuts
yes

Nitish Saboo

unread,
Apr 5, 2020, 8:49:59 AM4/5/20
to Sean Liao, golang-nuts
Hi Sean,

Thank you for your response. 
I hope you meant 'yes' for both the questions that I had posted....am I right?

Thanks,
Nitish

Sean Liao

unread,
Apr 5, 2020, 8:57:36 AM4/5/20
to Nitish Saboo, golang-nuts
yes

go1.12 and earlier used v0.0.0-x... for all cases
go1.13 and later uses different formats depending on the situation

the change was mentioned in the release notes
https://golang.org/doc/go1.13#version-validation
and the current formats and when they are used are in the help pages
https://golang.org/cmd/go/#hdr-Pseudo_versions

Nitish Saboo

unread,
Apr 8, 2020, 9:12:30 AM4/8/20
to Sean Liao, golang-nuts
Thankyou Sean.

Thanks,
Nitish
Reply all
Reply to author
Forward
0 new messages