andrewkroh / gvm

Go Version Manager (written in Go for cross-platform usability)
Apache License 2.0
195 stars 24 forks source link

Add newer versions of Go (e.g. 1.17.2, 1.16.9) #38

Closed ole108 closed 3 years ago

ole108 commented 3 years ago

I am still using Go 1.16.6 since this seems to be the newest stable Go release available via gvm. I would love to switch to a more recent (and more secure) version. For me this is the main reason to use a tool like gvm at all.

andrewkroh commented 3 years ago

There's nothing to update in gvm itself. If you run gvm 1.17.2 or gvm 1.16.9 it will download those versions for you.

ole108 commented 3 years ago

gvm available doesn't list them. But much better than not supporting new versions at all. Thanks.

andrewkroh commented 3 years ago

I'm seeing those versions listed fromgvm available. It might be an issue with a stale cache. Try removing ~/.gvm/cache.

$ gvm available
...
1.16beta1   (source, binary)
1.16rc1 (source, binary)
1.16    (source, binary)
1.16.1  (source, binary)
1.16.2  (source, binary)
1.16.3  (source, binary)
1.16.4  (source, binary)
1.16.5  (source, binary)
1.16.6  (source, binary)
1.16.7  (source, binary)
1.16.8  (source, binary)
1.16.9  (source, binary)
1.17beta1   (source, binary)
1.17rc1 (source, binary)
1.17rc2 (source, binary)
1.17    (source, binary)
1.17.1  (source, binary)
1.17.2  (source, binary)
breml commented 3 years ago

I had the same issue. For me, running gvm init and then gvm available did resolve this. Is this expected? From a user point of view, it would be nicer, if gvm available would update the cache if necessary.

andrewkroh commented 3 years ago

It looks like it does not refresh the git repo when source is present. So there are two code paths:

So there is room for improvement here in the case of source code being present. It should do a better job at merging the results of the Go repo git tags and the available binary versions from the Go website. And it should automatically refresh the git repo if it's more than a day old (that's how other code paths behave that use the source repo).

andrewkroh commented 3 years ago

Tracking the improvements in https://github.com/andrewkroh/gvm/issues/39.

andrewkroh commented 3 years ago

Fix released in https://github.com/andrewkroh/gvm/releases/tag/v0.3.2.

breml commented 3 years ago

@andrewkroh Thanks for the quick fix.