bazel-xcode / bazel-xcode/PodToBUILD
error loading package '': Every .bzl file must have a corresponding package, but '@rules_pods//BazelExtensions:workspace.bzl'
- Dominant language
- Swift
- Stars
- 330
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Description
I trying to use PodToBUILD master latest version, but i got an error
WORKSPACE FILE
```
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.31.3",
)
#git_repository(
# name = "build_bazel_rules_swift",
# remote = "https://github.com/bazelbuild/rules_swift.git",
# tag = "0.18.0",
#)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "build_bazel_rules_swift",
sha256 = "d0e5f888b2ccce42c92e6d4686b5507b4230462627f965f9d39862e11ae9fb35",
url = "https://github.com/bazelbuild/rules_swift/releases/download/0.18.0/rules_swift.0.18.0.tar.gz",
)
load(
"@build_bazel_rules_swift//swift:repositories.bzl",
"swift_rules_dependencies",
)
swift_rules_dependencies()
load(
"@build_bazel_rules_swift//swift:extras.bzl",
"swift_rules_extra_dependencies",
)
swift_rules_extra_dependencies()
git_repository(
name = "build_bazel_apple_support",
remote = "https://github.com/bazelbuild/apple_support.git",
tag = "0.11.0",
)
git_repository(
name = "bazel_skylib",
remote = "https://github.com/bazelbuild/bazel-skylib.git",
tag = "1.0.3",
)
http_archive(
name = "rules_pods",
urls = ["https://github.com/pinterest/PodToBUILD/archive/refs/heads/master.zip"],
)
load("@rules_pods//BazelExtensions:workspace.bzl", "new_pod_repository")
```
Pods.WORKSPACE
```
new_pod_repository(
name = "RxSwift",
url = "https://github.com/ReactiveX/RxSwift/archive/5.0.0.zip",
)
new_pod_repository(
name = "RxRelay",
url = "https://github.com/ReactiveX/RxSwift/archive/5.0.0.zip",
)
new_pod_repository(
name = "RxCocoa",
url = "https://github.com/ReactiveX/RxSwift/archive/5.0.0.zip",
)
new_pod_repository(
name = "Alamofire",
url = "https://github.com/Alamofire/Alamofire/archive/5.4.0.zip",
)
```
BUILD file
```
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application")
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
load("@rules_cc//cc:defs.bzl", "objc_library")
swift_library(
name = "Source",
srcs = glob([
"*.swift",
]),
data = [
"Main.storyboard",
"LaunchScreen.storyboard"
],
deps = [
"//ios-app/submodules/FeatureA",
"//ios-app/submodules/FeatureB",
"//ios-app/submodules/FeatureC",
"//ios-app/submodules/FeatureD",
"//Vendor/Alamofire:Alamofire",
"//Vendor/RxSwift:RxSwift",
"//Vendor/RxRelay:RxRelay",
"//Vendor/RxCocoa:RxCocoa",
],
)
ios_application(
name = "ios-app-swift",
bundle_id = "br.com.example-app-swift",
families = [
"iphone",
"ipad",
],
minimum_os_version = "11.0",
infoplists = [":Info.plist"],
visibility = ["//visibility:public"],
deps = [
":Source"
],
)
```
when run command ```bazel run @rules_pods//:update_pods -- --src_root $PWD```
i got
```
error loading package '': Every .bzl file must have a corresponding package, but '@rules_pods//BazelExtensions:workspace.bzl' does not have one. Please create a BUILD file in the same or any parent directory. Note that this BUILD file does not need to do anything except exist.
```
This version works fine (install) update_pods command
```https://github.com/pinterest/PodToBUILD/releases/download/3.4.1-ea20598f/PodToBUILD.zip```
but is outdated, i got error when build the app, the BUILD.bazel file generated inside each pod is outdated generation
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.