asdf-golang icon indicating copy to clipboard operation
asdf-golang copied to clipboard

[Mac M1] Mutliple arch of the same version

Open dimasdanz opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. There are several projects that is immediately compilable on arm. It does not require using installing go using ASDF_GOLANG_OVERWRITE_ARCH. But there are projects that is not immediately compilable due to its dependency not having arm build (i.e. that depends on this), so using ASDF_GOLANG_OVERWRITE_ARCH

Problem arise if there are project of both type that needs to run on the same version

Describe the solution you'd like Something like this should work

asdf install golang 1.17-darwin-arm64
asdf install golang 1.17-darwin-amd64

It should not change the default behaviour of asdf install golang 1.17, it still install the current arch.

Describe alternatives you've considered What I do right now is to use different patches for different arch on the same major version. i.e.

  1. go1.18.2 -> this is using darwin-arm64 (m1)
  2. go1.18.1 -> this is using darwin-amd64 (running under rosetta, i guess?)

Thank you

dimasdanz avatar May 13 '22 08:05 dimasdanz

Interesting idea. So in this case you would have to set the full version with arch in the project's .tool-versions or it would fall back to the default for that version?

kennyp avatar Dec 17 '22 04:12 kennyp