bazel-xcode / PodToBUILD

An easy way to integrate CocoaPods into Bazel
Apache License 2.0
322 stars 69 forks source link

Implement cocoapods source file logic #130

Closed jerrymarino closed 4 years ago

jerrymarino commented 4 years ago

Previously, the source file logic is close to, but doesn't reproduce what cocopods does. For some pods, like FBSDKCoreKit, this is highly problematic.

This PR implements identical logic to what cocoapods has as of writing: https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/sandbox/file_accessor.rb

To handle arc sources it implements ruby's union operator with Globs

There's a few cleanups in this PR that make it possibl to implement the logic. Mainly, it flips Glob to AttrSet. This enables both a recursive glob, and also arrays of globs.

This PR also ditches the lenses which were used primarily to implement the previous version of this. It leverages Swift 5's keypath operator instead.

I added severaral examples of new podspecs

jerrymarino commented 4 years ago

Ok, I've fixed up the tests ( which thankfully caught an issue ) and split out the swift 5 migration here https://github.com/pinterest/PodToBUILD/pull/133