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

Using with swift project (swift_library) #181

Open
tgprojet opened this issue Aug 17, 2021 · 1 comment
Open

Using with swift project (swift_library) #181

tgprojet opened this issue Aug 17, 2021 · 1 comment

Comments

@tgprojet
Copy link

Hi, I am trying to use this macro with a project that is built using swift_library

I've created the Pods.WORKSPACE file with the following content

new_pod_repository(
  name = "CryptoSwift",
  url = "https://github.com/krzyzanowskim/CryptoSwift/archive/refs/tags/1.4.1.zip",
  inhibit_warnings = True,
  podspec_url = "https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/3/e/b/CryptoSwift/1.4.1/CryptoSwift.podspec.json"
)

Added the following lines to the root WORKSPACE

http_archive(
    name = "rules_pods",
    urls = ["https://github.com/pinterest/PodToBUILD/releases/download/0.25.2-8a5efa0/PodToBUILD.zip"],
)

load("@rules_pods//BazelExtensions:workspace.bzl", "new_pod_repository")

But when I try to use it as follows

swift_library(

    name = ".......
    deps = [
        "//Vendor/CryptoSwift:CryptoSwift",

I get the next error:

no such target '//Vendor/CryptoSwift:CryptoSwift': target 'CryptoSwift' not declared in package 'Vendor/CryptoSwift' defined by

@johndpope
Copy link
Contributor

johndpope commented Aug 27, 2022

did you try running
bazel run @rules_pods//:update_pods -- --src_root $PWD

this should checkout to the vendor folder

http_archive(
    name = "rules_pods",
    urls = ["https://github.com/pinterest/PodToBUILD/releases/download/4.1.0-412495/PodToBUILD.zip"],
)

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

2 participants