PodToBUILD icon indicating copy to clipboard operation
PodToBUILD copied to clipboard

Cannot easily import pods by name

Open sgammon opened this issue 3 years ago • 0 comments

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.

sgammon avatar Jul 25 '20 01:07 sgammon