kevincobain2000/gobrew

1.15.15 is missing ?

gedw99 opened this issue · 7 comments

I was playing around with a golang project today. This one...

module github.com/ajstarks/dchart

go 1.15

When I did the normal go brew thing it failed as:

gobrew use mod
==> [Info] Downloading version: 1.15.15
==> [Info] Downloading from: https://go.dev/dl/go1.15.15.darwin-arm64.tar.gz
==> [Info] Downloading to: /Users/apple/.gobrew/downloads
==> [Info] Extracting from: /Users/apple/.gobrew/downloads/go1.15.15.darwin-arm64.tar.gz
==> [Info] Extracting to: /Users/apple/.gobrew/versions/1.15.15
==> [Info] Extract failed: open /Users/apple/.gobrew/downloads/go1.15.15.darwin-arm64.tar.gz: no such file or directory

I guess the golang team did not publish a version of golang that matches ? Or maybe something else ?

when I put https://go.dev/dl/go1.15.15.darwin-arm64.tar.gz into a browser it failed to find it.

so maybe go brew code is wrong in the way it works out where to download things ?

Also no sign of it in the versions folder

ls -al /Users/apple/.gobrew/versions
total 0
drwxr-xr-x  14 apple  staff  448 Mar 28 14:53 .
drwxr-xr-x   6 apple  staff  192 Mar 28 14:22 ..
drwxr-xr-x   3 apple  staff   96 Mar  5 19:12 1.16.15
drwxr-xr-x   3 apple  staff   96 Mar  3 14:56 1.17.13
drwxr-xr-x   3 apple  staff   96 Mar  8 15:03 1.18.10
drwxr-xr-x   3 apple  staff   96 Mar  2 13:54 1.19.13
drwxr-xr-x   3 apple  staff   96 Feb 28 14:55 1.20.14
drwxr-xr-x   3 apple  staff   96 Feb 26 16:30 1.21.0
drwxr-xr-x   3 apple  staff   96 Feb 26 12:14 1.21.1
drwxr-xr-x   3 apple  staff   96 Feb 24 16:04 1.21.3
drwxr-xr-x   3 apple  staff   96 Feb 26 13:39 1.21.5
drwxr-xr-x   3 apple  staff   96 Mar  2 13:40 1.21.7
drwxr-xr-x   3 apple  staff   96 Mar 11 10:19 1.21.8
drwxr-xr-x   3 apple  staff   96 Feb 24 16:02 1.22.0

This special cases happen due to change in arm and Darwin releases upon M1 Macs.

We should have better error messaging for such cases for old go versions - that architecture doesn’t exist, instead of assuming and trying the downloads.

I see .. so no fix possible ?

For now, I will force old repos to upgrade to a more recent golang then as a work around.

so no fix possible?

Right, no fix at this moment because the binary on the source also doesn't exist.

Confirmation:

that architecture doesn’t exist, instead of assuming and trying the downloads.

Screenshot 2024-03-29 at 11 27 09

ok thanks @kevincobain2000

Such is the situation.

In my system I will alter my pipeline to:

  • add a "go mod edit" to force golang repos to use a higher version
  • use "gobrew use" then will work fine.

shall close this, but reopen if needed....

I've updated to go1.19

Thanks @ajstarks 🙏