Skip to content

Pin Bazel 8.5.1 and build the standalone obr module without WORKSPACE - #47

Open
trsonic wants to merge 2 commits into
mainfrom
bazel-8.5.1
Open

trsonic wants to merge 2 commits into
mainfrom
bazel-8.5.1

Conversation

@trsonic

@trsonic trsonic commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Moves the Bazel pin from 7.4.1 to 8.5.1, and removes the standalone obr module's dependency on WORKSPACE mode.

Pin Bazel 8.5.1

  • .bazelversion (oar) and src/renderer/obr/obr_capi/obr/.bazelversion (standalone obr): 7.4.1 → 8.5.1.
  • Bazel 8 no longer lets the root module see @platforms without a bazel_dep. Without one, analysis fails with No repository visible as '@platforms' from main repository at the three @platforms//:incompatible references in src/renderer/obr/BUILD.bazel, src/renderer/obr/obr_capi/BUILD.bazel and tests/examples/BUILD.bazel. MODULE.bazel now declares bazel_dep(name = "platforms", version = "1.1.0").

Build the standalone obr module without WORKSPACE

obr's .bazelrc sets common --enable_workspace, but obr has no WORKSPACE file. The flag is only there so that extensions.bzl can load @obr//external:pffft.BUILD, because Bazel reserves the top-level external package in the main repository. Bazel 8 turns WORKSPACE mode off by default. With Bazel 9.2.0 the standalone obr build fails:

ERROR: no such package '@@+pffft_ext+pffft//': Unable to load package for //external:pffft.BUILD: BUILD file not found in any of the following directories.
  • src/renderer/obr/obr_capi/obr/external/ is renamed to third_party/ (both files unchanged).
  • extensions.bzl points at @obr//third_party:pffft.BUILD.
  • --enable_workspace is removed from obr's .bazelrc.
  • docs/building.md says Bazel dependencies are managed through MODULE.bazel only.

The oar build consumes obr as a dependency and does not change.

Verification

On macOS with Bazel 8.5.1:

  • bazel test //src/... //tests/... //:oar: 7 tests pass. test_hoa_lfe_rendering is skipped as target-incompatible.
  • bazel test --define OAR_ENABLE_HOA_LFE=1 //tests/examples:test_hoa_lfe_rendering: passes.
  • Standalone obr, bazel test //...: all 26 tests pass.

Standalone obr with Bazel 9.2.0: //obr/ambisonic_binaural_decoder:fft_manager analyses with this change and fails without it with the error above. The obr test targets do not analyse on Bazel 9.2.0 either way, because googletest 1.17.0 uses the native cc_library rule that Bazel 9 removed.

The macOS runs used an extra local toolchain dependency for Xcode 27, which is not part of this change. The CI Bazel workflow is the first run on Linux and Windows.

Move both .bazelversion files (the root module and the obr module) from
7.4.1 to 8.5.1.

Bazel 8 no longer makes @platforms visible to the root module without a
bazel_dep, so add platforms 1.1.0 to MODULE.bazel for the three
@platforms//:incompatible references.
obr's .bazelrc set --enable_workspace only so that
//external:pffft.BUILD could load: Bazel reserves the top-level
"external" package in the main repository. There is no WORKSPACE file.
Bazel 9 fails to load the file from that package.

Move external/ to third_party/, point extensions.bzl at
@obr//third_party:pffft.BUILD, drop --enable_workspace, and describe the
dependencies in docs/building.md as managed through MODULE.bazel only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant