v0.2.0
What's Changed
Release v0.2.0 fixes issues seen with streaming calls and addresses compatibility with gRPC servers.
Although connect-kotlin is still in alpha, we try to maintain compatibility between releases. Some of the fixes however required API changes, which are documented below.
Bugfixes
- Fix handling of gRPC trailers-only responses by @pkwarren in #101
- Fix several streaming issues by @pkwarren in #106
Other changes
- Add SECURITY.md by @smallsamantha in #102
- Update Kotlin to 1.9.10 @pkwarren in #103
- Add callback to cross test by @buildbreaker in #66
- Upgrade to latest spotless plugin by @pkwarren in #104
- Remove unnecessary bufbuild references by @smallsamantha in #105
- Add additional conformance streaming tests by @pkwarren in #108
Full Changelog: v0.1.11...v0.2.0
API Updates
com.connectrpc.BidirectionalStreamInterface
Removed
close()
- Use
sendClose()
instead. This may have confused callers that the close() method would close both send and receive sides of the connection when it was only closing the send side.
- Use
com.connectrpc.ClientOnlyStreamInterface
Added
sendClose()
- This shouldn't typically need to be called as receiveAndClose() already closes the send side of the stream.
isSendClosed()
Changed
receiveAndClose()
- Changed to return a ResponseMessage instead of a StreamResult. This allows callers to easily get access to the response as if they were calling a unary method. Previously, the StreamResult would only return the first result retrieved by the call, which typically was a Headers result (leaving callers unable to access the Message or Completion contents).
Removed
close()
- Replaced with
sendClose()
.
- Replaced with
com.connectrpc.ServerOnlyStreamInterface
Added
receiveClose()
isReceiveClosed()
Removed
close()
- This closed both the send and receive side of the stream (unlike in other interfaces which just closed the send side). If needed, callers should invoke
receiveClose()
instead (although this isn't necessary in normal use).
- This closed both the send and receive side of the stream (unlike in other interfaces which just closed the send side). If needed, callers should invoke
send()
- Callers should invoke
sendAndClose()
instead. Otherwise, reading results fromresultChannel()
will hang since the send side of the stream should be closed before reading responses.
- Callers should invoke
com.connectrpc.StreamResult
Removed
- Removed the
error
field from the baseStreamResult
class. It was never used by theHeaders
orMessage
subclasses and only used on theComplete
type. This should make it easier for callers to useHeaders
andMessage
types since they don't need to worry about handlingerror
.