Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2025-03-14 | 3.9 kB | |
v1.9.0 source code.tar.gz | 2025-03-14 | 465.0 kB | |
v1.9.0 source code.zip | 2025-03-14 | 600.0 kB | |
Totals: 3 Items | 1.1 MB | 0 |
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 theasync
pragma, namelyasync: (raises: [CancelledError])
. Consequently, all protocol handlers must also specifyasync: (raises: [CancelledError])
.
Example, code constructs like:
:::nim
proc handler(conn: Connection, proto: string) {.async.} =
try:
...
except CancelledError:
trace "Unexpected cancellation in handler"
should be changed to:
:::nim
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
- chore: add isClosedRemotely public bool attribute in lpstream by @Ivansete-status in https://github.com/vacp2p/nim-libp2p/pull/1242
- refactor(pubsub): do not raise exceptions on publish by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/1244
- style: fix code style with nph by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1246
- chore: list raised exceptions in
utils
module by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1252 - chore: specify raising exceptions in
daemon
module by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1249 - chore: add description of public pragma by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1262
- chore: refactors to remove
.closure.
,.gcsafe
for.async.
procs, and added callback compatibility todaemonapi
by @richard-ramos in https://github.com/vacp2p/nim-libp2p/pull/1240 - chore(connmanager): specify raised exceptions by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1263
- chore: add trace log to analyse remote stream reset by @Ivansete-status in https://github.com/vacp2p/nim-libp2p/pull/1253
- chore: list raised exceptions in
switch
services by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1251 - chore(transports): list raised exceptions by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1255
- chore(dialer): list raised exceptions by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1264
- chore(protocol): list raised exceptions by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1260
- chore(transports): specify raised exceptions by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1266
- chore(protocols): specify raised exceptions (part 2) by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1268
- chore: specify raised exceptions in miscellaneous places by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1269
- chore(relay): specify raised exceptions by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1274
- feat(tls-certificate): generate and parse libp2p tls certificate by @diegomrsantos in https://github.com/vacp2p/nim-libp2p/pull/1209
- chore(protocol): handler to propagate CancelledError by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1275
- chore(connmanager): propagate CancelledError by @vladopajic in https://github.com/vacp2p/nim-libp2p/pull/1276
New Contributors
- @vladopajic made their first contribution in https://github.com/vacp2p/nim-libp2p/pull/1246
Full Changelog: https://github.com/vacp2p/nim-libp2p/compare/v1.8.0...v1.9.0