Commit Graph

18 Commits

Author SHA1 Message Date
Jake Leahy
d88f46df38 Make async stacktraces less verbose (#21091)
* Name iterators something human readable

Remove intermediate async procs from stacktraces

Clean async traceback message from reraises message

* Remove unused import/variable

* Fix failing tests

Don't add {.stackTrace: off.} to anonymous procs (They already don't appear in stacktrace)

* Fix failing tests in pragma category

Now check that the nim is a routine type first so we don't run into any assertion defects

* Hide stack trace pragma in docs and update doc tests

User doesn't need to know if something won't appear so this more becomes verbose noise

If this is a bad idea we can always add a `when defined(nimdoc)` switch so we don't add {.stackTrace: off.} to the Future[T] returning proc for docs
2022-12-15 16:05:34 +01:00
ringabout
7739e23420 defaults to ORC (#19972)
* defaults to Orc

* bootstrap using refc

* use gc

* init orc defines

* unregister orc

* fix gc

* fix commands

* add prepareMutation for orc

* enable deepcopy for orc

* prepareMutation

* more fixes

* some cases

* bug #20081

* partial fixes

* partial fixes

* fixes command line

* more fixes

* build Nim with refc

* use gc

* more fixes

* rstore

* orc doesn't support threadpool

* more shallowCopy

* more fixes

* fixes unsafeNew

* workarounds

* small

* more fixes

* fixes some megatest

* tcodegenbugs1 refc

* fxies megatest

* build nimble with refc

* workaround tensordsl tests

* replace shallowCopy with move

* fixes action

* workaround

* add todo

* fixes important packages

* unpublic unregisterArcOrc

* fixes cpp

* enable windows

Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
2022-09-23 13:05:05 +02:00
Ștefan Talpalaru
a1c82c39af asyncdispatch+stackTraceOverride: fix premature collection (#18039) [backport:1.2]
Copying StackTraceEntry instances when nimStackTraceOverride is defined
breaks the link between a cstring field that's supposed to point at
another string field in the same object.

Sometimes, the original object is garbage collected, that memory region
reused for storing other strings, so when the StackTraceEntry copy tries
to use its cstring pointer to construct a traceback message, it accesses
unrelated strings.

This only happens for async tracebacks and this patch prevents that by
making sure we only use the string fields when nimStackTraceOverride is
defined.

Async tracebacks also beautified slightly by getting rid of an extra line
that was supposed to be commented out, along with the corresponding debugging output.

There's also a micro-optimisation to avoid concatenating two strings just
to get their combined length.
2021-05-19 19:19:11 +02:00
Alexander Ivanov
56584414f3 Make await a template (#12085)
* Make await a template
* Generate await inside async/multisync
2020-04-25 20:27:03 +02:00
Arne Döring
afbcd1b330 int128 on firstOrd, lastOrd and lengthOrd (#11701)
* fixes #11847
2019-08-07 15:53:16 +02:00
Andreas Rumpf
ac458448d8 make async tests green again 2019-07-11 11:09:10 +02:00
Araq
b2f9447896 make tests green again 2019-07-10 23:32:04 +02:00
Yuriy Glukhov
511d7079a1 Fixed tests 2018-06-06 20:04:37 +03:00
Yuriy Glukhov
5d166fcc0a Review comments addressed. More thorough line info tracking. 2018-05-10 00:27:50 +03:00
Dominik Picheta
72d9485e8e Fix tasync_traceback test. 2018-01-11 16:52:14 +00:00
Dominik Picheta
b7713859ab Use regex to match output of tasync_traceback. 2018-01-11 16:15:53 +00:00
Dominik Picheta
7e6dc3679a Simplify async traceback processing. 2017-12-28 09:21:22 +01:00
Dominik Picheta
383c80971c No need to recurse now that mergeEntries doesn't do any pattern matching. 2017-12-28 09:21:22 +01:00
Dominik Picheta
6301e33543 Show only detailed async tracebacks. 2017-12-28 09:21:22 +01:00
Dominik Picheta
3a790c9c72 Rename cb0 to asyncProcName_continue + other improvements to async tracebacks. 2017-12-28 09:21:22 +01:00
Dominik Picheta
a9a13e470b Go through the re-raise stacks for more detailed tracebacks. 2017-12-28 09:21:22 +01:00
Dominik Picheta
9ca6afe73a Refine the async tracebacks. 2017-12-28 09:21:22 +01:00
Dominik Picheta
f73015ad9e Implement some simple pattern-based transformation for async tracebacks. 2017-12-28 09:21:22 +01:00