/Source/SwiftCloudant/HTTP/URLSession.swift is performing an explicit cast from String to NSString as below which does not work on Linux due to which the test suite crashes on linux while processing the httpAdditionalHeaders by Swift Foundation .
config.httpAdditionalHeaders = [("User-Agent" as NSString) as AnyHashable: InterceptableSession.userAgent()].
Moreover, we don't need explicit casting as the String itself can be casted to AnyHashable .
Thanks for your hard work, please ensure all items are complete before opening.
What
/Source/SwiftCloudant/HTTP/URLSession.swift is performing an explicit cast from String to NSString as below which does not work on Linux due to which the test suite crashes on linux while processing the
httpAdditionalHeaders
by Swift Foundation .config.httpAdditionalHeaders = [("User-Agent" as NSString) as AnyHashable: InterceptableSession.userAgent()]
.Moreover, we don't need explicit casting as the String itself can be casted to AnyHashable .
How
Removed explicit casting to NSString
Testing
Running the cloudant test-suite on Linux
Issues
https://github.com/IBM-Swift/SwiftRuntime/issues/382