Skip to content
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

GVM cannot install 1.21 #61

Closed
andrewvc opened this issue Aug 10, 2023 · 4 comments · Fixed by #62
Closed

GVM cannot install 1.21 #61

andrewvc opened this issue Aug 10, 2023 · 4 comments · Fixed by #62
Labels

Comments

@andrewvc
Copy link
Contributor

andrewvc commented Aug 10, 2023

Go version 1.21 has been released, but unlike previous versions the file that needs to be downloaded is 1.21.0. This means both gvm install 1.21 and gvm install 1.21.0 fail for different reasons; the former due to no file being found and the latter due to it being an invalid version.

A workaround is to manually perform the following:

cd ~/.gvm/versions
curl https://storage.googleapis.com/golang/go1.21.0.darwin-arm64.tar.gz
tar -xzf go1.21.0.darwin-arm64.tar.gz
# note this is 1.21 NOT 1.21.0 in this spot
mv go go1.21.darwin.arm64

A good fix might be, in the case of minor releases, to check both x.y and x.y.0 as downloads to be robust against future changes either way from the go team.

@andrewkroh
Copy link
Owner

andrewkroh commented Aug 10, 2023

A secondary issue is that the tar files for Go 1.21 no longer contain directory entries. This affects the ability to untar the files by gvm:

% tar tvf ~/Downloads/go1.20.7.darwin-arm64.tar.gz | head
drwxr-xr-x  0 0      0           0 Jul 26 17:42 go/
-rw-r--r--  0 gopher wheel    1339 Jul 26 17:40 go/CONTRIBUTING.md
-rw-r--r--  0 gopher wheel    1479 Jul 26 17:40 go/LICENSE
-rw-r--r--  0 gopher wheel    1303 Jul 26 17:40 go/PATENTS
-rw-r--r--  0 gopher wheel    1455 Jul 26 17:40 go/README.md
-rw-r--r--  0 gopher wheel     419 Jul 26 17:40 go/SECURITY.md
-rw-r--r--  0 gopher wheel       8 Jul 26 17:40 go/VERSION
drwxr-xr-x  0 gopher wheel       0 Jul 26 17:41 go/api/
-rw-r--r--  0 gopher wheel    1142 Jul 26 17:40 go/api/README
-rw-r--r--  0 gopher wheel   34102 Jul 26 17:40 go/api/except.txt

% tar tvf ~/Downloads/go1.21.0.darwin-arm64.tar.gz | head
-rw-r--r--  0 0      0        1337 Aug  4 16:14 go/CONTRIBUTING.md
-rw-r--r--  0 0      0        1479 Aug  4 16:14 go/LICENSE
-rw-r--r--  0 0      0        1303 Aug  4 16:14 go/PATENTS
-rw-r--r--  0 0      0        1455 Aug  4 16:14 go/README.md
-rw-r--r--  0 0      0         419 Aug  4 16:14 go/SECURITY.md
-rw-r--r--  0 0      0          35 Aug  4 16:14 go/VERSION
-rw-r--r--  0 0      0        1142 Aug  4 16:14 go/api/README
-rw-r--r--  0 0      0       35424 Aug  4 16:14 go/api/except.txt
-rw-r--r--  0 0      0     2687115 Aug  4 16:14 go/api/go1.1.txt
-rw-r--r--  0 0      0       30821 Aug  4 16:14 go/api/go1.10.txt

@andrewkroh
Copy link
Owner

The tar file issue is going to be fixed based on golang/go#61862, but gvm could add its own handling for this problem.

@dmitshur
Copy link

For reference, including the ".0" in the Go version was Go proposal golang/go#57631 and it only applies to Go 1.21.0 and newer, not older releases. Also worth noting that proposal golang/go#32450 was closed in its place to reassert commitment to the current new pattern, so it's unlikely to change again anytime soon.

@rsc
Copy link

rsc commented Aug 10, 2023

Also worth noting that Go 1.21.0 now has gvm-like functionality built in. See https://go.dev/doc/toolchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants