bazel-xcode / bazel-xcode/PodToBUILD
Mixed language / Swift support
- Dominant language
- Swift
- Stars
- 330
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Description
Add support for Swift / mixed languages.
I think this is pretty straight forward. The main difference between Xcode and Bazel is that Xcode allows mixed language targets, and Bazel does not. The PodSpec format is heavily influenced by this feature.
Logic for swift could work out like this:
- Determine if a given `Spec` contains swift. We need to search the possible source files in glob patterns: possibly evaluating all permutations of the globs.
- If the glob does contain swift, then split out a `swift_library` which is fused onto the dependency graph. The name of the `Spec` should point to a bazel target that links either Swift or Objc deps.
The base `objc_library` should depend on the `swift_library` if needed.
The same logic should apply for other languages, or subsets of a pod which contain settings that only work with a subset of the source code, like `C++` conditional options used in `Texture`. This logic should fix [the recent query](https://groups.google.com/forum/#!topic/bazel-discuss/rJWrDnxKmcUa) to `bazel-discuss` and workarounds for `Texture`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.