bazelbuild / bazelbuild/bazelisk
Using a commit hash .bazelversion on Apple Silicon (arm64) pulls x86_64 bazel binary
- Dominant language
- Go
- Stars
- 2.7k
- Forks
- 424
- PR merge metrics
- No merged PRs in 30d
Description
If you have rosetta2 enabled, this seems to work -- except that the host & target platforms for the build are then detected as x86_64. If you are trying to produce arm64 builds, this is pretty confusing 😂
This is the bazelisk output
```
2021/08/08 16:57:45 Using unreleased version at commit d4dd2038039ecbc63e2d3037855c31145b335ad4
2021/08/08 16:57:45 Downloading https://storage.googleapis.com/bazel-builds/artifacts/macos/d4dd2038039ecbc63e2d3037855c31145b335ad4/bazel...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
```
I'm not sure if arm64 macos builds are available at the https://storage.googleapis.com location, but it seems to me that the URL is missing an x86_64 vs arm64 component to pull the right version.
Contributor guide
Research direction
Reproduce the issue on an Apple Silicon Mac with a commit hash in .bazelversion, comparing behavior with and without Rosetta 2. Trace Bazelisk's version download and platform selection flow, then verify that the selected binary matches arm64 and that Bazel detects arm64 host and target platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100