bazel-xcode / PodToBUILD

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

new_pod_repository with tags fails #199

Open SwapnilNighot opened 2 years ago

SwapnilNighot commented 2 years ago

Hi, I am trying to use the new_pod_repository with the tag in the pods URL as below

new_pod_repository(
  name = "SDWebImage",
  url = "https://github.com/SDWebImage/SDWebImage/archive/refs/tags/5.12.3.zip",
  generate_header_map = 1
)

it's failing with the error as below.

Updating Pod SDWebImage...
_exec failed 4  RepoToolsCore/RepoActions.swift:257: Fatal error: Missing podspec ( ./SDWebImage.podspec ) inside /MY_PROJECT_PATH/Vendor/SDWebImage

Also it creates the additional folder with the tag name (Vendor/SDWebImage/SDWebImage-5.12.3). I thought may be it's failing because of it and tried putting podspec_url but it's still failing.

Where as, if I use it without the tag as below

new_pod_repository(
  name = "SDWebImage",
  url = "https://github.com/SDWebImage/SDWebImage/archive/5.12.3.zip",
  generate_header_map = 1
)

Is working as expected.

Is this behaviour is as expected ?

lexuanquynh commented 2 years ago

same issue. Bazel can't read generate_header_map property. I don't know why.

Jacky-LinPeng commented 2 years ago

Did you finally have a solution?

SwapnilNighot commented 2 years ago

Like I mentioned in the ticket, I am able to consume the pod by using the url without tags. Like this - url = "https://github.com/SDWebImage/SDWebImage/archive/5.12.3.zip"

Jacky-LinPeng commented 2 years ago

Like I mentioned in the ticket, I am able to consume the pod by using the url without tags. Like this - url = "https://github.com/SDWebImage/SDWebImage/archive/5.12.3.zip"

After downloading SDWebImage dependencies using new_pod_repository, how do you integrate them into your demo project? I encountered a problem when I imported the "sdwebimage.h" project saying the header file did not exist

johndpope commented 1 year ago

try looking at full path where it falls out - then hard code like this podspec_url = "Vendor/Texture/Texture-3.1.0/Texture.podspec",