Skip to content

Commit 456cc0b

Browse files
authored
Update to Bazel 8 (#1515)
# Description Update to Bazel 8 and enable `bzl_mod`. # API compatibility Yes # JIRA Reference https://swift-nav.atlassian.net/browse/AP-4463
1 parent 253c925 commit 456cc0b

File tree

4 files changed

+18
-16
lines changed

4 files changed

+18
-16
lines changed

.bazeliskrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
USE_BAZEL_VERSION=6.5.0
1+
USE_BAZEL_VERSION=8.3.1

.bazelrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# Enable bzl_mod support
2+
# In order to properly use the swiftnav-bazel-registry your local netrc needs to be configured
3+
common --enable_bzlmod
4+
common --registry=https://raw.githubusercontent.com/swift-nav/swiftnav-bazel-registry/refs/heads/main/
5+
common --registry=https://bcr.bazel.build
6+
common --@rules_swiftnav//cc:enable_bzlmod=true
7+
# Preparation for Bazel 8 behavior of paths in external (plus instead of tilde)
8+
common --incompatible_use_plus_in_repo_names
9+
110
# Causes the build to default to the custom toolchain
211
build --incompatible_enable_cc_toolchain_resolution
312

MODULE.bazel

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
# This MODULE file can not be used for local development inside libsbp, due to problems
2-
# with `rules_foreign_cc`, `check` and `rules_swiftnav` on Mac. On Linux it works fine.
3-
# However, this MODULE file can be used to consume libsbp as a module in other projects.
4-
# For local development, use the WORKSPACE (and Bazel 6) file instead.
5-
61
module(name = "libsbp", version = "0.1.0", compatibility_level = 1)
72

83
bazel_dep(name = "platforms", version = "0.0.11")
9-
bazel_dep(name = "rules_swiftnav", version = "0.5.0")
4+
bazel_dep(name = "rules_swiftnav", version = "0.8.0")
105

116
swift_cc_toolchain_ext = use_extension("@rules_swiftnav//cc:extensions.bzl", "swift_cc_toolchain_extension")
127
use_repo(
@@ -26,7 +21,7 @@ register_toolchains(
2621
"@rules_swiftnav//cc/toolchains/llvm/x86_64-darwin:cc-toolchain-x86_64-darwin",
2722
)
2823

29-
bazel_dep(name = "check", version = "0.15.2", dev_dependency = True)
24+
bazel_dep(name = "check", version = "0.15.2.bcr.1", dev_dependency = True)
3025
bazel_dep(name = "googletest", version = "1.13.0", dev_dependency = True)
3126

3227
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)

MODULE.bazel.lock

Lines changed: 6 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)