Skip to content

Commit d620903

Browse files
Add support for Bazel 8 and 9 (#3117)
Adds some ObjC and rules_apple Bazel 8 related migrations. Officially drops anything Bazel 6 related. Also drops `WORKSPACE` workflows since it’s a pain to declare all of the dependencies correctly. We aren’t currently dropping `WORKSPACE` support, but CI will no longer catch issues for us. Signed-off-by: Brentley Jones <[email protected]>
1 parent 739b881 commit d620903

File tree

24 files changed

+1897
-1918
lines changed

24 files changed

+1897
-1918
lines changed

MODULE.bazel

Lines changed: 6 additions & 12 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,15 @@ 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
)
6363

6464
single_version_override(
65-
module_name = "apple_support",
66-
version = "1.15.1",
65+
module_name = "rules_swift",
66+
version = "2.3.0",
6767
)
6868

6969
# Some of our deps are forcing a new stardoc on us, so pinning for now
@@ -72,12 +72,6 @@ single_version_override(
7272
version = "0.6.1",
7373
)
7474

75-
# For Stardoc
76-
single_version_override(
77-
module_name = "bazel_skylib",
78-
version = "1.6.0",
79-
)
80-
8175
apple_cc_configure = use_extension(
8276
"@build_bazel_apple_support//crosstool:setup.bzl",
8377
"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 & 29 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 }
@@ -129,14 +127,6 @@ actions:
129127
# Not validate since Bazel 8 Bzlmod paths are different
130128
- *generate_integration
131129
- *build_all
132-
- name: Integration Test - "examples/integration" - Bazel LTS using WORKSPACE
133-
<<: *bazel_lts
134-
<<: *action_base
135-
<<: *normal_resources
136-
<<: *examples_integration_workspace
137-
bazel_commands:
138-
- *nobzlmod_generate_integration
139-
- *nobzlmod_build_all
140130
- name: Integration Test - "examples/integration" - Bazel HEAD
141131
<<: *bazel_head
142132
<<: *arm64
@@ -146,14 +136,6 @@ actions:
146136
bazel_commands:
147137
- *validate_integration
148138
- *build_all
149-
- name: Integration Test - "examples/integration" - Bazel HEAD using WORKSPACE
150-
<<: *bazel_head
151-
<<: *action_base
152-
<<: *normal_resources
153-
<<: *examples_integration_workspace
154-
bazel_commands:
155-
- *nobzlmod_generate_integration
156-
- *nobzlmod_build_all
157139

158140
- name: Integration Test - "examples/rules_ios" - Bazel Previous LTS
159141
<<: *bazel_previous_lts
@@ -174,15 +156,6 @@ actions:
174156
bazel_commands:
175157
- *validate_integration
176158
- *build_all
177-
- name: Integration Test - "examples/rules_ios" - Bazel LTS using WORKSPACE
178-
<<: *bazel_lts
179-
<<: *arm64
180-
<<: *action_base
181-
<<: *normal_resources
182-
<<: *examples_rules_ios_workspace
183-
bazel_commands:
184-
- *validate_integration
185-
- *nobzlmod_build_all
186159
## Uncomment once rules_ios supports Bazel 8
187160
# - name: Integration Test - "examples/rules_ios" - Bazel HEAD
188161
# <<: *bazel_head

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,
Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
CONFIGURATION-STABLE-0 darwin_x86_64-dbg-ST-376989c9bb44
22
CONFIGURATION-STABLE-1 darwin_x86_64-dbg-ST-65b9ae3229ca
33
CONFIGURATION-STABLE-2 darwin_x86_64-opt-ST-4603bbaf5d98
4-
CONFIGURATION-STABLE-3 ios_x86_64-dbg-ios-x86_64-min15.0-applebin_ios-ST-ec49b5570e6a
5-
CONFIGURATION-STABLE-4 watchos_x86_64-dbg-watchos-x86_64-min7.0-applebin_watchos-ST-c601ed35d954
6-
CONFIGURATION-STABLE-5 ios_x86_64-dbg-ios-x86_64-min16.0-applebin_ios-ST-7c661f35007d
7-
CONFIGURATION-STABLE-6 tvos_x86_64-dbg-tvos-x86_64-min15.0-applebin_tvos-ST-8fa93ae60f3c
8-
CONFIGURATION-STABLE-7 darwin_x86_64-dbg-macos-x86_64-min12.0-applebin_macos-ST-e4d1b54e0a5f
9-
CONFIGURATION-STABLE-8 ios_arm64-dbg-ios-arm64-min15.0-applebin_ios-ST-d4ed85805c03
10-
CONFIGURATION-STABLE-9 watchos_arm64_32-dbg-watchos-arm64_32-min7.0-applebin_watchos-ST-2d1383ea1bfd
11-
CONFIGURATION-STABLE-10 ios_arm64-dbg-ios-arm64-min16.0-applebin_ios-ST-9d40ca217462
12-
CONFIGURATION-STABLE-11 tvos_arm64-dbg-tvos-arm64-min15.0-applebin_tvos-ST-f0bf1e4db2b5
13-
CONFIGURATION-STABLE-12 ios_x86_64-opt-ios-x86_64-min15.0-applebin_ios-ST-f0647120a524
14-
CONFIGURATION-STABLE-13 watchos_x86_64-opt-watchos-x86_64-min7.0-applebin_watchos-ST-9b6da1c1ca96
15-
CONFIGURATION-STABLE-14 ios_x86_64-opt-ios-x86_64-min16.0-applebin_ios-ST-98784b0141f7
16-
CONFIGURATION-STABLE-15 tvos_x86_64-opt-tvos-x86_64-min15.0-applebin_tvos-ST-fd3222aa8913
17-
CONFIGURATION-STABLE-16 darwin_x86_64-opt-macos-x86_64-min12.0-applebin_macos-ST-478bd2e7095f
18-
CONFIGURATION-STABLE-17 ios_arm64-opt-ios-arm64-min15.0-applebin_ios-ST-d4b659e4a9d4
19-
CONFIGURATION-STABLE-18 watchos_arm64_32-opt-watchos-arm64_32-min7.0-applebin_watchos-ST-ecd9d94fb4e5
20-
CONFIGURATION-STABLE-19 ios_arm64-opt-ios-arm64-min16.0-applebin_ios-ST-9a1b0839beb3
21-
CONFIGURATION-STABLE-20 tvos_arm64-opt-tvos-arm64-min15.0-applebin_tvos-ST-618e0eabc398
22-
CONFIGURATION-STABLE-21 watchos_x86_64-dbg-watchos-x86_64-min8.0-applebin_watchos-ST-65044d9cb033
23-
CONFIGURATION-STABLE-22 watchos_arm64_32-dbg-watchos-arm64_32-min8.0-applebin_watchos-ST-e2adfc6423ec
24-
CONFIGURATION-STABLE-23 watchos_x86_64-opt-watchos-x86_64-min8.0-applebin_watchos-ST-b7000f81fbba
25-
CONFIGURATION-STABLE-24 watchos_arm64_32-opt-watchos-arm64_32-min8.0-applebin_watchos-ST-58e24dd35eea
26-
CONFIGURATION-STABLE-25 darwin_x86_64-dbg-macos-x86_64-min11.0-applebin_macos-ST-23ced71d870c
27-
CONFIGURATION-STABLE-26 darwin_x86_64-opt-macos-x86_64-min11.0-applebin_macos-ST-5c2767082c6b
28-
CONFIGURATION-STABLE-27 darwin_x86_64-dbg-macos-x86_64-min11.0-applebin_macos-ST-7c4786726810
29-
CONFIGURATION-STABLE-28 darwin_arm64-dbg-macos-arm64-min11.0-applebin_macos-ST-5f46583411cc
30-
CONFIGURATION-STABLE-29 darwin_x86_64-dbg-macos-x86_64-min11.0-applebin_macos-ST-a6b23e99dd1c
31-
CONFIGURATION-STABLE-30 darwin_x86_64-opt-macos-x86_64-min11.0-applebin_macos-ST-d247baf1a2e1
32-
CONFIGURATION-STABLE-31 darwin_arm64-opt-macos-arm64-min11.0-applebin_macos-ST-4320432566be
33-
CONFIGURATION-STABLE-32 darwin_x86_64-opt-macos-x86_64-min11.0-applebin_macos-ST-11b4a0ee8e7b
4+
CONFIGURATION-STABLE-3 ios_x86_64-dbg-ios-x86_64-min15.0-applebin_ios-ST-729671d856ea
5+
CONFIGURATION-STABLE-4 watchos_x86_64-dbg-watchos-x86_64-min7.0-applebin_watchos-ST-a56208b3ea17
6+
CONFIGURATION-STABLE-5 ios_x86_64-dbg-ios-x86_64-min16.0-applebin_ios-ST-e07395093609
7+
CONFIGURATION-STABLE-6 tvos_x86_64-dbg-tvos-x86_64-min15.0-applebin_tvos-ST-f2eafbbb2c71
8+
CONFIGURATION-STABLE-7 darwin_x86_64-dbg-macos-x86_64-min12.0-applebin_macos-ST-c5aba9a2664d
9+
CONFIGURATION-STABLE-8 ios_arm64-dbg-ios-arm64-min15.0-applebin_ios-ST-ebc965843194
10+
CONFIGURATION-STABLE-9 watchos_arm64_32-dbg-watchos-arm64_32-min7.0-applebin_watchos-ST-ee37b6f7c2f8
11+
CONFIGURATION-STABLE-10 ios_arm64-dbg-ios-arm64-min16.0-applebin_ios-ST-22e6ffafd033
12+
CONFIGURATION-STABLE-11 tvos_arm64-dbg-tvos-arm64-min15.0-applebin_tvos-ST-34aed803ff64
13+
CONFIGURATION-STABLE-12 ios_x86_64-opt-ios-x86_64-min15.0-applebin_ios-ST-7e26020362db
14+
CONFIGURATION-STABLE-13 watchos_x86_64-opt-watchos-x86_64-min7.0-applebin_watchos-ST-0b3052a22d34
15+
CONFIGURATION-STABLE-14 ios_x86_64-opt-ios-x86_64-min16.0-applebin_ios-ST-24288e6a8a11
16+
CONFIGURATION-STABLE-15 tvos_x86_64-opt-tvos-x86_64-min15.0-applebin_tvos-ST-839820e646a4
17+
CONFIGURATION-STABLE-16 darwin_x86_64-opt-macos-x86_64-min12.0-applebin_macos-ST-fdfd02bb595a
18+
CONFIGURATION-STABLE-17 ios_arm64-opt-ios-arm64-min15.0-applebin_ios-ST-a175c2921f59
19+
CONFIGURATION-STABLE-18 watchos_arm64_32-opt-watchos-arm64_32-min7.0-applebin_watchos-ST-52c88b620570
20+
CONFIGURATION-STABLE-19 ios_arm64-opt-ios-arm64-min16.0-applebin_ios-ST-d9e7edaa2e03
21+
CONFIGURATION-STABLE-20 tvos_arm64-opt-tvos-arm64-min15.0-applebin_tvos-ST-09f0630d9e9d
22+
CONFIGURATION-STABLE-21 watchos_x86_64-dbg-watchos-x86_64-min8.0-applebin_watchos-ST-c0f93201a38e
23+
CONFIGURATION-STABLE-22 watchos_arm64_32-dbg-watchos-arm64_32-min8.0-applebin_watchos-ST-5383078a5ee1
24+
CONFIGURATION-STABLE-23 watchos_x86_64-opt-watchos-x86_64-min8.0-applebin_watchos-ST-040af2a54015
25+
CONFIGURATION-STABLE-24 watchos_arm64_32-opt-watchos-arm64_32-min8.0-applebin_watchos-ST-023f6c62a458
26+
CONFIGURATION-STABLE-25 darwin_x86_64-dbg-macos-x86_64-min11.0-applebin_macos-ST-ab644b0d3414
27+
CONFIGURATION-STABLE-26 darwin_x86_64-opt-macos-x86_64-min11.0-applebin_macos-ST-03342bc805f6
28+
CONFIGURATION-STABLE-27 darwin_x86_64-dbg-macos-x86_64-min11.0-applebin_macos-ST-66f6a67d07be
29+
CONFIGURATION-STABLE-28 darwin_arm64-dbg-macos-arm64-min11.0-applebin_macos-ST-857af5314a24
30+
CONFIGURATION-STABLE-29 darwin_x86_64-dbg-macos-x86_64-min11.0-applebin_macos-ST-ca73ce429e0a
31+
CONFIGURATION-STABLE-30 darwin_x86_64-opt-macos-x86_64-min11.0-applebin_macos-ST-34857d59845d
32+
CONFIGURATION-STABLE-31 darwin_arm64-opt-macos-arm64-min11.0-applebin_macos-ST-4e8ee0b7762f
33+
CONFIGURATION-STABLE-32 darwin_x86_64-opt-macos-x86_64-min11.0-applebin_macos-ST-db9afb28d4b1
3434
CONFIGURATION-STABLE-33 darwin_x86_64-dbg-ST-3a99c2752788
3535
CONFIGURATION-STABLE-34 darwin_x86_64-opt-ST-a99a48f137fe

0 commit comments

Comments
 (0)