bazel-xcode / PodToBUILD

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

Cannot easily import pods by name #147

Open sgammon opened 4 years ago

sgammon commented 4 years ago

Typically, the pod imports must be mangled with PodToBUILD to reflect the build target (referring to vendored pods here), like so:

Pods.WORKSPACE

new_pod_repository(
  name = "Hue",
  url = "https://github.com/zenangst/Hue/archive/b9d920cee4ba795fefb828d130744eee1e3d2feb.zip",
  inhibit_warnings = True,
)

...later...

BUILD.bzl

ViewController.swift

import Vendor_Hue_Hue_swift

// ...

It would be much cleaner if one could simply:

import Hue

as expected. This would also avoid tightly coupling source code to target paths, which might prevent easy refactoring down the road.