@@ -8,11 +8,11 @@ rules_xcodeproj has a few high level design goals:
88- The project can be further customized by using additional rules_xcodeproj
99 rules, or by returning certain rules_xcodeproj providers from custom rules
1010- Outputs are as similar to ` bazel build ` as possible
11- - The project feels as " native" in Xcode as possible
11+ - The project feels as “ native” in Xcode as possible
1212- All definition of a project exists in ` BUILD ` files
1313- The project can be configured to use either Xcode or Bazel as the build system
1414
15- It' s also worth mentioning a few non-goals of rules_xcodeproj:
15+ It’ s also worth mentioning a few non-goals of rules_xcodeproj:
1616
1717- Providing additional non-` xcodeproj ` related build rules
1818- Changing the way a target builds in order to enable Xcode features
@@ -24,7 +24,7 @@ should build and run. There should be no need to adjust the way your workspace
2424is built in any way, or define any additional intermediary targets.
2525
2626Bazel allows for some pretty complicated stuff, and not all of it will
27- automatically translate neatly into Xcode' s world. In those cases the project
27+ automatically translate neatly into Xcode’ s world. In those cases the project
2828should still build and run (see how in the [ build mode] ( #multiple-build-modes )
2929section), but the project might not be in an ideal state (e.g. schemes might not
3030be the way you want them, or custom rule targets might not be represented
@@ -33,7 +33,7 @@ ideally). This can be addressed through project customization.
3333## Projects can be customized
3434
3535As mentioned above, the default state of using just the ` xcodeproj ` rule might
36- result in a project that isn't " ideal" . While the project should be able to
36+ result in a project that isn’t “ ideal” . While the project should be able to
3737build and run without doing anything else, rules_xcodeproj will support project
3838customization through the use of additional rules and providers.
3939
@@ -45,8 +45,8 @@ build, and if applicable run, those targets. If possible, all of the transitive
4545dependencies will also individually be buildable and runnable. Default schemes
4646will be created for each of these Xcode targets.
4747
48- What if you don' t like the way the schemes are created (e.g. too many, with
49- incorrect options, or not enough targets per scheme)? Or what if you don' t want
48+ What if you don’ t like the way the schemes are created (e.g. too many, with
49+ incorrect options, or not enough targets per scheme)? Or what if you don’ t want
5050all of the transitive dependencies represented in Xcode? Or what if you want to
5151customize how a target is represented, maybe by adding additional Xcode build
5252settings (e.g. to support
@@ -70,13 +70,13 @@ providers that it creates. The rule then uses that information to shape the
7070project that it generates.
7171
7272The ` xcodeproj ` rule has to make some assumptions about the data it gets, as the
73- providers from other rules don' t have the fidelity needed to perfectly recreate
73+ providers from other rules don’ t have the fidelity needed to perfectly recreate
7474a similar Xcode target. rules_xcodeproj will expose providers and associated
7575helper functions, to allow rules, including your own custom ones, to control how
7676the ` xcodeproj ` generates targets. The goal being that a default,
7777non-customized, project is as natural as possible. Rules that return
7878rules_xcodeproj providers can choose to expose customization points, similar to
79- the additional rules mentioned above, but that' s not their primary purpose.
79+ the additional rules mentioned above, but that’ s not their primary purpose.
8080
8181## Attempts to match the outputs of ` bazel build `
8282
@@ -87,12 +87,12 @@ care will need to be taken.
8787
8888## Native feeling projects
8989
90- Ideally, you shouldn' t be able to tell that a project was generated with
90+ Ideally, you shouldn’ t be able to tell that a project was generated with
9191rules_xcodeproj. It should look and feel like any other Xcode project. This
9292should also be the case regardless of which [ build mode] ( #multiple-build-modes )
9393is used.
9494
95- When that isn' t the case, and there needs to be a deviation (mainly to [ satisfy
95+ When that isn’ t the case, and there needs to be a deviation (mainly to [ satisfy
9696other constraints] ( #attempts-to-match-the-outputs-of-bazel-build ) ), then the
9797generated project should deviate as little as possible. A [ different build
9898mode] ( #build-with-bazel-via-proxy ) might be required to make the project feel
@@ -122,15 +122,15 @@ Here are a few reasons one may want to build with
122122Xcode instead of Bazel:
123123
124124- If a new, possibly beta, version of Xcode is released with a feature that
125- Build with Bazel doesn' t support yet, because one of Bazel, rules_apple,
126- rules_swift, or rules_xcodeproj doesn' t support it
125+ Build with Bazel doesn’ t support yet, because one of Bazel, rules_apple,
126+ rules_swift, or rules_xcodeproj doesn’ t support it
127127- To work around a bug in Bazel, rules_apple, rules_swift, or rules_xcodeproj
128128- To compare the Bazel and Xcode build systems or build commands
129129- As a step when migrating to Bazel
130130
131131### Build with Xcode
132132
133- In the " Build with Xcode" mode, the generated project will let Xcode orchestrate
133+ In the “ Build with Xcode” mode, the generated project will let Xcode orchestrate
134134the build. Xcode Build Settings, target dependencies, etc. are all set up to
135135create a normal Xcode experience.
136136
@@ -139,7 +139,7 @@ possible, some things are done differently than a vanilla Xcode project. In
139139particular, ` BUILT_PRODUCTS_DIR ` is set to a nested folder, mirroring the layout
140140of ` bazel-out/ ` , and various search paths are adjusted to account for this.
141141
142- There are also aspects of a Bazel build that can' t be neatly translated into an
142+ There are also aspects of a Bazel build that can’ t be neatly translated into an
143143Xcode concept (though updating rules to supply [ rules_xcodeproj
144144providers] ( #providers ) can help). One that will come up in nearly every project
145145is code generation. In these situations the project takes on a hybrid approach,
@@ -151,7 +151,7 @@ through the use of [focused project rules](#additional-rules).
151151
152152### Build with Bazel
153153
154- In the " Build with Bazel" mode, the generated project will invoke ` bazel build `
154+ In the “ Build with Bazel” mode, the generated project will invoke ` bazel build `
155155to perform the actual build, as a root or detached dependency, and then stub
156156out the build actions that Xcode tries to perform. A version of this method is
157157detailed [ here] ( https://github.com/kastiglione/bazel-xcode-demo-swift-driver/tree/master/bazel#disabling-xcodes-build )
@@ -165,25 +165,25 @@ This will be the default build mode by the 1.0 release.
165165
166166### Build with Bazel via Proxy
167167
168- rules_xcodeproj will support one more build mode called " Build with Bazel via
169- Proxy" . In this mode the generated project will rely on Xcode using an
168+ rules_xcodeproj will support one more build mode called “ Build with Bazel via
169+ Proxy” . In this mode the generated project will rely on Xcode using an
170170[ XCBBuildServiceProxy] ( https://github.com/MobileNativeFoundation/XCBBuildServiceProxyKit ) .
171171This takes the Xcode build system entirely out of the equation, allowing Bazel
172172to fully control the build.
173173
174- Here are some benefits that the proxy provides over " Build with Bazel" :
174+ Here are some benefits that the proxy provides over “ Build with Bazel” :
175175
176- - No additional " BazelDependencies" target in the build graph
176+ - No additional ` BazelDependencies ` target in the build graph
177177- Removal of duplicate warnings/errors
178178- More stable Indexing
179179- User created schemes (without defining bazel rules to create them) work as
180180 expected
181181- Fully functional progress bar (though there is hope that we can get it to
182- partially work with " Build with Bazel" )
182+ partially work with “ Build with Bazel” )
183183- Less overhead
184184
185- With all of these benefits, you may be wondering why " Build with Bazel" will be
186- the default build mode instead of " Build with Bazel via Proxy" . There are two
185+ With all of these benefits, you may be wondering why “ Build with Bazel” will be
186+ the default build mode instead of “ Build with Bazel via Proxy” . There are two
187187main reasons:
188188
189189- The proxy relies on a private API that Xcode uses to communicate with
@@ -199,25 +199,25 @@ main reasons:
199199 version of Xcode and not work with other versions.
200200
201201For some teams the benefits outweigh these inconveniences, and there will always
202- be the " Build with Bazel" fallback mode in case something goes wrong.
202+ be the “ Build with Bazel” fallback mode in case something goes wrong.
203203
204204## No additional non-` xcodeproj ` related build rules
205205
206- rules_xcodeproj won' t provide additional non-` xcodeproj ` related build rules.
206+ rules_xcodeproj won’ t provide additional non-` xcodeproj ` related build rules.
207207That is to say, the only rules that will be provided are ` xcodeproj ` and rules
208- that interact directly with ` xcodeproj ` . These rules won' t modify your build
208+ that interact directly with ` xcodeproj ` . These rules won’ t modify your build
209209graph.
210210
211- To put it yet another way, rules_xcodeproj won' t provide rules that make your
212- ` bazel build ` more like Xcode (which is one reason it wasn' t named
213- " rules_xcode" ). Those sorts of rules will have to come from other rulesets.
211+ To put it yet another way, rules_xcodeproj won’ t provide rules that make your
212+ ` bazel build ` more like Xcode (which is one reason it wasn’ t named
213+ “ rules_xcode” ). Those sorts of rules will have to come from other rulesets.
214214
215- ## Won' t change the way a target builds in order to enable Xcode features
215+ ## Won’ t change the way a target builds in order to enable Xcode features
216216
217217This non-goal stems from restrictions that SwiftUI previews have, in particular
218- that they aren' t supported with static libraries. rules_xcodeproj won' t change
218+ that they aren’ t supported with static libraries. rules_xcodeproj won’ t change
219219the product type of your target to enable SwiftUI previews; doing so would get
220220in the way of [ previous goals] ( #attempts-to-match-the-outputs-of-bazel-build ) .
221221We will provide guidance on how to change your build yourself and integrate that
222- change with rules_xcodeproj, but the rules themselves won' t make those changes
222+ change with rules_xcodeproj, but the rules themselves won’ t make those changes
223223for you.
0 commit comments