Skip to content

Releases: connectrpc/connect-kotlin

v0.3.0

20 Oct 15:05
01f93c5
Compare
Choose a tag to compare

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 to cause.

com.connectrpc.BidirectionalStreamInterface

  • resultChannel renamed to responseChannel. 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 the ResponseMessage type. The method will throw a ConnectException on error.

com.connectrpc.ConnectError

  • Renamed to ConnectException.
  • Changed to extend Exception instead of Throwable.

com.connectrpc.ResponseMessage.Failure

  • error renamed to cause.

com.connectrpc.ServerOnlyStreamInterface

  • resultChannel renamed to responseChannel. 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 to cause.

v0.2.0

22 Sep 18:37
ea77fd5
Compare
Choose a tag to compare

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

Other changes

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.

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().

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).
  • send()
    • Callers should invoke sendAndClose() instead. Otherwise, reading results from resultChannel() will hang since the send side of the stream should be closed before reading responses.

com.connectrpc.StreamResult

Removed

  • Removed the error field from the base StreamResult class. It was never used by the Headers or Message subclasses and only used on the Complete type. This should make it easier for callers to use Headers and Message types since they don't need to worry about handling error.

v0.1.11

15 Sep 19:49
2951a51
Compare
Choose a tag to compare

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

Full Changelog: v0.1.10...v0.1.11

v0.1.10

08 Sep 20:22
d8d9865
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v0.1.9...v0.1.10

v0.1.9

11 Aug 18:12
2e45257
Compare
Choose a tag to compare

What's Changed

Other changes

Full Changelog: v0.1.8...v0.1.9

v0.1.8

20 Jul 17:48
fab9e07
Compare
Choose a tag to compare

What's Changed

Other changes

New Contributors

Full Changelog: v0.1.7...v0.1.8

v0.1.7

02 May 17:11
7ce9b3c
Compare
Choose a tag to compare

What's Changed

Other changes

  • Add JvmOverloads on public APIs for Java users by @pkwarren in #42
  • Attempt to fix plugin release to github by @pkwarren in #43

New Contributors

Full Changelog: v0.1.6...v0.1.7

v0.1.6

26 Apr 16:06
c6b9ba1
Compare
Choose a tag to compare

What's Changed

Other changes

New Contributors

Full Changelog: v0.1.5...v0.1.6

v0.1.5

19 Apr 18:04
5da30f1
Compare
Choose a tag to compare

What's Changed

Other changes

Full Changelog: v0.1.4...v0.1.5

v0.1.4

13 Mar 21:06
297627e
Compare
Choose a tag to compare

What's Changed

Other changes

Full Changelog: v0.1.3...v0.1.4