open-location-code icon indicating copy to clipboard operation
open-location-code copied to clipboard

Update to Bazel version 8+

Open drinckes opened this issue 11 months ago • 4 comments

This is a placeholder issue.

Once Bazel JS closure rules (https://github.com/bazelbuild/rules_closure) is available as a Bazel module, it should be moved from the WORSKSPACE file to MODULE.bazel, and the Bazel version specified in .bazeliskrc can be updated to whatever is the current version.

Until then, we can't go past Bazel version 7.4.1 (since later versions do not use the WORKSPACE file to load dependencies).

drinckes avatar Dec 23 '24 13:12 drinckes

Related upstream issue for tracking: https://github.com/bazelbuild/rules_closure/issues/616

fulldecent avatar Dec 23 '24 15:12 fulldecent

FWIW: Bazel 8.0.0 has the --noenable_bzlmod --enable_workspace flags, but "WORKSPACE support will be removed in Bazel 9 (late 2025)"

bcsgh avatar Dec 24 '24 06:12 bcsgh

Thanks @fulldecent , @bcsgh - I got the recommendation for 7.4.1 from @gkdn, one of the rules_closure committers.

After spending about two days to move it to 8.0.0 then back to 7.4.1 and get it all working I'm ok with leaving it there for now. 🐢

drinckes avatar Dec 24 '24 08:12 drinckes

I just tried adding a macos-latest runner to one of the tests configured with bazelbuild/setup-bazelisk@v3:

  # C implementation. Lives in c/, tested with bazel.
  test-c:
    runs-on: ubuntu-latest
    env:
      OLC_PATH: c
    steps:
      - uses: actions/checkout@v4
      - uses: bazelbuild/setup-bazelisk@v3
      - name: test
        run: bazel test --test_output=all ${OLC_PATH}:all
      - name: check formatting
        run: cd ${OLC_PATH} && bash clang_check.sh

and got the error:

Error: Unable to find Bazelisk version '1.x' for platform darwin and arch arm64.

Looking at the github action https://github.com/bazelbuild/setup-bazelisk it says it's superseded and may stop working someday.

I guess today is that day.

UPDATE: This looks like it was transitory, a retry was ok.

drinckes avatar Mar 07 '25 10:03 drinckes