Skip to content

Commit 6dbe31f

Browse files
authored
Support Bazel 9 (#3286)
Iterating on #3266 - Bumps CI config to `[8.x, 9.x, last_green]` - Does not bump BCR tests – should we do that? - Does not fix HEAD tests due to patches needed in rules_apple - Updates rules_apple, rules_swift, rules_cc, and more to align with transitive deps required for Bazel 9 support - Updates loads across the repo for newly-starlarkified things (objc_library, cc_library, toolchain_utils.bzl, etc) - Fixes some broken tests --------- Signed-off-by: Aaron Sky <aaronsky@skyaaron.com>
1 parent 3be5325 commit 6dbe31f

37 files changed

Lines changed: 151 additions & 65 deletions

File tree

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.x
1+
9.x

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ END_UNRELEASED_TEMPLATE
5252

5353
### Adjusted
5454

55-
* TBD
55+
* Added support for Bazel 9: [#3286](https://github.com/MobileNativeFoundation/rules_xcodeproj/pull/3286)
5656

5757
### Fixed
5858

MODULE.bazel

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,25 @@ module(
66
repo_name = "rules_xcodeproj",
77
)
88

9-
bazel_dep(name = "bazel_features", version = "1.3.0")
10-
bazel_dep(name = "bazel_skylib", version = "1.3.0")
9+
bazel_dep(
10+
name = "apple_support",
11+
version = "2.2.0",
12+
repo_name = "build_bazel_apple_support",
13+
)
14+
bazel_dep(name = "bazel_features", version = "1.36.0")
15+
bazel_dep(name = "bazel_skylib", version = "1.9.0")
16+
bazel_dep(name = "rules_cc", version = "0.2.17")
1117
bazel_dep(
1218
name = "rules_swift",
13-
version = "3.1.1",
19+
version = "3.5.0",
1420
repo_name = "build_bazel_rules_swift",
1521
)
1622
bazel_dep(
1723
name = "rules_apple",
18-
version = "4.0.1",
24+
version = "4.4.0",
1925
repo_name = "build_bazel_rules_apple",
2026
)
21-
bazel_dep(name = "rules_python", version = "0.27.1")
27+
bazel_dep(name = "rules_python", version = "1.7.0")
2228

2329
internal = use_extension("//xcodeproj:extensions.bzl", "internal")
2430
use_repo(internal, "rules_xcodeproj_generated")
@@ -32,12 +38,6 @@ use_repo(
3238

3339
# Non-release dependencies
3440

35-
bazel_dep(
36-
name = "apple_support",
37-
version = "1.21.0",
38-
dev_dependency = True,
39-
repo_name = "build_bazel_apple_support",
40-
)
4141
bazel_dep(
4242
name = "buildifier_prebuilt",
4343
version = "6.3.3",
@@ -50,22 +50,16 @@ bazel_dep(
5050
)
5151
bazel_dep(
5252
name = "rules_shell",
53-
version = "0.5.0",
53+
version = "0.6.1",
5454
dev_dependency = True,
5555
)
5656
bazel_dep(
5757
name = "stardoc",
58-
version = "0.6.1",
58+
version = "0.8.0",
5959
dev_dependency = True,
6060
repo_name = "io_bazel_stardoc",
6161
)
6262

63-
# Some of our deps are forcing a new stardoc on us, so pinning for now
64-
single_version_override(
65-
module_name = "stardoc",
66-
version = "0.6.1",
67-
)
68-
6963
apple_cc_configure = use_extension(
7064
"@build_bazel_apple_support//crosstool:setup.bzl",
7165
"apple_cc_configure_extension",

buildbuddy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ x_templates:
1919
env: {}
2020
- &bazel_previous_lts
2121
env:
22-
USE_BAZEL_VERSION: 7.x
22+
USE_BAZEL_VERSION: 8.x
2323
- &bazel_lts
2424
env:
25-
USE_BAZEL_VERSION: 8.x
25+
USE_BAZEL_VERSION: 9.x
2626
- &bazel_head
2727
env:
2828
USE_BAZEL_VERSION: last_green

docs/bazel.md

Lines changed: 81 additions & 31 deletions
Large diffs are not rendered by default.

examples/integration/Bundle/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_bundle")
2+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
23

34
cc_library(
45
name = "aplugin.library",

examples/integration/CommandLine/CommandLineTool/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
load("@build_bazel_rules_apple//apple:apple.bzl", "apple_universal_binary")
22
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_command_line_application")
33
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_binary")
4+
load("@rules_cc//cc:objc_library.bzl", "objc_library")
45

56
macos_command_line_application(
67
name = "CommandLineTool",

examples/integration/CommandLine/CommandLineToolLib/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
2+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
3+
load("@rules_cc//cc:objc_library.bzl", "objc_library")
24

35
objc_library(
46
name = "lib_defines",

examples/integration/CommandLine/external/BUILD.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ load(
22
"@build_bazel_rules_apple//apple:apple.bzl",
33
"apple_static_framework_import",
44
)
5+
load("@rules_cc//cc:objc_import.bzl", "objc_import")
6+
load("@rules_cc//cc:objc_library.bzl", "objc_library")
57

68
apple_static_framework_import(
79
name = "ExternalFramework",

examples/integration/CommandLine/swift_interop_hint/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ load(
22
"@build_bazel_rules_swift//swift:swift_interop_hint.bzl",
33
"swift_interop_hint",
44
)
5+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
56

67
cc_library(
78
name = "c_lib",

0 commit comments

Comments
 (0)