THRIFT-4838: Add unix socket support for Swift #2766
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[skip ci]
anywhere in the commit message to free up build resources.What
Adds unix domain sockets as a low level transport option for the Swift library
Why
To improve Swift language support in Thrift.
This change will, for example, enable the use of the popular OSQuery library natively in Swift (currently only supports Obj-C++)
How
Extend the existing
TSocketServer
with a new initializer, taking apath
input to a Unix domain socket path, and connecting to it. A newUnixSocket
wrapper class was created for wrapping the different socket implementations in Linux and macOS.Compatibility
All changes are additive or equivalent; there are no breaking changes.
Testing
Enables
domain
socket tests in the cross-test suite for Swift.Some cross-tests are failing due to other languages not implementing the
UUID
type or their implementation doesn't match the spec.After rebasing on master it seems the cross-tests also seem to not be running right now in CI due to a failure to build the go library