Skip to content

Feature Request: Rewrite #15

@brentleyjones

Description

@brentleyjones

I’ve learned a lot about Xcode, Bazel, and integrating together since I started this project. In particular, with the development of rules_xcodeproj, I’ve come to realize that this project as it currently exists isn’t sufficient to create a maintainable general purpose XCBBuildService proxy solution.

To that end, I’ve decided to rewrite the project. Below are some of the keys changes in the rewrite. The main reason for a rewrite versus incremental changes, are because of major difference in how XCBProtocol is handled.

  • XCBProtocol is version-less
    • Models have all properties that any supported version of Xcode uses
    • Xcode version is passed to encoder/decode and used to determine how to serialize/deserialize
    • Supports MessagePack or JSON serialization (some message payloads have changed format over time)
    • Enums cases are properly mapped based on version (removing a case adjusts the integer value of subsequent vases)
  • MessagePack serialization is a Codable implementation
  • Swift concurrency is used instead of SwiftNIO
    • Xcode sessions are actors
    • Builds are actors
  • Logging (swift-log) is replaced with Logger (OSLog)
  • XCBBuildService and RequestHandler are replaced by a XCBBuildServiceProxyKit.Proxy protocol, which functions similar to SwiftUI.App
  • Tools/tests to detect XCBProtocol changes in new Xcode versions
  • Extensive developer documentation, including a DocC website for API and a “usage” document

To support code reviews while the rewrite is happening, development will happen on a dedicated branch, which main will fast forward to once it reaches an approximate feature parity state. This issue will serve as an Epic, and we might create smaller issues for specific pieces mentioned above (if needed beyond simply creating a PR).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions