MobileNativeFoundation / MobileNativeFoundation/rules_xcodeproj
Feature Request: Have a build mode that leverages an XCBBuildService proxy for a more integrated experience
Open
@brentleyjones is already working on this.
Since Apr 3, 2023.
BwP
feature request
- Dominant language
- Swift
- Stars
- 626
- Forks
- 124
- PR merge metrics
- No merged PRs in 30d
Description
We should support a new xcodeproj.build_mode value of "proxy", which causes Xcode to use a custom XCBBuildService proxy.
Differences from BwB mode (not all of this has to land in the initial version):
BazelDependenciestarget only shows Bazel output, output from Bazel targets that don't translate to Xcode targets, and possibly output from unfocused targets- Probably will be renamed
calculate_output_groups.pyisn't needed any more- Similar functionality will be part of of the proxy, just loaded into memory
- BEP is parsed/translated to create a Build Report
- Each target is represented as an actual target
- Dia files are parsed and sent over as diagnotics (#400 and #402), fixing Fix-Its
- Swift parsable output is parsed (when a new version of https://github.com/bazelbuild/rules_swift/pull/304 lands), showing per-file progress
- Progress bar is updated to match the progress made towards the Build Report (so probably doesn't match Bazel's really weird progress indicator)
- Where possible, we no longer copy products to
DerivedData(e.g. non-zipped binaries or bundles) - If possible,
IndexingInfoResponsepoints tobazel-out/per-library indexing data, preventing the need forindex-import- This can only work if
-file-prefix-mapis used
- This can only work if
Some open questions:
- How do we want to integrate the proxy with Xcode? And do we make some of these options for the user to decide?
- Launch
Xcode.app/Contents/MacOS/Xcodefrom$SRCROOTwithXCBBUILDSERVICE_PATHset. This has the side benefit of fixing some relative path issues (e.g. #1284). Ideally we could modify the name and/or icon of the Xcode instance in the Dock, otherwise this could be confusing (though we could kill all versions of the same Xcode that are open...). - Modify the
Xcode.appbundle. This has permissions/security issues.
- Launch
- Is this the new default?
- I assume no, at least to start, and possibly ever, because of the above integration issues
- How are unfocused targets represented in the Build Report?
- We might be able to give them an ID that isn't associated with a target in the project. If that's the case, they aren't handled any differently. Otherwise we can have them be sub-outputs on
BazelDependencies
- We might be able to give them an ID that isn't associated with a target in the project. If that's the case, they aren't handled any differently. Otherwise we can have them be sub-outputs on
This issue will serve as an Epic. Smaller focused issues will be made as needed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.