Releases: connectrpc/connect-kotlin
v0.3.0
Release v0.3.0 improves the streaming API for bidi and server streaming calls, renames ConnectError to ConnectException to match JVM conventions, and supports passing a separate OkHttp client for use in streaming calls.
What's Changed
API Improvements
- Rework ConnectError to ConnectException by @jzbrooks in #120
- Improve API for bidi and server streaming calls by @pkwarren in #130
Other changes
- Allow separate client for streaming calls by @pkwarren in #128
- Update dependencies and fix javadoc artifacts by @pkwarren in #127
- Use a more specific type for error callbacks by @jzbrooks in #132
- Treat warnings as errors in tool and library code by @jzbrooks in #133
New Contributors
Full Changelog: v0.2.0...v0.3.0
API Updates
com.connectrpc.http.HTTPResponse
error
renamed tocause
.
com.connectrpc.BidirectionalStreamInterface
resultChannel
renamed toresponseChannel
. The channel now returns the response messages from the stream (canceling the channel with a ConnectException if an error occurs).
com.connectrpc.ClientOnlyStreamInterface
receiveAndClose
now returns the response message instead of a message wrapped in theResponseMessage
type. The method will throw a ConnectException on error.
com.connectrpc.ConnectError
- Renamed to
ConnectException
. - Changed to extend
Exception
instead ofThrowable
.
com.connectrpc.ResponseMessage.Failure
error
renamed tocause
.
com.connectrpc.ServerOnlyStreamInterface
resultChannel
renamed toresponseChannel
. The channel now returns the response messages from the stream (canceling the channel with a ConnectException if an error occurs).
com.connectrpc.StreamResult.Complete
error
renamed tocause
.
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
.
v0.1.11
What's Changed
This is the first release of Connect in the connectrpc
GitHub organization. The package name has changed to com.connectrpc
.
To update from the previous release, change the groupId from build.buf
to com.connectrpc
and the version to 0.1.11
. The artifact names haven't changed.
To migrate to the new package name, a shell script is usually sufficient:
On Linux, or anywhere with GNU sed
:
find . -type f \( -name "*.kt" -o -name "*.java" \) -exec sed -i 's|build.buf.connect|com.connectrpc|g' {} \;
On Mac, or anywhere with BSD sed
:
find . -type f \( -name "*.kt" -o -name "*.java" \) -exec sed -i '' 's|build.buf.connect|com.connectrpc|g' {} \;
When you change your source code, you'll also need to switch to the version of protoc-gen-connect-kotlin
in this repository. If you're using the Buf CLI with the buf.build/bufbuild/connect-kotlin
remote plugin, switch to the buf.build/connectrpc/kotlin
plugin.
We apologize for any inconvenience that this rename causes. We're doing this to prepare Connect for donation to a foundation, which will put it on a better footing for long-term maintenance by multiple stakeholders.
If you encounter any problems or have questions, please reach out to us by filing an issue or joining #connectrpc
in the Gophers Slack.
New Contributors
- @smallsamantha made their first contribution in #97
Full Changelog: v0.1.10...v0.1.11
v0.1.10
What's Changed
Enhancements
- Add version to user-agent string by @pkwarren in #80
- Switch JSON serde to use codegen instead of reflection by @pkwarren in #92
Other changes
- Migrate crosstests to use testcontainers by @pkwarren in #84
- Update references for crosstests by @smaye81 in #85
- Clarify that Connect-Kotlin provides clients by @timostamm in #91
- Dependency and build updates: #71, #72, #73, #82, #86, #93, #95
New Contributors
- @smaye81 made their first contribution in #85
- @timostamm made their first contribution in #91
Full Changelog: v0.1.9...v0.1.10
v0.1.9
What's Changed
Other changes
- Move crosstests to unit tests by @buildbreaker in #65
- Split stream close functionality by @buildbreaker in #58
- Add blocking unary generation by @buildbreaker in #50
Full Changelog: v0.1.8...v0.1.9
v0.1.8
What's Changed
Other changes
- Fix github release of .jar artifact by @pkwarren in #44
- Remove directories from sha256.txt path by @pkwarren in #45
- Add unary get support for connect-kotlin by @buildbreaker in #33
- Clean up HTTPClientInterface by @buildbreaker in #47
- Add extensions for ResponseMessage like Kotlin's Result type by @kohenkatz in #40
- Rename maxURLBytes to maxMessageBytes by @buildbreaker in #48
- Update studio url to point to new location by @pkwarren in #55
New Contributors
- @kohenkatz made their first contribution in #40
Full Changelog: v0.1.7...v0.1.8
v0.1.7
v0.1.6
What's Changed
Other changes
- Fix plugin release to github by @buildbreaker in #38
- Sanitize generated comments by @stefanvanburen in #39
New Contributors
- @stefanvanburen made their first contribution in #39
Full Changelog: v0.1.5...v0.1.6
v0.1.5
What's Changed
Other changes
- Add plugin to maven publish by @buildbreaker in #28
- Add sourceinfo parsing for method comments by @buildbreaker in #30
- Fix URI resolution by @buildbreaker in #35
- Fix request stream close on stream pause by @buildbreaker in #36
Full Changelog: v0.1.4...v0.1.5
v0.1.4
What's Changed
Other changes
- Fix release/close as final release step by @buildbreaker in #25
- Fix plugin release action by @buildbreaker in #27
Full Changelog: v0.1.3...v0.1.4