Skip to content

v1.9.0

Latest
Compare
Choose a tag to compare
@richard-ramos richard-ramos released this 13 Mar 15:37
v1.9.0
3c93bda

Highlights

  • Async exception tracking - Procedures marked {.async.} are annotated with the list of exceptions they might raise
  • Self-signed TLS certificates can be generated. These will be used with Quic and WebTransport

Breaking change

  • Python3 and pip are introduced as a dependency due to mbedtls requiring them to generate some of its source code. In a subsequent release, we will attempt to remove this dependency on Python.
  • The LPProtoHandler type has changed and now specifies raised exceptions in the async pragma, namely async: (raises: [CancelledError]). Consequently, all protocol handlers must also specify async: (raises: [CancelledError]).

Example, code constructs like:

proc handler(conn: Connection, proto: string) {.async.} = 
  try:
    ...
  except CancelledError:
    trace "Unexpected cancellation in handler"

should be changed to:

proc handler(conn: Connection, proto: string) {.async: (raises: [CancelledError]).} =
  try:
    ...
  except CancelledError as exc:
    trace "Unexpected cancellation in handler"
    raise exc

Note:

  • async pragma adds raises: [CancelledError]
  • CancelledError is propagate up the chain

What's Changed

New Contributors

Full Changelog: v1.8.0...v1.9.0