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 to bazel-discuss and workarounds for Texture.
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:
Spec
contains swift. We need to search the possible source files in glob patterns: possibly evaluating all permutations of the globs.swift_library
which is fused onto the dependency graph. The name of theSpec
should point to a bazel target that links either Swift or Objc deps. The baseobjc_library
should depend on theswift_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 inTexture
. This logic should fix the recent query tobazel-discuss
and workarounds forTexture
.