thorsager / surl

surl like curl but a server
MIT License
2 stars 0 forks source link

download go1.22 for darwin/arm64: toolchain not available #10

Open bsushmith opened 3 months ago

bsushmith commented 3 months ago

Please update the go version in go.mod file from 1.22 to 1.22.0. It doesn't work properly on darwin/arm64 arch (Apple Silicon) as golang has issues if the patch version is missing.

Error:

➜  surl git:(main) go mod download
go: downloading go1.22 (darwin/arm64)
go: download go1.22 for darwin/arm64: toolchain not available

Solution: https://github.com/golang/go/issues/65568#issuecomment-1954876836 https://github.com/golang/go/issues/66175

thorsager commented 3 months ago

I have not been able to reproduce the issue you mention. I'm on Darwin/arm64 I will need some more information on how to reproduce.

bsushmith commented 3 months ago

The steps I followed earlier -

  1. cloned the repo using git clone
  2. ran command - go mod download which tried to download go1.22 and faced error

I didn't have go 1.22 version in my system before installing this repo. After I modified go.mod to 1.22.0, I was able to download and did not face any issues afterwards.

I was able to reproduce the error again by doing the below steps -

  1. Remove the existing go 1.22 tool chain from go set up path. and modify GOROOT to point to whatever previous version of golang I have installed on my system before.
  2. Ensure the go 1.22 is not installed on the system and also that go.mod file has 1.22 only.
  3. Run command go mod download. It will throw error.
thorsager commented 3 months ago

Ok thanks, what version of go did the go mod download install ? I'm guessing 1.22.0 ? I'm thinking this is an issue of running on darwin... I'm reluctant to change this ...

bsushmith commented 3 months ago

what version of go did the go mod download install ? I'm guessing 1.22.0 ?

Yes. it installed 1.22.0