Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle header patterns that start with "**/" #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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