'...' 不是 Travis 上的后缀一元运算符 CI

'...' is not a postfix unary operator on Travis CI

我一直在慢慢更新一个旧项目,突然开始从 Travis 那里收到这个错误 CI...

2018-05-20 13:32:21.393 xcodebuild[1348:5913] Error Domain=IDETestOperationsObserverErrorDomain Code=4 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/travis/Library/Developer/Xcode/DerivedData/CF_Apps-eihscxvvnylkkecahehxquvcotoo/Logs/Test/2B963612-D4B6-4CE6-BD58-FC9C49FFAE11/Session-CF Apps Tests-2018-05-20_133203-xth6Px.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/travis/Library/Developer/Xcode/DerivedData/CF_Apps-eihscxvvnylkkecahehxquvcotoo/Logs/Test/2B963612-D4B6-4CE6-BD58-FC9C49FFAE11/Session-CF Apps Tests-2018-05-20_133203-xth6Px.log}
2018-05-20 13:32:21.394 xcodebuild[1348:7053] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled <DTXChannel: 0x7fb70286f820>
Testing failed:
    '...' is not a postfix unary operator
    'count' is unavailable: there is no universally good answer, see the documentation comment for discussion
    Cannot convert value of type 'Int' to expected argument type 'IntMax' (aka 'Int64')
    Cannot convert value of type 'Int8' to expected argument type 'IntMax' (aka 'Int64')
    Cannot convert value of type 'Int16' to expected argument type 'IntMax' (aka 'Int64')
    Cannot convert value of type 'Int32' to expected argument type 'IntMax' (aka 'Int64')
    Cannot convert value of type 'UInt' to expected argument type 'UIntMax' (aka 'UInt64')
    Cannot convert value of type 'UInt8' to expected argument type 'UIntMax' (aka 'UInt64')
    Cannot convert value of type 'UInt16' to expected argument type 'UIntMax' (aka 'UInt64')
    Cannot convert value of type 'UInt32' to expected argument type 'UIntMax' (aka 'UInt64')
** TEST FAILED **
The following build commands failed:
    CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
    CompileSwift normal x86_64 /Users/travis/build/osis/cf-apps-ios/Pods/ObjectMapper/Sources/HexColorTransform.swift
    CompileSwift normal x86_64 /Users/travis/build/osis/cf-apps-ios/Pods/ObjectMapper/Sources/IntegerOperators.swift
(3 failures)
The command "xcodebuild -workspace CF\ Apps.xcworkspace -scheme CF\ Apps -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone SE' build-for-testing test" exited with 65.
Done. Your build exited with 1.
/Users/travis/.travis/job_stages: line 166: shell_session_update: command not found

我没有更改任何代码,这在本地运行正常。

在更新许多内容时,我忽略了本地环境与 Travis CI 之间的 Xcode 颠簸差异 CI。

正在改变...

osx_image: xcode8.3

到...

osx_image: xcode9.3

在我的 .travis.yml 中为我解决了这个问题。