Mac M1 works with bazel github releases but not bazelisk auto-installed bazel
I got errors about using go toolchain using bazelisk
ERROR: While resolving toolchains for target //:gazelle-runner: no matching toolchains found for types @io_bazel_rules_go//go:toolchain ERROR: Analysis of target '//:gazelle' failed; build aborted: no matching toolchains found for types @io_bazel_rules_go//go:toolchain
but when I installed using bazel install script it worked.
Both were same versions.
It's likely that you're switching between x86 and arm64 bazel versions, and hitting https://github.com/bazelbuild/bazel/issues/15350
You likely need to bazelisk clean --expunge, and rebuild, and if it still doesn't work maybe you need to update rules_go if your version isn't new enough to support arm64 macs?
Doesn't seem related to Bazelisk. As Keith pointed out, upgrading rules_go is usually the way to go here.