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

Header visibility issue for the added Cocoapods dependency #180

Open
sanju-naik opened this issue Aug 16, 2021 · 0 comments
Open

Header visibility issue for the added Cocoapods dependency #180

sanju-naik opened this issue Aug 16, 2021 · 0 comments

Comments

@sanju-naik
Copy link

I tried Integrating CocoaPods dependency using PodToBuild, added new_pod_repository rule to my Workspace file as mentioned in the ReadMe section.

When I run bazel build, getting this header visibility error

ERROR: /Users/sanju/TestProjects/BazelDemoApp/BUILD:13:14: in swift_library rule //:BazelDemoAppTarget: target '@Alamofire//:Alamofire' is not visible from target '//:BazelDemoAppTarget'. Check the visibility declaration of the former target if you think the dependency is legitimate ERROR: Analysis of target '//:BazelDemoApp' failed; build aborted: Analysis of target '//:BazelDemoAppTarget' failed INFO: Elapsed time: 8.222s

Then I checked into the BUILD.bazel file generated by PodToBuild [for the Pod I am integrating]. It doesn't mention visibility so the pod package has become private.

I got it working by manually adding below line to the Build.bazel file of the cocoapod.

package(default_visibility = ["//visibility:public"])

But I believe this should be taken care of by the PodToBuild plugin. Am I missing any config or parameter while setting up new_pod_repository? Any help on this would be appreciated. Thanks in advance.

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

No branches or pull requests

1 participant