Skip to content

Conversation

FuegoFro
Copy link
Contributor

Some podspecs just include all files under their directory (eg RCTText). This breaks PodToBUILD both during generation (it passed an empty string to fileManager.subpathsOfDirectory, which threw an error) and at runtime (it double included the pod_support headers, which caused Bazel to fail). This fixes both of those issues.

Some podspecs just include all files under their directory (eg [RCTText](https://github.com/facebook/react-native/blob/0.61-stable/Libraries/Text/React-RCTText.podspec#L30)). This breaks PodToBUILD both during generation (it passed an empty string to `fileManager.subpathsOfDirectory`, which threw an error) and at runtime (it double included the `pod_support` headers, which caused Bazel to fail). This fixes both of those issues.
if lib.isTopLevelTarget {
var exposedHeaders: SkylarkNode = podSupportHeaders .+.
headers.toSkylark() .+. depHdrs.toSkylark()
headersWithoutPodSupport.toSkylark() .+. depHdrs.toSkylark()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think another option here is to do something similar to what I'm doing, but just add the pod_support glob into the main headers.include glob. I don't know if glob itself will complain about globs that match the same thing more than once or if it'll de-dupe internally before passing the targets/files on to Bazel. Also not sure if that's a preferred solution even if it does work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant