From 0a2c22c35ee76b29395def804a85656e99c1f6f6 Mon Sep 17 00:00:00 2001 From: Tomasz Rudzki Date: Thu, 24 Sep 2026 14:37:28 +0100 Subject: [PATCH 1/2] Pin Bazel 8.5.1 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. --- .bazelversion | 2 +- MODULE.bazel | 1 + src/renderer/obr/obr_capi/obr/.bazelversion | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.bazelversion b/.bazelversion index 6b0e58e..e0741a8 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.4.1 \ No newline at end of file +8.5.1 \ No newline at end of file diff --git a/MODULE.bazel b/MODULE.bazel index ada6ebc..b70b4da 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -4,6 +4,7 @@ module( ) bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "platforms", version = "1.1.0") bazel_dep(name = "rules_cc", version = "0.1.1") bazel_dep(name = "obr", version = "1.0.0") diff --git a/src/renderer/obr/obr_capi/obr/.bazelversion b/src/renderer/obr/obr_capi/obr/.bazelversion index 6b0e58e..e0741a8 100644 --- a/src/renderer/obr/obr_capi/obr/.bazelversion +++ b/src/renderer/obr/obr_capi/obr/.bazelversion @@ -1 +1 @@ -7.4.1 \ No newline at end of file +8.5.1 \ No newline at end of file From d5d8771dc766d6d10055966d33e0dc330a77e9f3 Mon Sep 17 00:00:00 2001 From: Tomasz Rudzki Date: Thu, 24 Sep 2026 14:41:05 +0100 Subject: [PATCH 2/2] Build the standalone obr module without WORKSPACE 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. --- src/renderer/obr/obr_capi/obr/.bazelrc | 4 ---- src/renderer/obr/obr_capi/obr/docs/building.md | 2 +- src/renderer/obr/obr_capi/obr/extensions.bzl | 4 ++-- src/renderer/obr/obr_capi/obr/{external => third_party}/BUILD | 0 .../obr/obr_capi/obr/{external => third_party}/pffft.BUILD | 0 5 files changed, 3 insertions(+), 7 deletions(-) rename src/renderer/obr/obr_capi/obr/{external => third_party}/BUILD (100%) rename src/renderer/obr/obr_capi/obr/{external => third_party}/pffft.BUILD (100%) diff --git a/src/renderer/obr/obr_capi/obr/.bazelrc b/src/renderer/obr/obr_capi/obr/.bazelrc index 7d2f300..6aa24b6 100644 --- a/src/renderer/obr/obr_capi/obr/.bazelrc +++ b/src/renderer/obr/obr_capi/obr/.bazelrc @@ -1,6 +1,2 @@ -# Until we have migrated all deps out of WORKSPACE file, we need to continue to -# use it. Starting with bazel 8, this flag flips to default false. -common --enable_workspace - # Toolchain flags shared with the parent oar build live in toolchain.bazelrc. import %workspace%/toolchain.bazelrc diff --git a/src/renderer/obr/obr_capi/obr/docs/building.md b/src/renderer/obr/obr_capi/obr/docs/building.md index f8eb531..fb5ced5 100644 --- a/src/renderer/obr/obr_capi/obr/docs/building.md +++ b/src/renderer/obr/obr_capi/obr/docs/building.md @@ -31,7 +31,7 @@ bazel build -c opt //obr/cli:obr_cli ### Dependencies -Bazel dependencies are managed through both `MODULE.bazel` (bazelmod) and `WORKSPACE`. The project uses: +Bazel dependencies are managed through `MODULE.bazel` (Bzlmod). The project uses: - [Abseil](https://abseil.io/) - C++ common libraries - [Eigen](https://eigen.tuxfamily.org/) - Linear algebra diff --git a/src/renderer/obr/obr_capi/obr/extensions.bzl b/src/renderer/obr/obr_capi/obr/extensions.bzl index 98d3f01..b10b313 100644 --- a/src/renderer/obr/obr_capi/obr/extensions.bzl +++ b/src/renderer/obr/obr_capi/obr/extensions.bzl @@ -5,11 +5,11 @@ def _pffft_ext_impl(mctx): name = "pffft", remote = "https://bitbucket.org/jpommier/pffft.git", commit = "0aec0327a6912e1a0ec5326eef737c2ce19bc836", - # Repository-qualified on purpose: a bare `//external:pffft.BUILD` + # Repository-qualified on purpose: a bare `//third_party:pffft.BUILD` # resolves against the main repository rather than against the module # this file belongs to, so it breaks as soon as obr is consumed as a # dependency instead of built on its own. - build_file = Label("@obr//external:pffft.BUILD"), + build_file = Label("@obr//third_party:pffft.BUILD"), ) pffft_ext = module_extension(implementation = _pffft_ext_impl) diff --git a/src/renderer/obr/obr_capi/obr/external/BUILD b/src/renderer/obr/obr_capi/obr/third_party/BUILD similarity index 100% rename from src/renderer/obr/obr_capi/obr/external/BUILD rename to src/renderer/obr/obr_capi/obr/third_party/BUILD diff --git a/src/renderer/obr/obr_capi/obr/external/pffft.BUILD b/src/renderer/obr/obr_capi/obr/third_party/pffft.BUILD similarity index 100% rename from src/renderer/obr/obr_capi/obr/external/pffft.BUILD rename to src/renderer/obr/obr_capi/obr/third_party/pffft.BUILD