-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tighten up Go version specification #63
Comments
One further observation, Go modules refer to versions as follows: In a similar vein I just made this suggestion: golang/go#32450 (comment) |
I've just been bitten by this too. Working out that the go release tagged 'go1.15beta1' needs |
Hi @myitcv ! Sorry for the late response! |
Yes, it remains an issue just as described in the original description. |
Note that v3.0.0 has now dropped the I still think it would be good to support Go versions as named by upstream, but at least now the behavior is more consistent. |
Hello @myitcv , maybe it is better to use |
@dsame that would seem fair to me. Go versions are now also properly documented (implementation at https://pkg.go.dev/go/version, with doc links at the top), and they indeed begin with |
The problem
I just tried to specify a build matrix that includes the latest beta,
go1.15beta1
(usingstable: 'false'
). This failed becausego1.15beta1
is not a valid version -1.15.0-beta1
is the valid version according tosetup-go
(note the lack ofgo
prefix, and the addition of.0-
).Background
Go versions are not semver: golang/go#27255 (comment)
(I note the discussion in golang/go#32450, but caution there is no specific plan)
For example, here is a list of valid Go versions (i.e. the result of
go version
):go1.14
go1.14.1
go1.15beta1
The issue is that currently the user of
setup-go
has to perform two steps of translation: drop thego
prefix, and think about how to translate to the "semver equivalent".Proposal (breaking change)
I'd like to propose that specifying Go versions in the default case, i.e. an exact version specification, follows the output of
go version
. Hence:means "use
go1.14
" rather than "use the latestgo1.14.x
".If the semver-like specification is required, then I propose that a special prefix is used, perhaps
~
:To my understanding this is a breaking change (hence
v3
candidate) but I wanted to raise the issue for discussion in any case.The text was updated successfully, but these errors were encountered: