bazel-xcode / PodToBUILD

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

An error occurred during the fetch of repository #112

Closed noppefoxwolf closed 4 years ago

noppefoxwolf commented 4 years ago

Failed to resolve dependencies.

Environment

ERROR: An error occurred during the fetch of repository 'SlackTextViewController':
   Not a regular file: /private/var/tmp/_bazel_noppe/593d550ebb7d3789479ed80d0a5c34d7/external/rules_pods/bin/RepoTools

WORKSPACE

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

# ----

git_repository(
    name = "build_bazel_rules_apple",
    remote = "https://github.com/bazelbuild/rules_apple.git",
    tag = "0.19.0",
)

# ----

git_repository(
    name = "build_bazel_rules_swift",
    remote = "https://github.com/bazelbuild/rules_swift.git",
    tag = "0.13.0",
)
load(
    "@build_bazel_rules_swift//swift:repositories.bzl",
    "swift_rules_dependencies",
)
swift_rules_dependencies()

# ----

git_repository(
    name = "build_bazel_apple_support",
    remote = "https://github.com/bazelbuild/apple_support.git",
    tag = "0.7.2",
)
load(
    "@build_bazel_apple_support//lib:repositories.bzl",
    "apple_support_dependencies",
)
apple_support_dependencies()

# ----

git_repository(
    name = "bazel_skylib",
    remote = "https://github.com/bazelbuild/bazel-skylib.git",
    tag = "0.9.0",
)

# ----

load(
    "@com_google_protobuf//:protobuf_deps.bzl",
    "protobuf_deps",
)

protobuf_deps()

# ----

git_repository(
    name = "rules_pods",
    remote = "https://github.com/pinterest/PodToBUILD.git",
    branch = "master",
)
load("@rules_pods//BazelExtensions:workspace.bzl", "new_pod_repository")

new_pod_repository(
    name = "SlackTextViewController",
    url = "https://github.com/slackhq/SlackTextViewController/archive/v1.9.6.zip",
    inhibit_warnings = True,
    generate_module_map = False,
)

BUILD

load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application")
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
load("@rules_pods//BazelExtensions:workspace.bzl", "new_pod_repository")

swift_library(
    name = "Sources",
    srcs = glob(["*.swift"]),
    data = [
        "Base.lproj/LaunchScreen.storyboard",
        "Base.lproj/Main.storyboard",
    ],
    deps = [
        "@SlackTextViewController//:SlackTextViewController"
    ]
)

ios_application(
    name = "App",
    bundle_id = "be.tulipemoutarde.appa",
    families = ["iphone"],
    infoplists = [":Info.plist"],
    visibility = ["//visibility:public"],
    minimum_os_version = '13.0',
    deps = [
        ":Sources"
    ],
)
zh-se commented 4 years ago

Have the same issue. Any update on this?

rahul-malik commented 4 years ago

Can you try using the latest pre-release instead of master? We produce prebuilt binaries along with the source that works for us right now

zh-se commented 4 years ago

The latest release is working fine! E.g. changing appropriate lines to the following:

http_archive(
    name = "rules_pods",
    urls = ["https://github.com/pinterest/PodToBUILD/releases/download/0.25.2-8a5efa0/PodToBUILD.zip"],
    sha256 = "db4256e80fda350bff752f70385f3a332ac8b93d63c3ef677b11dca075dbe1ff",
)
load("@rules_pods//BazelExtensions:workspace.bzl", "new_pod_repository")

fixes the issue for me. @rahul-malik thank you for the help!

rahul-malik commented 4 years ago

thanks @zh-se !