how to create path/v2 and path/v3 and path/v4 in same repo

100 views
Skip to first unread message

Jason E. Aten

unread,
Aug 27, 2019, 6:31:57 AM8/27/19
to golang-nuts
With an eye towards implementing semantic import path versioning, is it possible to have


point (somehow, the question is how?) to different tags within the same https://github.com/me/path  repo?

Thanks!

Chris Hines

unread,
Aug 27, 2019, 7:49:45 AM8/27/19
to golang-nuts
You might be able to find an answer to your question in this article: https://github.com/go-modules-by-example/index/tree/master/016_major_version_repo_strategy

Paul Jolly

unread,
Aug 27, 2019, 8:10:59 AM8/27/19
to Chris Hines, golang-nuts
To add to Chris' response also see the wiki
https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

Also see https://github.com/golang/go/issues/33637 for details on how
modules documentation will be getting a revamp in 1.14.
> --
> 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/3f0902ba-3f19-4b74-99a0-969d14dc6bc7%40googlegroups.com.

Jason E. Aten

unread,
Aug 27, 2019, 10:39:59 PM8/27/19
to golang-nuts
Thanks guys.


seems to say that the answer is yes, but that it won't be backwards compatible with tags and go.mod alone.

Paul Jolly

unread,
Aug 28, 2019, 2:49:53 AM8/28/19
to Jason E. Aten, golang-nuts
The short version is:

* semantic version git tags are the means of releasing new versions
* you can follow whatever strategy you like when it comes to
maintaining multiple major versions of a module (you might not need
to); branch, subdirectory... Just so long as the git tag gets you to
the right commit
* major versions N>=2 which do not resolve to a module which has /vN
at the end of the module path will be required as +incompatible
> --
> 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/1801b795-ff54-425a-abc4-7ec28b0f679e%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages