Skip to content

Draft: build: Migrate to Bazel Module

Stephen Ryan requested to merge use_bazel_module into main

This is a draft PR to test migrating from the WORKSPACE system to using the Bzlmod system. At the same time, some dependencies were upgraded while trying to keep minimal changes to the code.

These dependencies are now fetched with bazel_deps from the Bazel Central Registry:

  • asio: Updated to 1.32.0 (latest)
  • foxglove_websocket: updated 1.3.0 (latest on registry), using repo name "foxglove_websocket_cpp"
  • glm: Updated to 1.0.0.bcr.1 (latest on registry), using repo_name "glm_gtgen", and patched to change cc_library name.
    • #define GLM_ENABLE_EXPERIMENTAL is now necessary in more places, so this was defined in the patch as well.
  • googletest: Updated to 1.16.0 (latest)
  • nlohmann_json: Updated to 3.11.3.bcr.1 (latest)
  • openssl: Updated to 3.3.1.bcr.1 (latest on registry)
  • protobuf: Updated to 29.3 (latest stable), using repo name "com_google_protobuf"
  • spdlog: Kept at 1.11.0, because higher versions requires a newer fmt, which needs some code changes.
  • websocketpp: Kept at 0.8.2.bcr.3 (latest)
  • zlib: Updated to 1.3.1.bcr.5 (latest)

The rules_boost repository was used from the latest main branch commit to fetch boost. This upgrades the boost version to 1.84.0.

Some dependencies are not in the registry, so they are loaded as non-module extensions.

fmt is on the registry, but as newer versions, which require some code changes to compile.


Still to do:

  • Remove now unused third-party .bzl files
  • Update NOTICE.md
  • Test in gt-gen-simulator
Edited by Stephen Ryan

Merge request reports

Loading