If v2.x.y+incompatible exists, then getting the modules based v3 version will always fail?

64 views
Skip to first unread message

T L

unread,
Sep 13, 2019, 2:22:16 PM9/13/19
to golang-nuts
For example,


Is it required to remove all v2.x.y+incompatible versions?

T L

unread,
Sep 13, 2019, 2:53:00 PM9/13/19
to golang-nuts
I really don't get how modules are got.
I create another repo with all versions are module based, but it still fails on getting v2.


It looks, the go command found the target version v2.1.1, but it downloads v1.0.0 in the end.
What is the mistake I made in the process?

andrey mirtchovski

unread,
Sep 13, 2019, 3:19:55 PM9/13/19
to T L, golang-nuts
are you following the steps outlined below?

https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

in particular, for a v2 (or v3) it states that the go.mod file must be updated:

> Update the go.mod file to include a /v3 at the end of the module path in the module directive (e.g., module github.com/my/module/v3).
> --
> 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/71315e79-cbb0-4838-9c85-1ec183f7bb3f%40googlegroups.com.

T L

unread,
Sep 14, 2019, 2:08:53 AM9/14/19
to golang-nuts


On Friday, September 13, 2019 at 3:19:55 PM UTC-4, andrey mirtchovski wrote:
are you following the steps outlined below?

https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

in particular, for a v2 (or v3) it states that the go.mod file must be updated:

> Update the go.mod file to include a /v3 at the end of the module path in the module directive (e.g., module github.com/my/module/v3).


Aha, maybe I have read it, but I forgot it. Thanks for pointing the mistake I made.

On the other hand, I think output message is not very clear, it is even some misleading.
 

On Fri, Sep 13, 2019 at 12:53 PM T L <tapi...@gmail.com> wrote:
>
> I really don't get how modules are got.
> I create another repo with all versions are module based, but it still fails on getting v2.
>
> $ go get github.com/go101/mod_versions_b/v2@latest
> go: finding github.com/go101/mod_versions_b/v2 v2.1.1
> go get github.com/go101/mod_versions_b/v2@latest: module github.com/go101/mod_versions_b@latest (v1.0.0) found, but does not contain package github.com/go101/mod_versions_b/v2
>
> It looks, the go command found the target version v2.1.1, but it downloads v1.0.0 in the end.
> What is the mistake I made in the process?
>
>
> On Friday, September 13, 2019 at 2:22:16 PM UTC-4, T L wrote:
>>
>> For example,
>>
>> $ $ go get github.com/go101/mod_versions/v3@latest
>> go: finding github.com/go101/mod_versions/v3 v3.1.0
>> go get github.com/go101/mod_versions/v3@latest: module github.com/go101/mod_versions@latest (v2.0.0+incompatible) found, but does not contain package github.com/go101/mod_versions/v3
>>
>> Is it required to remove all v2.x.y+incompatible versions?
>
> --
> 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 golan...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages