x/website: go.dev/doc/install 链接到适用于Apple Silicon用户的darwin/amd64安装程序,

dbf7pr2w  于 5个月前  发布在  Go
关注(0)|答案(5)|浏览(44)

从@dmitshur在#47578(评论)中的评论(谢谢!)
据我所知,可能出于设备指纹的考虑,浏览器不会官方公开底层系统架构,因此无论用户是从具有Intel或Apple CPU的macOS设备访问,网页通常看起来都一样。
我知道有一些解决方法,比如获取设备的GPU供应商名称并检查已知的子字符串,M1设备有这个子字符串。一个使用的例子是VLC主页https://www.videolan.org/,它使用这种启发式方法更改其默认下载链接。
所以,我不确定我们应该尝试添加自动检测。如果我们将两个下载都设为特色,它们应该同样可见,希望更容易选择预期的那个。
我认为检测底层系统可能是困难的。然后,我认为我们应该调查其他替代方案

  • 将“通用”设为默认选项,但也提供“Intel芯片”和“苹果硅”选项。
  • 为MacOS用户提供两种选项:下拉菜单或两个不同的下载块。如果我们走这条路,请为首次使用的用户添加友好的描述以参考每种架构(我很少在go社区之外看到darwin-arm64或darwin-amd64)。
4dbbbstv

4dbbbstv1#

"Universal"是否已经存在,或者是否有计划将"Universal"添加到https://go.dev/dl/中?

dw1jzc5e

dw1jzc5e2#

目前还没有通用版本。我预计这将需要发布团队投入更多的工作,而且我不了解任何计划。我将其添加为一种可能性 :-)另一个考虑因素是潜在的二进制大小。

oyt4ldly

oyt4ldly3#

To put a finer point on it: when a Apple Silicon mac user visits the download page, they are presented with this:

and that big download button is the wrong link.
They will probably install that package and everything will seem to work, because the emulation is very good. The programs they compile will be amd64 binaries and will run a little slower because they are running under Rosetta. They may only become aware that there is an issue when some deeper issue exposes the amd64/arm64 mismatch.
(This keeps happening at our company.)
I suspect that quite a large fraction of Apple Silicon Go users are using amd64 toolchains today.
I really think this needs fixing. For now, we can just have two download buttons to force the user to pick the appropriate one.
It also seems like the macOS installer should warn the user if they are installing the amd64 toolchain on an Apple Silicon machine.

azpvetkf

azpvetkf4#

我提交了#59010,以便在Apple Silicon上运行时使amd64安装程序发出警告。

j0pj023g

j0pj023g5#

https://go.dev/cl/480955提到了这个问题:_content: download link on install doc goes to download page

相关问题