Releases: grpc/grpc-swift
2.0.0-beta.2
What's Changed
✨ New APIs
- The
RPCErrorConvertible
protocol was added in #2143 which allows the gRPC server runtime to convert conforming types to an appropriate status code and message to send back to the client.
💡 Examples
Two new examples have been added:
- reflection-server demonstrates the gRPC Reflection Service which has been added to grpc/grpc-swift-extras. (Added in #2149)
- error-details demonstrates the detailed error model which is made available via the grpc/grpc-swift-protobuf package. (Added in #2145)
🔧 Other Changes
- Enable MemberImportVisibility check on all targets by @rnro in #2142
- Update release.yml by @FranzBusch in #2148
- Remove unused Foundation imports by @glbrntt in #2146
- Bump versions by @glbrntt in #2150
Full Changelog: 2.0.0-beta.1...2.0.0-beta.2
2.0.0-beta.1
What's Changed
2.0.0-beta.1 includes a number of API breaking changes from 2.0.0-alpha.1, including changes to the generated code.
⚙️ Code generation
The generated code has had a number of changes:
- Nested protocols and types. The various protocols generated for each service are now nested within the namespace of each service. This is a breaking change. If your generated service was previously called
FooService_ServiceProtocol
then it will now be nested within theFooService
enum
and will beFooService.ServiceProtocol
. This also applies to the client protocol, clientstruct
, and streaming service protocol. - Simple service protocol. Another simpler protocol is now generated (
SimpleServiceProtocol
) making it easier to implement services. This is the recommended protocol to implement if you don't need access to metadata. - Documentation. Generated code now includes documentation on how to use it and includes any documentation from the source IDL.
These changes were done in #2114, #2115, #2116, #2117, #2122, #2125, #2126, #2128, #2129, #2131, #2132, #2133, #2134, #2137, #2138, #2139, and #2141.
🔄 Interceptors
Interceptors can now be registered per-service and per-method in addition to being applied to all methods. This work was done in #2096 and #2113.
✨ Other notable changes
- RPC cancellation handler. Service implementers can use
withRPCCancellationHandler(operation:onCancelRPC:)
to register a callback which is invoked when the RPC is cancelled. (#2090) - Remote peer information. The server context now contains information about the identity of the remote peer. (#2136)
- "with-" methods for client and server allow you to more easily run a client and server. (#2121)
- MethodDescriptor now uses ServiceDescriptor to represent the fully qualified service name. (#2127)
- Allow metadata to be mutated on server responses. Metadata can now be mutated in place on server responses. (#2120)
GRPCCore
is no longer@_exported
, this is a breaking change and requires you to add an explicit dependency onGRPCCore
and import it where appropriate. (#2109)- Flatten
RPCError
cause to avoid deeply nested errors of the same type. (#2083)
🐛 Bug fixes
🔧 Other Changes
- Improvements to CI and tooling (#2105, #2091, #2106)
- Use Swift's new
Mutex
inBroadcastAsyncSequence
(#2108) - Improvements to documentation (#2100, #2112, #2123)
Full Changelog: 2.0.0-alpha.1...2.0.0-beta.1
gRPC Swift 1.24.2
gRPC Swift 1.24.1
gRPC Swift 1.24.0
gRPC Swift 2.0.0-alpha.1
🚀 The gRPC Swift team is excited to announce the first alpha release of gRPC Swift v2! 🚀
Highlights 🌟
- An
async/await
implementation from the ground up. The new library is built on top of Swift's native concurrency features and takes advantage of structured concurrency to make it easier to reason about your RPCs. It's also built from the ground up to support the Swift 6 language mode. - Expressive and easy to use APIs. Our APIs have been designed to be simple to use for newcomers and flexible enough for expert users.
- Pluggable transport layer. The underlying transport for clients and servers have been abstracted away to a transport layer; SwiftNIO is now an implementation detail and brought in via a separate package, grpc/grpc-swift-nio-transport.
- Pluggable serialisation. The serialisation layer is also pluggable, support for Swift Protobuf is made available via grpc/grpc-swift-protobuf.
- Better performance than v1. Benchmarks show that the SwiftNIO based transport for v2 is up to 80% faster than the equivalent benchmarks for gRPC Swift v1.
Getting started 📚
Please note that this is pre-release software, we don't guarantee any API stability and this shouldn't be considered production ready.
To get started with gRPC Swift v2, take a look at our examples and documentation:
- Documentation is hosted on the Swift Package Index
- Examples are available in the
Examples/
directory
Feedback 💬
If you have any questions or feedback be it good, bad, big, or small please let us know by opening an issue.
gRPC Swift 1.23.1
SemVer Patch
- Swift 6-ify the package manifest (#1955)
- Fix warnings in SwiftPM plugin (#1958)
- Update to protobuf 1.27.0 (#1973)
- Improve error message for missing reflection data (#2038)
- Use SwiftProtobuf's new CodeGenerator interface (#2043)
- Stop using deprecated protobuf API (#2045)
- Bump version number to 1.23.1 (#2062)
Other Changes
- Manually cleanup unix domain socket path in NIOTS test (#1951)
- Add integ test for SwiftPM plugin (#1956)
- Move v1 examples to v1 subdirectory (#1963)
- Update test certs (#1966)
- Fix broken symlinks (#1988)
- Update test certs (#1998)
- Fix tests to work with unreleased swift-nio changes (#2001)
- Add check that generated code is up-to-date (#2013)
- Add docc docs for grpc core (#2016)
- Use Swift 6 to build docs on Swift Package Index (#2020)
- Move examples to top-level (#2024)
- Regenerate protos (#2039)
- Update plugin bundling script (#2053)
gRPC Swift 1.23.0
gRPC Swift 1.22.0
SemVer Minor
- Add a minimum connections configuration to the ConnectionPool (#1822)
- Raise minimum swift version to 5.8 (#1825)
SemVer Patch
- Log connection age when closing a connection (#1799)
- Notify of quiescing when there are no open streams on graceful shutdown (#1819)
- Update Version.swift (#1846)
Other Changes
- Update README (#1809)
gRPC Swift 1.21.1
SemVer Patch
- Fix a bug in
protoc-gen-grpc-swift
where no output would be producedClient=False,TestClient=True
(#1765, patch credit to @severnt) - Update metric serialization in logs to send integers as values (#1783, patch credit to @gliush)
- Better waiter errors with NIOTS (#1775)
- Use configured connect timeout when retries is none (#1777)
- Add scripts to fetch and generate protos and update generated files (#1784)
- Additional logging for connection pool (#1795)
- Bump version number to 1.21.1 (#1798)