asdf-community / asdf-golang

Go plugin for the asdf version manager
https://github.com/asdf-vm/asdf
MIT License
534 stars 89 forks source link

[Mac M1] Mutliple arch of the same version #81

Open dimasdanz opened 2 years ago

dimasdanz commented 2 years ago

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

kennyp commented 1 year ago

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?