Skip to content

Commit 5c10273

Browse files
Merge branch 'main' into pennig/calculate-output-groups
Signed-off-by: Karim Alweheshy <[email protected]>
2 parents 9b32f69 + 0be7a7f commit 5c10273

Some content is hidden

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

51 files changed

+1976
-756
lines changed

.bcr/metadata.template.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
"email": "[email protected]",
1111
"github": "BalestraPatrick",
1212
"name": "Patrick Balestra"
13+
},
14+
{
15+
"email": "[email protected]",
16+
"github": "luispadron",
17+
"name": "Luis Padron"
1318
}
1419
],
1520
"repository": [

MODULE.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ bazel_dep(name = "bazel_skylib", version = "1.3.0")
1111
bazel_dep(
1212
name = "rules_swift",
1313
version = "1.6.0",
14+
max_compatibility_level = 2,
1415
repo_name = "build_bazel_rules_swift",
1516
)
1617
bazel_dep(
@@ -73,7 +74,7 @@ single_version_override(
7374
# For Stardoc
7475
single_version_override(
7576
module_name = "bazel_skylib",
76-
version = "1.5.0",
77+
version = "1.6.0",
7778
)
7879

7980
apple_cc_configure = use_extension(

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ the ruleset.
5353

5454
## Projects using rules_xcodeproj
5555

56+
- amo
5657
- BazelPods
5758
- Cash App
5859
- Envoy Mobile
@@ -66,6 +67,7 @@ the ruleset.
6667
- [Slack](https://www.youtube.com/watch?v=wy3Q38VJ5uQ)
6768
- Snap
6869
- Spotify
70+
- Square
6971
- SwiftLint
7072
- Ten Ten
7173
- Tinder
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
## What’s Changed
2+
3+
### Since %LAST_TAG%
4+
5+
* TBD
6+
7+
**Below are the changes that were in %LAST_TAG%.**
8+
9+
### ⚠️ Breaking changes ⚠️
10+
11+
* TBD
12+
13+
### New
14+
15+
* TBD
16+
17+
### Adjusted
18+
19+
* TBD
20+
21+
### Fixed
22+
23+
* TBD
24+
25+
### Ruleset Development Changes
26+
27+
* TBD
28+
29+
### Full Changelog
30+
31+
https://github.com/buildbuddy-io/rules_xcodeproj/compare/%LAST_MINOR_TAG%...%CURRENT_TAG%
32+
33+
## Contributors
34+
35+
* TBD
36+
37+
## Bzlmod Snippet
38+
39+
```starlark
40+
bazel_dep(name = "rules_xcodeproj", version = "%CURRENT_TAG%")
41+
```
42+
43+
`release.tar.gz`’s `integrity`: `%INTEGRITY%`
44+
45+
## Workspace Snippet
46+
47+
Please use the release asset (`release.tar.gz`) from your Bazel `WORKSPACE` instead of GitHub's source asset to reduce download size and improve reproducibility.
48+
49+
```starlark
50+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
51+
52+
http_archive(
53+
name = "rules_xcodeproj",
54+
integrity = "%INTEGRITY%",
55+
url = "https://github.com/MobileNativeFoundation/rules_xcodeproj/releases/download/%CURRENT_TAG%/release.tar.gz",
56+
)
57+
58+
load(
59+
"@rules_xcodeproj//xcodeproj:repositories.bzl",
60+
"xcodeproj_rules_dependencies",
61+
)
62+
63+
xcodeproj_rules_dependencies()
64+
65+
load("@bazel_features//:deps.bzl", "bazel_features_deps")
66+
67+
bazel_features_deps()
68+
69+
load(
70+
"@build_bazel_rules_apple//apple:repositories.bzl",
71+
"apple_rules_dependencies",
72+
)
73+
74+
apple_rules_dependencies()
75+
76+
load(
77+
"@build_bazel_rules_swift//swift:repositories.bzl",
78+
"swift_rules_dependencies",
79+
)
80+
81+
swift_rules_dependencies()
82+
83+
load(
84+
"@build_bazel_rules_swift//swift:extras.bzl",
85+
"swift_rules_extra_dependencies",
86+
)
87+
88+
swift_rules_extra_dependencies()
89+
90+
load(
91+
"@build_bazel_apple_support//lib:repositories.bzl",
92+
"apple_support_dependencies",
93+
)
94+
95+
apple_support_dependencies()
96+
```

docs/bazel.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ load("@rules_xcodeproj//xcodeproj:defs.bzl", "xcodeproj")
3333
- [`xcschemes.env_value`](#xcschemes.env_value)
3434
- [`xcschemes.pre_post_actions.build_script`](#xcschemes.pre_post_actions.build_script)
3535
- [`xcschemes.pre_post_actions.launch_script`](#xcschemes.pre_post_actions.launch_script)
36+
- [`xcschemes.autogeneration_config`](#xcschemes.autogeneration_config)
3637
- [Custom Xcode schemes (Legacy generation mode)](#custom-xcode-schemes-legacy-generation-mode)
3738
- [`xcode_schemes.scheme`](#xcode_schemes.scheme)
3839
- [`xcode_schemes.build_action`](#xcode_schemes.build_action)

examples/integration/CommandLine/CommandLineToolLib/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ cc_library(
2727
name = "private_lib",
2828
srcs = ["private_lib.c"],
2929
hdrs = ["private_lib.h"],
30+
aspect_hints = ["@build_bazel_rules_swift//swift:auto_module"],
3031
copts = [
3132
# This isn't needed bty anything, it's to exercise an edge case in
3233
# `FilePath` detection.
3334
"-Ibazel-out",
3435
"-Iexternal",
3536
],
36-
tags = ["swift_module=_Lib"],
3737
)
3838

3939
swift_library(
@@ -55,7 +55,7 @@ swift_library(
5555
visibility = ["//CommandLine/Tests:__subpackages__"],
5656
deps = [
5757
":lib_impl",
58-
"//CommandLine/swift_c_module",
58+
"//CommandLine/swift_interop_hint:c_lib",
5959
"@examples_command_line_external//:ExternalFramework",
6060
"@examples_command_line_external//:Library",
6161
],

examples/integration/CommandLine/CommandLineToolLib/lib.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
@_implementationOnly import _Lib
21
@_implementationOnly import _SwiftLib
2+
@_implementationOnly import CommandLine_CommandLineToolLib_private_lib
33
import ExternalFramework
44
import Foundation
55
import ImportableLibrary
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_c_module")
1+
load(
2+
"@build_bazel_rules_swift//swift:swift_interop_hint.bzl",
3+
"swift_interop_hint",
4+
)
25

36
cc_library(
47
name = "c_lib",
@@ -8,14 +11,12 @@ cc_library(
811
hdrs = [
912
"c_lib.h",
1013
],
14+
aspect_hints = [":c_lib_swift_interop"],
15+
visibility = ["//CommandLine:__subpackages__"],
1116
)
1217

13-
swift_c_module(
14-
name = "swift_c_module",
18+
swift_interop_hint(
19+
name = "c_lib_swift_interop",
1520
module_map = "c_lib.modulemap",
1621
module_name = "SwiftCModule",
17-
visibility = ["//CommandLine:__subpackages__"],
18-
deps = [
19-
":c_lib",
20-
],
2122
)

examples/integration/GRPC/BUILD

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,34 @@
11
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_command_line_application")
2-
load(
3-
"@build_bazel_rules_swift//swift:swift.bzl",
4-
"swift_grpc_library",
5-
"swift_library",
6-
"swift_proto_library",
7-
)
2+
load("@build_bazel_rules_swift//proto:proto.bzl", "swift_proto_library")
3+
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
84

95
proto_library(
106
name = "echo_proto",
117
srcs = ["echo.proto"],
128
)
139

1410
swift_proto_library(
15-
name = "echo_proto_swift",
16-
deps = [":echo_proto"],
17-
)
18-
19-
swift_grpc_library(
2011
name = "echo_client_services_swift",
21-
srcs = [":echo_proto"],
22-
flavor = "client",
23-
deps = [":echo_proto_swift"],
12+
compilers = [
13+
"@build_bazel_rules_swift//proto/compilers:swift_client_proto",
14+
"@build_bazel_rules_swift//proto/compilers:swift_proto",
15+
],
16+
protos = [":echo_proto"],
2417
)
2518

26-
swift_grpc_library(
19+
swift_proto_library(
2720
name = "echo_server_services_swift",
28-
srcs = [":echo_proto"],
29-
flavor = "server",
30-
deps = [":echo_proto_swift"],
21+
compilers = [
22+
"@build_bazel_rules_swift//proto/compilers:swift_proto",
23+
"@build_bazel_rules_swift//proto/compilers:swift_server_proto",
24+
],
25+
protos = [":echo_proto"],
3126
)
3227

3328
swift_library(
3429
name = "echo_server.library",
3530
srcs = ["server_main.swift"],
36-
deps = [
37-
":echo_proto_swift",
38-
":echo_server_services_swift",
39-
],
31+
deps = [":echo_server_services_swift"],
4032
)
4133

4234
macos_command_line_application(

examples/integration/GRPC/client_main.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import SwiftProtobuf
1717
import GRPC
1818
import NIOCore
1919
import NIOPosix
20-
import GRPC_echo_proto
2120
import GRPC_echo_client_services_swift
2221

2322
@main

examples/integration/GRPC/server_main.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import Dispatch
1616
import GRPC
1717
import NIOCore
1818
import NIOPosix
19-
import GRPC_echo_proto
2019
import GRPC_echo_server_services_swift
2120

2221
/// Concrete implementation of the `EchoService` service definition.

examples/integration/MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ bazel_dep(
1010
)
1111
bazel_dep(
1212
name = "rules_apple",
13-
version = "3.5.1",
13+
version = "3.6.0",
1414
repo_name = "build_bazel_rules_apple",
1515
)
1616
bazel_dep(
1717
name = "rules_swift",
18-
version = "1.18.0",
18+
version = "2.0.0",
1919
repo_name = "build_bazel_rules_swift",
2020
)
2121
bazel_dep(name = "bazel_skylib", version = "1.5.0")

examples/integration/Proto/BUILD

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_command_line_application")
2-
load(
3-
"@build_bazel_rules_swift//swift:swift.bzl",
4-
"swift_library",
5-
"swift_proto_library",
6-
)
2+
load("@build_bazel_rules_swift//proto:proto.bzl", "swift_proto_library")
3+
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
74

85
proto_library(
96
name = "person_proto",
@@ -12,15 +9,14 @@ proto_library(
129

1310
swift_proto_library(
1411
name = "person_proto_swift",
15-
deps = [":person_proto"],
12+
module_name = "Proto_person_proto",
13+
protos = [":person_proto"],
1614
)
1715

1816
swift_library(
1917
name = "tool.library",
2018
srcs = ["main.swift"],
21-
deps = [
22-
":person_proto_swift",
23-
],
19+
deps = [":person_proto_swift"],
2420
)
2521

2622
macos_command_line_application(

examples/integration/WORKSPACE

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2+
13
local_repository(
24
name = "rules_xcodeproj",
35
path = "../..",
46
)
57

8+
http_archive(
9+
name = "build_bazel_rules_swift",
10+
sha256 = "32eeb4ef33c708d9c9a4ee0fa8475322ef149dabc81884ddc3b50eb2efff7843",
11+
url = "https://github.com/bazelbuild/rules_swift/releases/download/2.0.0/rules_swift.2.0.0.tar.gz",
12+
)
13+
614
load(
715
"@rules_xcodeproj//xcodeproj:repositories.bzl",
816
"xcodeproj_rules_dependencies",

0 commit comments

Comments
 (0)