Skip to content

Commit 166c3ac

Browse files
authored
Merge branch 'main' into karim/add-custom-toolchain-to-generated-project
Signed-off-by: Nicholas Long <[email protected]>
2 parents 93c1f9e + 637a942 commit 166c3ac

File tree

78 files changed

+2389
-2041
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+2389
-2041
lines changed

.bazelversion

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

MODULE.bazel

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ bazel_dep(name = "bazel_features", version = "1.3.0")
1010
bazel_dep(name = "bazel_skylib", version = "1.3.0")
1111
bazel_dep(
1212
name = "rules_swift",
13-
version = "1.18.0",
13+
version = "2.8.2",
1414
max_compatibility_level = 2,
1515
repo_name = "build_bazel_rules_swift",
1616
)
@@ -28,13 +28,19 @@ non_module_deps = use_extension("//xcodeproj:extensions.bzl", "non_module_deps")
2828
use_repo(
2929
non_module_deps,
3030
"rules_xcodeproj_index_import",
31+
"rules_xcodeproj_legacy_index_import",
3132
)
3233

34+
# Legacy generator
35+
36+
bazel_dep(name = "xcodeproj", version = "8.27.3", repo_name = "com_github_tuist_xcodeproj")
37+
bazel_dep(name = "pathkit", version = "1.0.1", repo_name = "com_github_kylef_pathkit")
38+
3339
# Non-release dependencies
3440

3541
bazel_dep(
3642
name = "apple_support",
37-
version = "1.11.1",
43+
version = "1.21.0",
3844
dev_dependency = True,
3945
repo_name = "build_bazel_apple_support",
4046
)
@@ -55,17 +61,6 @@ bazel_dep(
5561
repo_name = "io_bazel_stardoc",
5662
)
5763

58-
# Use newer versions of deps in development
59-
single_version_override(
60-
module_name = "apple_support",
61-
version = "1.17.1",
62-
)
63-
64-
single_version_override(
65-
module_name = "rules_swift",
66-
version = "2.3.0",
67-
)
68-
6964
# Some of our deps are forcing a new stardoc on us, so pinning for now
7065
single_version_override(
7166
module_name = "stardoc",
@@ -83,12 +78,10 @@ use_repo(
8378
non_module_deps,
8479
"com_github_apple_swift_argument_parser",
8580
"com_github_apple_swift_collections",
86-
"com_github_kylef_pathkit",
8781
"com_github_michaeleisel_jjliso8601dateformatter",
8882
"com_github_michaeleisel_zippyjson",
8983
"com_github_michaeleisel_zippyjsoncfamily",
9084
"com_github_tadija_aexml",
91-
"com_github_tuist_xcodeproj",
9285
)
9386

9487
dev_non_module_deps = use_extension(

buildbuddy.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ x_templates:
2323
USE_BAZEL_VERSION: 8.x
2424
- &bazel_head
2525
env:
26-
USE_BAZEL_VERSION: last_green
26+
USE_BAZEL_VERSION: 4c2d91e762ab6e492853b021408129dd93fb5904 # TODO: Switch back to last_green once get_cpu has been removed
2727

2828
- &normal_resources
2929
resource_requests: { memory: 6GB }
@@ -114,7 +114,7 @@ actions:
114114
<<: *normal_resources
115115
<<: *examples_integration_workspace
116116
bazel_commands:
117-
# Not validate since Bazel 8 Bzlmod paths are different
117+
# Not validate since Bazel 8+ Bzlmod paths are different
118118
- *generate_integration
119119
- *build_all
120120
- name: Integration Test - "examples/integration" - Bazel LTS
@@ -124,8 +124,7 @@ actions:
124124
<<: *normal_resources
125125
<<: *examples_integration_workspace
126126
bazel_commands:
127-
# Not validate since Bazel 8 Bzlmod paths are different
128-
- *generate_integration
127+
- *validate_integration
129128
- *build_all
130129
- name: Integration Test - "examples/integration" - Bazel HEAD
131130
<<: *bazel_head
@@ -134,7 +133,10 @@ actions:
134133
<<: *normal_resources
135134
<<: *examples_integration_workspace
136135
bazel_commands:
137-
- *validate_integration
136+
# Not validate as Bazel HEAD has incompatible path changes to repo rules
137+
# - "external/+_repo_rules+examples_command_line_external/",
138+
# + "external/+new_local_repository+examples_command_line_external/
139+
- *generate_integration
138140
- *build_all
139141

140142
- name: Integration Test - "examples/rules_ios" - Bazel Previous LTS

docs/usage.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
- [Bazel aspects](#bazel-aspects)
22
- [`compile_only_aspect`](#compile_only_aspect)
33
- [Bazel configs](#bazel-configs)
4-
- [`rules_xcodeproj`](#rules_xcodeproj)
5-
- [`rules_xcodeproj_generator`](#rules_xcodeproj_generator)
6-
- [`rules_xcodeproj_indexbuild`](#rules_xcodeproj_indexbuild)
7-
- [`rules_xcodeproj_swiftuipreviews`](#rules_xcodeproj_swiftuipreviews)
4+
- [`rules_xcodeproj`](#rules_xcodeproj)
5+
- [`rules_xcodeproj_generator`](#rules_xcodeproj_generator)
6+
- [`rules_xcodeproj_indexbuild`](#rules_xcodeproj_indexbuild)
7+
- [`rules_xcodeproj_swiftuipreviews`](#rules_xcodeproj_swiftuipreviews)
88
- [Project-level configs](#project-level-configs)
99
- [Extra config flags](#extra-config-flags)
1010
- [`.bazelrc` files](#bazelrc-files)
11+
- [Project `xcodeproj.bazelrc`](#project-xcodeprojbazelrc)
12+
- [Workspace `xcodeproj.bazelrc`](#workspace-xcodeprojbazelrc)
13+
- [Workspace `.bazelrc`](#workspace-bazelrc)
14+
- [Project `xcodeproj_extra_flags.bazelrc`](#project-xcodeproj_extra_flagsbazelrc)
1115
- [Command-line API](#command-line-api)
1216
- [Commands](#commands)
17+
- [`build`](#build)
18+
- [`clean`](#clean)
19+
- [`query`/`cquery`/`aquery`](#querycqueryaquery)
1320
- [Options](#options)
21+
- [`-v`/`--verbose`](#-v--verbose)
22+
- [`--config`](#--config)
23+
- [`--generator_output_groups`](#--generator_output_groups)
24+
- [`--download_intermediates`](#--download_intermediates)
1425
- [Substitutions](#substitutions)
1526

1627
# Bazel aspects
@@ -28,24 +39,23 @@ To use the aspect, you apply it at the command line:
2839
```
2940
bazel build //some:target \
3041
--aspects=@rules_xcodeproj//xcodeproj:compile_only_aspect.bzl%compile_only_aspect \
31-
--output_groups=compile_only
42+
--output_groups=compiles
3243
```
3344

3445
You can also create a Bazel configuration in a `.bazelrc` file to reuse the
3546
aspect easily:
3647

3748
```
3849
common:compile_only --aspects=@rules_xcodeproj//xcodeproj:compile_only_aspect.bzl%compile_only_aspect
39-
common:compile_only --output_groups=compile_only
50+
common:compile_only --output_groups=compiles
4051
```
4152

4253
And use it, for example, with the command-line API:
4354

4455
```
4556
bazel run //label/to:xcodeproj \
4657
-- \
47-
--generator_output_groups=all_targets \
48-
'build --config=compile_only --remote_download_minimal'
58+
'build --config=compile_only --remote_download_minimal $_GENERATOR_LABEL_'
4959
```
5060

5161
# Bazel configs

examples/integration/MODULE.bazel

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ bazel_dep(
55
)
66
bazel_dep(
77
name = "apple_support",
8-
version = "1.15.1",
8+
version = "1.21.0",
99
repo_name = "build_bazel_apple_support",
1010
)
1111
bazel_dep(
@@ -50,13 +50,18 @@ use_repo(
5050
"local_config_apple_cc_toolchains",
5151
)
5252

53-
# TODO: Remove manual register once https://github.com/bazelbuild/rules_cc/commit/c8c38f8c710cbbf834283e4777916b68261b359c is released
54-
register_toolchains("@local_config_apple_cc_toolchains//:all")
55-
5653
non_module_deps = use_extension(":repositories.bzl", "non_module_deps")
5754
use_repo(
5855
non_module_deps,
5956
"FXPageControl",
6057
"com_github_krzyzanowskim_cryptoswift",
6158
"com_google_google_maps",
6259
)
60+
61+
new_local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "new_local_repository")
62+
63+
new_local_repository(
64+
name = "examples_command_line_external",
65+
build_file = "//CommandLine/external:BUILD.tpl",
66+
path = "CommandLine/external",
67+
)
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
new_local_repository(
2-
name = "examples_command_line_external",
3-
build_file = "//CommandLine/external:BUILD.tpl",
4-
path = "CommandLine/external",
5-
)

examples/integration/iOSApp/Source/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ ios_application(
4444
":release_build": [],
4545
"//conditions:default": [
4646
"--digest-algorithm=sha1",
47-
"--resource-rules=$(RESOURCE_RULES)",
4847
],
4948
}),
5049
entitlements = "ios app.entitlements",
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)