Who can explain more on the "upgrade" module version selector?

78 views
Skip to first unread message

T L

unread,
Sep 14, 2019, 4:35:12 AM9/14/19
to golang-nuts

The string "upgrade" is like "latest", but if the module is currently required at a later version than the version "latest" would select (for example, a newer pre-release version), "upgrade" will select the later version instead.

But I don't very get it. Who can explain it more to let me understand it better?


Axel Wagner

unread,
Sep 14, 2019, 11:04:06 AM9/14/19
to T L, golang-nuts
Can you explain more specifically what you don't understand?
The example seems pretty clear: Say you currently require the latest master commit (e.g. by using a pseudo-version), which is a couple commits ahead of the latest released version, then "latest" will select the release, while "upgrade" will select the current commit.

--
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/6a4ace13-3ad8-4154-846c-e8d5f343b022%40googlegroups.com.

T L

unread,
Sep 15, 2019, 12:11:15 PM9/15/19
to golang-nuts


On Saturday, September 14, 2019 at 11:04:06 AM UTC-4, Axel Wagner wrote:
Can you explain more specifically what you don't understand?
The example seems pretty clear: Say you currently require the latest master commit (e.g. by using a pseudo-version), which is a couple commits ahead of the latest released version, then "latest" will select the release, while "upgrade" will select the current commit.

Do you mean if there is already a require line in the go.mod file,
which requires a non-formal tagged version,
then "go get ...@latest" will rollback the require to the latest formal tagged version,
but "go get ...@upgrade" will not?


 

On Sat, Sep 14, 2019 at 10:35 AM T L <tapi...@gmail.com> wrote:

The string "upgrade" is like "latest", but if the module is currently required at a later version than the version "latest" would select (for example, a newer pre-release version), "upgrade" will select the later version instead.

But I don't very get it. Who can explain it more to let me understand it better?


--
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.

Axel Wagner

unread,
Sep 15, 2019, 12:35:27 PM9/15/19
to T L, golang-nuts
On Sun, Sep 15, 2019 at 6:11 PM T L <tapi...@gmail.com> wrote:
Do you mean if there is already a require line in the go.mod file,
which requires a non-formal tagged version,
then "go get ...@latest" will rollback the require to the latest formal tagged version,
but "go get ...@upgrade" will not?

AIUI (not a specialist, didn't try): *If* that "non-formal tagged version" is a child-commit of the latest tagged version, then yes, that's what I mean. If it isn't, then either will use the tagged version.
 


 

On Sat, Sep 14, 2019 at 10:35 AM T L <tapi...@gmail.com> wrote:

The string "upgrade" is like "latest", but if the module is currently required at a later version than the version "latest" would select (for example, a newer pre-release version), "upgrade" will select the later version instead.

But I don't very get it. Who can explain it more to let me understand it better?


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/6a4ace13-3ad8-4154-846c-e8d5f343b022%40googlegroups.com.

--
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/f17a504d-95da-46b4-ad0c-3b544e579176%40googlegroups.com.

T L

unread,
Sep 15, 2019, 12:41:09 PM9/15/19
to golang-nuts


On Sunday, September 15, 2019 at 12:35:27 PM UTC-4, Axel Wagner wrote:
On Sun, Sep 15, 2019 at 6:11 PM T L <tapi...@gmail.com> wrote:
Do you mean if there is already a require line in the go.mod file,
which requires a non-formal tagged version,
then "go get ...@latest" will rollback the require to the latest formal tagged version,
but "go get ...@upgrade" will not?

AIUI (not a specialist, didn't try): *If* that "non-formal tagged version" is a child-commit of the latest tagged version, then yes, that's what I mean. If it isn't, then either will use the tagged version.

Thanks for helping me get the doc says!
 
 


 

On Sat, Sep 14, 2019 at 10:35 AM T L <tapi...@gmail.com> wrote:

The string "upgrade" is like "latest", but if the module is currently required at a later version than the version "latest" would select (for example, a newer pre-release version), "upgrade" will select the later version instead.

But I don't very get it. Who can explain it more to let me understand it better?


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/6a4ace13-3ad8-4154-846c-e8d5f343b022%40googlegroups.com.

--
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