bazelbuild / bazelbuild/bazelisk

Bazelisk downloads arm64 version in Rosetta mode

Open
#298 1 comment 0 reactions 0 assignees View on GitHub
P2 type:bug
Dominant language
Go
Stars
2.7k
Forks
424
PR merge metrics
No merged PRs in 30d

Description

We are currently using Bazel 4.2.0.

Our developers using M1 Macs typically have the arm64 version of Bazelisk installed. However, we have some workflows that require them to run in Rosetta mode. In these cases the arm64 version of Bazelisk does not download the x86_64 version of Bazel which leads to toolchain issues.

From a brief peak at the source, it looks like the `machineName` portion of the filename is determined by switching off of `runtime.GOARCH`.

Is there an easy workaround to this or is a code change required?

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start by tracing the source code that determines the Bazel download filename's machineName from runtime.GOARCH. Reproduce the behavior on an arm64 M1 Mac running Bazelisk in Rosetta mode and verify whether the selected artifact is x86_64. Done means Rosetta mode downloads the matching Bazel version and avoids the reported toolchain issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.