Hi , we updated xcode to version 11.2.1 with swift version 5.1 recently .
Both of moya version13 and version14 gave errors likes this
carthage bootstrap Moya --platform iOS --no-use-binaries
*** Checking out Moya at "14.0.0-beta.5"
*** Checking out ReactiveSwift at "5.0.1"
*** Checking out Alamofire at "4.9.1"
*** Checking out RxSwift at "4.5.0"
*** xcodebuild output can be found in /var/folders/86/_5vgd1fj5nscjbtrzyrzx0sw0000gq/T/carthage-xcodebuild.JVRVlf.log
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
*** Building scheme "Result-iOS" in Result.xcodeproj
*** Building scheme "ReactiveSwift-iOS" in ReactiveSwift.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace /Users/eric/workspace/n2boost/jugg5/Carthage/Checkouts/ReactiveSwift/ReactiveSwift.xcworkspace -scheme ReactiveSwift-iOS -configuration Release -derivedDataPath /Users/eric/Library/Caches/org.carthage.CarthageKit/DerivedData/11.2.1_11B53/ReactiveSwift/5.0.1 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/86/_5vgd1fj5nscjbtrzyrzx0sw0000gq/T/ReactiveSwift SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/eric/workspace/n2boost/jugg5/Carthage/Checkouts/ReactiveSwift)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/86/_5vgd1fj5nscjbtrzyrzx0sw0000gq/T/carthage-xcodebuild.JVRVlf.log
Can you provide the content of the build log?
Can you provide the content of the build log?
There's one thousand lines of logs. I just paste last 100 lines . I can email you all the logs if you need.
Can you provide the content of the build log?
/Users/eric/workspace/n2boost/jugg5/Carthage/Checkouts/Moya/Sources/Moya/Moya+Alamofire.swift:29:26: error: value of type 'TaskDelegate' has no member 'sessionConfiguration'
return delegate?.sessionConfiguration.httpAdditionalHeaders as? [String: String] ?? [:]
~~~ ^~~~~~
/Users/eric/workspace/n2boost/jugg5/Carthage/Checkouts/Moya/Sources/Moya/Moya+Alamofire.swift:29:24: error: cannot use optional chaining on non-optional value of type 'TaskDelegate'
return delegate?.sessionConfiguration.httpAdditionalHeaders as? [String: String] ?? [:]
~~~~^
/Users/eric/workspace/n2boost/jugg5/Carthage/Checkouts/Moya/Sources/Moya/Moya+Alamofire.swift:70:24: error: value of type 'Request' has no member 'cURLDescription'
return request.cURLDescription()
~~~ ^~~~~
/Users/eric/workspace/n2boost/jugg5/Carthage/Checkouts/Moya/Sources/Moya/MoyaProvider+Defaults.swift:30:23: error: value of type 'URLSessionConfiguration' has no member 'headers'
configuration.headers = .default
~~~ ^~~
/Users/eric/workspace/n2boost/jugg5/Carthage/Checkouts/Moya/Sources/Moya/MoyaProvider+Defaults.swift:30:34: error: type 'Any' has no member 'default'
configuration.headers = .default
~^~~
/Users/eric/workspace/n2boost/jugg5/Carthage/Checkouts/Moya/Sources/Moya/MoyaProvider+Internal.swift:99:19: error: pattern cannot match values of type 'Task'
case .downloadDestination(let destination), .downloadParameters(_, _, let destination):
~^~~~~~~~
/Users/eric/workspace/n2boost/jugg5/Carthage/Checkouts/Moya/Sources/Moya/MoyaProvider+Internal.swift:99:58: error: pattern cannot match values of type 'Task'
case .downloadDestination(let destination), .downloadParameters(_, _, let destination):
~^~~~~~~~~
/Users/eric/workspace/n2boost/jugg5/Carthage/Checkouts/Moya/Sources/Moya/MoyaProvider+Internal.swift:269:83: error: cannot convert value of type '(DispatchQueue, @escaping DownloadRequest.ProgressHandler) -> DownloadRequest' (aka '(DispatchQueue, @escaping (Progress) -> ()) -> DownloadRequest') to expected argument type 'Progress?'
progressCompletion(ProgressResponse(progress: downloadRequest.downloadProgress, response: value))
~~~~^~~~
/Users/eric/workspace/n2boost/jugg5/Carthage/Checkouts/Moya/Sources/Moya/MoyaProvider+Internal.swift:273:79: error: cannot convert value of type '(DispatchQueue, @escaping DataRequest.ProgressHandler) -> DataRequest' (aka '(DispatchQueue, @escaping (Progress) -> ()) -> DataRequest') to expected argument type 'Progress?'
progressCompletion(ProgressResponse(progress: dataRequest.downloadProgress, response: value))
~~^~~~~~
* ARCHIVE FAILED *
The following build commands failed:
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
CompileSwift normal armv7
(4 failures)
I get the same error.
Any progress with this problem?
Can't use Moya in project, very sad.
Same thing here.
It seems to be breaking at the point of building ReactiveSwift. Carthage is checking out version 5.0.1 when the latest is 6.0.1 which has Swift 5.1 support: https://github.com/ReactiveCocoa/ReactiveSwift/releases
I tried adding the ReactiveSwift dependency to the Cartfile as well, but I get this error from Carthage:
Could not pick a version for github "ReactiveCocoa/ReactiveSwift", due to mutually incompatible requirements:
~> 6.1.0
~> 5.0.0 (github "Moya/Moya")
So maybe Moya has to be updated to work with ReactiveSwift's version 6.1.0?
I also wanted to add that Xcode 11.2.1 uses Swift 5.1.2. Don't know if that makes a difference.
After more playing around with it, seems it works fine if using Moya 14.0.0-beta.5 as such in your Cartfile:
github "Moya/Moya" "14.0.0-beta.5"
I don't know why it didn't work for you @xutengfei
It also works for me:
Cartfile: github "Moya/Moya" "14.0.0-beta.5"
carthage bootstrap Moya --platform iOS --no-use-binaries
*** Checking out Moya at "14.0.0-beta.5"
*** Checking out RxSwift at "5.0.1"
*** Checking out ReactiveSwift at "6.1.0"
*** Checking out Alamofire at "5.0.0-rc.3"
Your error seems to be due to Carthage not using the correct dependencies versions.
I am in the same situation.
Did you solve?
If so, please teach me how
@tomoki69386 please copy/paste your Cartfile.resolved file and Carthage logs when you do carthage bootstrap/update
I am in the same situation.
Did you solve?
If so, please teach me how
no. I just revert xcode to 10.2.
We still have the same problem.
After more playing around with it, seems it works fine if using Moya 14.0.0-beta.5 as such in your Cartfile:
github "Moya/Moya" "14.0.0-beta.5"
How is using beta version is an acceptable solution here?
How is using
betaversion is an acceptable solution here?
It's not a solution, it's the version with which OP had problems.
I see, my bad.
Having the same issue
This issue has been marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been auto-closed because there hasn't been any activity for at least 21 days. However, we really appreciate your contribution, so thank you for that! 馃檹 Also, feel free to open a new issue if you still experience this problem 馃憤.
Most helpful comment
I get the same error.
Any progress with this problem?
Can't use Moya in project, very sad.