-
Notifications
You must be signed in to change notification settings - Fork 18k
x/website/internal/dl: include darwin-arm64 in the "Featured downloads" section #47578
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
Comments
I believe the install page detects the OS https://golang.org/doc/install |
Tried on an M1 machine with https://golang.org/doc/install but it shows the darwin-amd64 one instead of darwin-arm64. Maybe it only detects the OS, not the architecture? |
The darwin/arm64 installer download is currently considered "highlighted", so it shows up in bold: (It was made "highlighted" when Go 1.16 came out in CL 278787.) But not yet "featured", so it doesn't show up as a dedicated box at the top. Given darwin/arm64 port is a first-class port, and a good amount of time has passed that M1 devices are more widely used, perhaps now is a good time to do so.
To my knowledge, likely out of device fingerprinting concerns, browsers don't officially expose the underlying system architecture, so web pages typically look the same regardless of whether the user is visiting from a macOS device with an Intel or Apple CPU. I'm aware there are some workarounds, like getting the device GPU vendor name and checking for a known substring that M1 devices have. An example of that being used is the VLC home page, https://www.videolan.org/, which changes its default download link using that heuristic. So, I'm not sure that we should try to add automatic detection. If we make both downloads Featured, they should be equally visible and hopefully easier to pick the intended one.
This is possible too, but there are some trade-offs. We've considered it around 1.16 release but haven't decided to explore it further yet. It's a big enough change that it should probably be a separate issue. |
It's quite easy to install the amd64 macOS package on an M1 macbook and not even realize anything is wrong initially. You'll build and run amd64 binaries under rosetta emulation and everything will basically work. We had a new hire do this and they didn't run into issues until running the tests of a package which uses some AVX2 instructions (which aren't supported by rosetta). |
A slightly larger sample from our org: out of 8 people who had installed Go on M1 macbooks, 3 had installed the amd64 version. |
Change https://go.dev/cl/399610 mentions this issue: |
As more users start to use arm64, I think highlighting them in the Featured downloads section could help users pick the right version. Currently it shows only darwin-amd64 installer for Apple macOS.
Or, is there any way to detect user's platform and use it to suggest the right one first?
Or is there any way to build a universal installer?
The text was updated successfully, but these errors were encountered: