-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
proposal: dl: add "latest patch version" runner #29984
Comments
Note that The current precision of "each installed go command name refers to exactly one possible version" seems worth preserving. It might be better to let users introduce ambiguity as they see fit. |
There is also a JSON endpoint on golang.org/dl that shows you all available versions: https://golang.org/dl/?mode=json One could query that, determine the latest version, then run go get -u |
That's a good point; I could probably be doing that from bash right now. It would still be a lot more convenient to just have a single binary that gives me the latest of a specific version of Go, but I could go either way depending on whether you think the patch is worth it.
That only shows current supported versions; that's good enough for me, but if we have a EDIT: or maybe you meant I could do that in CI; that's true, I'd just rather use |
Change https://golang.org/cl/160458 mentions this issue: |
Ah right. I was mistakenly running under the assumption that golang.org/cl/155740 had been landed (show all versions if you specify a query param).
You could also write a Go program with no external dependencies that displayed what you need (without having to download jq), though I understand the desire to have it baked into |
I missed that one; thanks. Following.
That's what I'm proposing here :) (sorry, I know what you mean) |
Updated https://golang.org/cl/160458 with a naive implementation that assumes we can use the JSON endpoint just to give everyone an idea of how much extra stuff is involved. If this proposal is accepted, I'm happy to polish it up a bit. |
Note that we already have some ambiguity from |
Personally, I think it's pretty confusing to have the first patch version in the 1.11 line be named I would like to see us release Go 1.12 as |
FWIW:
|
I think that proposal was more agressive. We don't need to follow semver. For example, we can keep on calling Russ also said in that issue that he doesn't see a clear advantage in changing the release process. I think in these few comments we do show that there's a confusion among many users as to what 1.11 or 1.12 mean. Should we open a new proposal? It would be different to #27255, and this way we don't spam this issue, which is only somewhat related. |
@mvdan that is a fair point that the suggestion in #29984 (comment) is not identical to #27255. Personally, I think a more focused proposal makes sense. |
It seems like we should keep the precision of the current scheme and let people give meaning to things like |
In that case, can we perhaps provide suggestions for getting an up to date version in CI? Because right now it's properly a pain. |
@SamWhited I haven't digested this whole conversation, so sorry in advance if this is unhelpful... You could look at using https://github.com/travis-ci/gimme, which works outside of travis and I think is MIT licensed, or alternatively some other options like
|
In CI it would be convenient to have a way to easily download the latest patch version of some minor version of Go and setup the correct PATH without having to specify a specific patch version that would need to be bumped in the CI config every time Go was released. I would like to propose that this be added to the go-gettable packages at golang.org/dl using ".x" for the patch version.
For example, running:
would install a new binary called
go1.11.x
alongside existing versions such asgo1.11.5
andgotip
.I see two possible ways to implement this:
Adding support for ".x" versions to
dl/internal/version
and then generating a .x version as necessary.When a ".x" version is run, it would scan
~/sdk
for any versions of Go that start with "go1.11" (or whatever the prefix was), pick the latest one, and run that.When
go1.11.x download
is run, it would download and parsehttps://storage.googleapis.com/go-builder-data/dl-index.txt
and compare the versions there to whatever is in the~/sdk
directory at the moment. If there is a newer one it would download it to the correct location for that specific version (eg.~/sdk/go1.11.5
).Alternatively, when
genv
command could be updated to always generate ago1.major.x
version whenever it is run that corresponds to the latest version in the tree (eg. internally it would be hard coded to a specific version, just the name would include ".x"). Each time it is rerun, this packages hard coded version would be bumped and the user would have to go get -u the .x version over again to bump the binary to the latest version, then possibly rungo download
again to download the distribution to the~/sdk
tree.EDIT: actually, the builder index doesn't appear to be up to date and https://golang.org/dl/?mode=json only contains the latest two supported versions. We'd have to find somewhere else to get version information or fix the builder data.
The text was updated successfully, but these errors were encountered: