nim-chronos/chronos
Tanguy a759c11ce4
Raise tracking (#251)
* Exception tracking v2

* some fixes

* Nim 1.2 compat

* simpler things

* Fixes for libp2p

* Fixes for strictException

* better await exception check

* Fix for template async proc

* make async work with procTy

* FuturEx is now a ref object type

* add tests

* update test

* update readme

* Switch to asyncraises pragma

* Address tests review comments

* Rename FuturEx to RaiseTrackingFuture

* Fix typo

* Split asyncraises into async, asyncraises

* Add -d:chronosWarnMissingRaises

* Add comment to RaiseTrackingFuture

* Allow standalone asyncraises

* CheckedFuture.fail type checking

* First cleanup

* Remove useless line

* Review comments

* nimble: Remove #head from unittest2

* Remove implict raises: CancelledError

* Move checkFutureExceptions to asyncfutures2

* Small refacto

* small cleanup

* Complete in closure finally

* cleanup tests, add comment

* bump

* chronos is not compatible with nim 1.2 anymore

* re-add readme modifications

* fix special exception handlers

* also propagate excetion type in `read`

* `RaiseTrackingFuture` -> `InternalRaisesFuture`

Use internal naming scheme for RTF (this type should only be accessed
via asyncraises)

* use `internalError` for error reading

* oops

* 2.0 workarounds

* again

* remove try/finally for non-raising functions

* Revert "remove try/finally for non-raising functions"

This reverts commit 86bfeb5c97.

`finally` is needed if code returns early :/

* fixes

* avoid exposing `newInternalRaisesFuture` in manual macro code
* avoid unnecessary codegen for `Future[void]`
* avoid reduntant block around async proc body
* simplify body generation for forward declarations with comment but no
body
* avoid duplicate `gcsafe` annotiations
* line info for return at end of async proc

* expand tests

* fix comments, add defer test

---------

Co-authored-by: Jacek Sieka <jacek@status.im>
2023-10-17 14:18:14 +02:00
..
apps/http Cancellation fixes and tests. (#445) 2023-09-15 19:38:39 +03:00
ioselects Recover `poll` engine and add tests. (#421) 2023-08-01 12:56:08 +03:00
streams Cancellation fixes and tests. (#445) 2023-09-15 19:38:39 +03:00
transports Cancellation fixes and tests. (#445) 2023-09-15 19:38:39 +03:00
unittest2 add connect cancellation test (#444) 2023-09-05 13:41:52 +03:00
apps.nim exception tracking (#166) 2021-03-24 10:08:33 +01:00
asyncfutures2.nim Raise tracking (#251) 2023-10-17 14:18:14 +02:00
asyncloop.nim Cancellation fixes and tests. (#445) 2023-09-15 19:38:39 +03:00
asyncmacro2.nim Raise tracking (#251) 2023-10-17 14:18:14 +02:00
asyncproc.nim Cancellation fixes and tests. (#445) 2023-09-15 19:38:39 +03:00
asyncsync.nim Cancellation fixes and tests. (#445) 2023-09-15 19:38:39 +03:00
config.nim Recover `poll` engine and add tests. (#421) 2023-08-01 12:56:08 +03:00
debugutils.nim Introduce `chronos/futures` (#405) 2023-06-07 20:04:07 +02:00
futures.nim Complete futures in closure finally (fix #415) (#449) 2023-10-16 10:38:11 +02:00
handles.nim clean up `Defect` (#404) 2023-06-05 22:21:50 +02:00
osdefs.nim Recover `poll` engine and add tests. (#421) 2023-08-01 12:56:08 +03:00
oserrno.nim Add facility to emulate signals on Windows. (#357) 2023-06-02 01:53:20 +03:00
osutils.nim clean up `Defect` (#404) 2023-06-05 22:21:50 +02:00
ratelimit.nim Cancellation fixes and tests. (#445) 2023-09-15 19:38:39 +03:00
selectors2.nim Recover `poll` engine and add tests. (#421) 2023-08-01 12:56:08 +03:00
sendfile.nim Recover `poll` engine and add tests. (#421) 2023-08-01 12:56:08 +03:00
srcloc.nim clean up `Defect` (#404) 2023-06-05 22:21:50 +02:00
threadsync.nim Asynchronous thread notification mechanism. (#406) 2023-07-21 15:51:36 +03:00
timer.nim clean up `Defect` (#404) 2023-06-05 22:21:50 +02:00
transport.nim exception tracking (#166) 2021-03-24 10:08:33 +01:00