bazel-xcode / bazel-xcode/PodToBUILD

Most of the time I am getting "in objc_library rule XXX: target YYY is not visible from target XXX. Check the visibility declaration of the former target if you think the dependency is legitimate." error

Open
#145 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
330
Forks
68
PR merge metrics
No merged PRs in 30d

Description

WORKSPACE

```
...
new_pod_repository(
name = "NotificationBannerSwift",
url = "https://github.com/Daltron/NotificationBanner/archive/3.0.4.zip",
)

new_pod_repository(
name = "MarqueeLabel",
url = "https://github.com/cbpowell/MarqueeLabel/archive/4.0.2.zip",
)

new_pod_repository(
name = "SnapKit",
url = "https://github.com/SnapKit/SnapKit/archive/5.0.1.zip",
)
```

BUILD

```
load(
"@build_bazel_rules_swift//swift:swift.bzl",
"swift_library",
)

swift_library(
name = "MyLib",
srcs = glob(
[
"MyLib/**/*.swift",
]
),
deps = [
"@SnapKit//:SnapKit",
"@NotificationBannerSwift//:NotificationBannerSwift",
],
)
```

Output of `bazel build`

```
ERROR: /private/var/tmp/_bazel_/external/NotificationBannerSwift/BUILD.bazel:64:13: in objc_library rule @NotificationBannerSwift//:NotificationBannerSwift_cxx: target '@MarqueeLabel//:MarqueeLabel' is not visible from target '@NotificationBannerSwift//:NotificationBannerSwift_cxx'. Check the visibility declaration of the former target if you think the dependency is legitimate

ERROR: /private/var/tmp/_bazel_/external/NotificationBannerSwift/BUILD.bazel:64:13: in objc_library rule @NotificationBannerSwift//:NotificationBannerSwift_cxx: target '@SnapKit//:SnapKit' is not visible from target '@NotificationBannerSwift//:NotificationBannerSwift_cxx'. Check the visibility declaration of the former target if you think the dependency is legitimate
```

Anyone has some idea how to solve this instead of import both Pods manually in Bazel? Thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.