Open daflecardoso opened 3 years ago
It seems you have to use a release version of PodToBUILD. You could clone this repo and make it on you own, or use the one I just created https://github.com/iftechio/PodToBUILD/releases/download/3.4.3-c538dab/PodToBUILD.zip
@mcfans
I tried to use this version https://github.com/iftechio/PodToBUILD/releases/download/3.4.3-c538dab/PodToBUILD.zip
the dependencies have been installed
_bazel run @rules_pods//:update_pods -- --srcroot $PWD
INFO: Build completed successfully, 2 total actions
Updating pods in /Users/dafle/Desktop/project
Building PodToBUILD dependencies...
running: make release
skipping build..
Updating Pod RxSwift...
Updating Pod RxRelay...
Updating Pod RxCocoa...
Updating Pod Alamofire...
But when i tried to build the target app, using RxCocoa dependency
bazel build //ios-app:ios-app-swift
I got this error
/Users/dafle/Desktop/project/Vendor/RxCocoa/BUILD.bazel:47:14: Compiling Swift module RxCocoa failed: (Exit 1): worker failed: error executing command bazel-out/host/bin/external/build_bazel_rules_swift/tools/worker/worker swiftc ... (remaining 1 argument(s) skipped)
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "../RxCocoa_umbrella_header.h"
^
/private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/bazel-out/ios-x86_64-min11.0-applebin_ios-ios_x86_64-fastbuild-ST-1665503f7bef/bin/Vendor/RxCocoa/RxCocoa_module_map/../RxCocoa_umbrella_header.h:19:9: note: in file included from /private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/bazel-out/ios-x86_64-min11.0-applebin_ios-ios_x86_64-fastbuild-ST-1665503f7bef/bin/Vendor/RxCocoa/RxCocoa_module_map/../RxCocoa_umbrella_header.h:19:
#import "Vendor/RxCocoa/RxCocoa/RxCocoa.h"
^
/private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/./Vendor/RxCocoa/RxCocoa/RxCocoa.h:10:9: error: '_RX.h' file not found
#import "_RX.h"
^
<unknown>:0: error: could not build Objective-C module 'RxCocoa'
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "../RxCocoa_umbrella_header.h"
^
/private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/bazel-out/ios-x86_64-min11.0-applebin_ios-ios_x86_64-fastbuild-ST-1665503f7bef/bin/Vendor/RxCocoa/RxCocoa_module_map/../RxCocoa_umbrella_header.h:19:9: note: in file included from /private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/bazel-out/ios-x86_64-min11.0-applebin_ios-ios_x86_64-fastbuild-ST-1665503f7bef/bin/Vendor/RxCocoa/RxCocoa_module_map/../RxCocoa_umbrella_header.h:19:
#import "Vendor/RxCocoa/RxCocoa/RxCocoa.h"
^
/private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/./Vendor/RxCocoa/RxCocoa/RxCocoa.h:10:9: error: '_RX.h' file not found
#import "_RX.h"
^
<unknown>:0: error: could not build Objective-C module 'RxCocoa'
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "../RxCocoa_umbrella_header.h"
^
/private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/bazel-out/ios-x86_64-min11.0-applebin_ios-ios_x86_64-fastbuild-ST-1665503f7bef/bin/Vendor/RxCocoa/RxCocoa_module_map/../RxCocoa_umbrella_header.h:19:9: note: in file included from /private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/bazel-out/ios-x86_64-min11.0-applebin_ios-ios_x86_64-fastbuild-ST-1665503f7bef/bin/Vendor/RxCocoa/RxCocoa_module_map/../RxCocoa_umbrella_header.h:19:
#import "Vendor/RxCocoa/RxCocoa/RxCocoa.h"
^
/private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/./Vendor/RxCocoa/RxCocoa/RxCocoa.h:10:9: error: '_RX.h' file not found
#import "_RX.h"
^
<unknown>:0: error: could not build Objective-C module 'RxCocoa'
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "../RxCocoa_umbrella_header.h"
^
/private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/bazel-out/ios-x86_64-min11.0-applebin_ios-ios_x86_64-fastbuild-ST-1665503f7bef/bin/Vendor/RxCocoa/RxCocoa_module_map/../RxCocoa_umbrella_header.h:19:9: note: in file included from /private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/bazel-out/ios-x86_64-min11.0-applebin_ios-ios_x86_64-fastbuild-ST-1665503f7bef/bin/Vendor/RxCocoa/RxCocoa_module_map/../RxCocoa_umbrella_header.h:19:
#import "Vendor/RxCocoa/RxCocoa/RxCocoa.h"
^
/private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/./Vendor/RxCocoa/RxCocoa/RxCocoa.h:10:9: error: '_RX.h' file not found
#import "_RX.h"
^
<unknown>:0: error: could not build Objective-C module 'RxCocoa'
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "../RxCocoa_umbrella_header.h"
^
/private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/bazel-out/ios-x86_64-min11.0-applebin_ios-ios_x86_64-fastbuild-ST-1665503f7bef/bin/Vendor/RxCocoa/RxCocoa_module_map/../RxCocoa_umbrella_header.h:19:9: note: in file included from /private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/bazel-out/ios-x86_64-min11.0-applebin_ios-ios_x86_64-fastbuild-ST-1665503f7bef/bin/Vendor/RxCocoa/RxCocoa_module_map/../RxCocoa_umbrella_header.h:19:
#import "Vendor/RxCocoa/RxCocoa/RxCocoa.h"
^
/private/var/tmp/_bazel_dafle/95ebb7f9aadb563e67eff2a44c6579b0/execroot/__main__/./Vendor/RxCocoa/RxCocoa/RxCocoa.h:10:9: error: '_RX.h' file not found
#import "_RX.h"
^
<unknown>:0: error: could not build Objective-C module 'RxCocoa'
Target //ios-app:ios-app-swift failed to build
Use --verbose_failures to see the command lines of failed build steps.
I guess that, BUILD file isn't generated correct in this version of PodToBUILD, in some libraries that use swift with objc
RxCoca, Moya, Realm....
Yeah, I met this problem too. Swift library in generated BUILD file missed some include path, so we got this error in swift-objc mixed pod because swift compiler can't find the objc headers. I am trying to solve this, but not too soon
@mcfans
inside BUILD file generated RxCocoa I replaced the line 124 by 125, and it works fine.
looks like the problem is relative to header_visibility attribute.
I trying to use PodToBUILD master latest version, but i got an error
WORKSPACE FILE
Pods.WORKSPACE
BUILD file
when run command
bazel run @rules_pods//:update_pods -- --src_root $PWD
i got
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