Skip to content

Commit 2edb873

Browse files
committed
Add support for Bazel 8 and 9
Signed-off-by: Brentley Jones <[email protected]>
1 parent 739b881 commit 2edb873

File tree

12 files changed

+93
-103
lines changed

12 files changed

+93
-103
lines changed

MODULE.bazel

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ bazel_dep(
4545
)
4646
bazel_dep(
4747
name = "rules_pkg",
48-
version = "0.9.1",
48+
version = "1.0.1",
4949
dev_dependency = True,
5050
)
5151
bazel_dep(
@@ -55,15 +55,14 @@ bazel_dep(
5555
repo_name = "io_bazel_stardoc",
5656
)
5757

58-
# To support Bazel 8 tests
58+
# Use newer versions of deps in development
5959
single_version_override(
60-
module_name = "rules_swift",
61-
version = "1.18.0",
60+
module_name = "apple_support",
61+
version = "1.17.1",
6262
)
63-
6463
single_version_override(
65-
module_name = "apple_support",
66-
version = "1.15.1",
64+
module_name = "rules_swift",
65+
version = "2.3.0",
6766
)
6867

6968
# Some of our deps are forcing a new stardoc on us, so pinning for now
@@ -72,12 +71,6 @@ single_version_override(
7271
version = "0.6.1",
7372
)
7473

75-
# For Stardoc
76-
single_version_override(
77-
module_name = "bazel_skylib",
78-
version = "1.6.0",
79-
)
80-
8174
apple_cc_configure = use_extension(
8275
"@build_bazel_apple_support//crosstool:setup.bzl",
8376
"apple_cc_configure_extension",

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ to include it in the list above.
8080

8181
| rules_xcodeproj | Bazel | [rules_apple][1] | [rules_swift][2] | Xcode | macOS | Supporting Branch |
8282
| :-------------: | :---: | :--------------: | :--------------: | :---: | :---: | :---------------: |
83-
| 2.10.0+ | 7.0-8.x | 3.16.1+ | 1.18.0+ | 13.3–15.x | 13–14.x | `main` |
83+
| 2.10.0+ | 7.0-9.x | 3.16.1+ | 1.18.0+ | 13.3–15.x | 13–14.x | `main` |
8484
| 1.17.0+ | 6.3-7.x | 1.0.1–2.x | 1.x | 13.3–15.x | 13–14.x | - |
8585
| 1.16.0 | 6.3-7.x | 1.0.1–2.x | 1.x | 13.3–15.2 | 13–14.x | - |
8686
| 1.14.0-1.15.0 | 6.1-7.x | 1.0.1–2.x | 1.x | 13.3–15.2 | 13–14.x | - |

bazel_6.bazelrc

Lines changed: 0 additions & 12 deletions
This file was deleted.

bazel_7.bazelrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
common --incompatible_fail_on_unknown_attributes
2-
3-
build:cache --remote_build_event_upload=minimal
1+
common --incompatible_disallow_empty_glob

bazel_9.bazelrc

Whitespace-only changes.

buildbuddy.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ x_templates:
2020
USE_BAZEL_VERSION: 7.x
2121
- &bazel_lts
2222
env:
23-
# FIXME: Adjust to 8.x
24-
USE_BAZEL_VERSION: 7.x
23+
USE_BAZEL_VERSION: 8.x
2524
- &bazel_head
2625
env:
27-
# FIXME: Adjust to `last_green`
28-
USE_BAZEL_VERSION: 7.x
26+
USE_BAZEL_VERSION: last_green
2927

3028
- &normal_resources
3129
resource_requests: { memory: 6GB }

examples/integration/.bazelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import %workspace%/../../shared.bazelrc
33

44
build --experimental_cc_implementation_deps
55

6+
# Until we fix our examples for Bazel 8
7+
common --enable_workspace
8+
69
# Exercise the extra flags feature
710

811
build:rules_xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_flags='--verbose_failures'

examples/integration/iOSApp/Resources/ExampleResources/dep_resources_collector.bzl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ _deps_aspect = aspect(
2626
attr_aspects = ["*"],
2727
)
2828

29-
_is_bazel_6 = hasattr(apple_common, "link_multi_arch_static_library")
30-
3129
def _dep_resources_collector_impl(ctx):
3230
all_deps = depset(
3331
transitive = [dep[DepCollectorInfo].dep_names for dep in ctx.attr.deps],
@@ -39,9 +37,7 @@ def _dep_resources_collector_impl(ctx):
3937
command = "echo '{}' > {}".format("\n".join(all_deps), output.path),
4038
)
4139

42-
res = [output]
43-
if _is_bazel_6:
44-
res = {tuple(): res}
40+
res = {tuple(): [output]}
4541

4642
return resources.bucketize(
4743
resources = res,

shared.bazelrc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# Opt into future migrations
2-
build --incompatible_disallow_empty_glob
3-
4-
# Support rules_swift 2.0 on Bazel 6
5-
common --experimental_enable_aspect_hints
6-
71
# Don't create convenience symlinks
82
build --experimental_convenience_symlinks=ignore
93

@@ -27,8 +21,6 @@ startup --output_base=bazel-output-base
2721
build --deleted_packages=test/fixtures/generated/xcodeproj_bwx,test/fixtures/generated/xcodeproj_bwb
2822

2923
# Ensure we work with BwtB
30-
build --experimental_inmemory_jdeps_files
31-
build --experimental_inmemory_dotd_files
3224
build --remote_download_outputs=minimal
3325
test --remote_download_outputs=toplevel
3426

tools/bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ readonly workspace_dir="${tool_location%/*/*}"
1717

1818
bazel_version=$("$BAZEL_REAL" info release | /usr/bin/cut -d ' ' -f 2 | /usr/bin/cut -d '.' -f 1)
1919
if [[ "$bazel_version" == "version" ]]; then
20-
bazel_version=8
20+
bazel_version=9
2121
fi
2222

2323
flags=("--noworkspace_rc")

0 commit comments

Comments
 (0)