summary refs log tree commit diff stats
path: root/lib/pure/asyncmacro.nim
Commit message (Collapse)AuthorAgeFilesLines
* Make async stacktraces less verbose (#21091)Jake Leahy2022-12-151-6/+10
| | | | | | | | | | | | | | | | | | | | | | | * 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
* `multisync` now allows tuples in return type (#21074)Jake Leahy2022-12-111-2/+2
| | | | | | | * Add test case * Use .toStrLit() on param node first This means that more complex types are fully rendered
* Use a unique name for template in async macro return (#21058)Jake Leahy2022-12-101-3/+3
| | | Use unique template name
* Implicit return working for async proc (#20933)Jake Leahy2022-12-091-2/+11
| | | | | | | | | | | | | * Implicit return working for asyncdispatch proc Closes #11558 * Test case * Test that return value is actually used * Update tests/async/t11558.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* stdlib organization & documentation improvements (#20971)metagn2022-12-061-1/+1
| | | | | | | | | | | | | | | | | * stdlib organization & documentation improvements * fix CI * Update doc/lib.md Co-authored-by: Juan Carlos <juancarlospaco@gmail.com> * fix ci, remove jshttpcore, export in jsfetch instead * fix alphabetical order violations * add cmdline, db_odbc Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
* new .redefine pragma for templates, warn on redefinition without it (#20211)metagn2022-08-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test CI for template redefinitions * adapt asyncmacro * fix quote * fix again * try something else * revert * fix ioselectors_select, disable packages CI * adapt more tests & simplify * more * more * more * rename to redefine, warn on implicit redefinition * basic documentation [skip ci] * Update compiler/lineinfos.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Better error message and tests for bad await (#19622)huantian2022-04-131-3/+13
| | | | | | | | | | | * Better error message and tests for bad await * Use compiles to check if await is valid * temp: disable windows noasync test * Better error report, simplify test Co-authored-by: flywind <xzsflywind@gmail.com>
* simplify asyncfutures, asyncmacro (#17633)Timothee Cour2021-04-141-61/+22
|
* remove un-needed {.push hint[ConvFromXtoItselfNotNeeded]: off.} in ↵Timothee Cour2021-04-031-4/+1
| | | | asyncfutures, asyncmacro (#17631)
* Fix void async in templates (#17562)Ardek Romak2021-03-301-2/+3
| | | | | | | | * Fix https://github.com/nim-lang/Nim/issues/16159 * Add test for async in template * Shorten the expression * Even shorter Co-authored-by: Clyybber <darkmine956@gmail.com>
* remove {.compileTime.} for procs with NimNode: redundant because of ↵Timothee Cour2021-03-231-7/+6
| | | | tfTriggersCompileTime (#17463)
* use single backtick (#17115)flywind2021-02-201-5/+5
|
* styleCheck: Fix some inconsistent identifiers (#16177)ee72020-12-211-1/+1
|
* ref #5617 add lineinfo to complete (#16102)flywind2020-11-231-3/+8
|
* fix #9695 asyncmacro: tfuturevar fails when activated [backport: 1.0] (#16090)flywind2020-11-221-1/+2
| | | | | | | * fix asyncmacro * Apply suggestions from code review * Update lib/pure/asyncmacro.nim
* fixes #15804 (#15820)Andreas Rumpf2020-11-021-12/+9
| | | | | | | | | * fixes #15804 * fix the existing test * add the testcase for #15804 Co-authored-by: narimiran <narimiran@disroot.org>
* async: removed the 'unown' references, async never worked with --newruntime ↵Andreas Rumpf2020-09-201-6/+5
| | | | anyway and --newruntime is dead (#15374)
* fix #14846; add macros.extractDocCommentsAndRunnables (#14849)Timothee Cour2020-07-011-3/+3
| | | | | | | | | * fix #14846; add macros.extractDocCommentsAndRunnables * fixup * update tests * address comment
* fix #13899 defer now works with async (#14723)Timothee Cour2020-06-191-0/+3
|
* Disable unused warnings for error await template too (#14531)Danil Yarantsev2020-06-011-1/+1
|
* Disable unused warnings for await in async macro (#14517)Danil Yarantsev2020-05-311-2/+2
| | | | | * Disable unused warnings for await in async macro * Remove used for the error template
* discardable async procs are now an error (#14176)hlaaftana2020-05-011-8/+14
| | | | * add discard warning in manual
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-281-2/+2
| | | | | | | | | | | | | | * Error -> Defect for defects The distinction between Error and Defect is subjective, context-dependent and somewhat arbitrary, so when looking at an exception, it's hard to guess what it is - this happens often when looking at a `raises` list _without_ opening the corresponding definition and digging through layers of inheritance. With the help of a little consistency in naming, it's at least possible to start disentangling the two error types and the standard lib can set a good example here.
* Make await a template (#12085)Alexander Ivanov2020-04-251-132/+30
| | | | | * Make await a template * Generate await inside async/multisync
* Fix #13889 with testcase (#13896) [backport]Clyybber2020-04-061-1/+1
| | | | | | | | | * Fix https://github.com/nim-lang/Nim/issues/13889 * Add testcase * Reduce test time Co-authored-by: Elie Zedeck RANDRIAMIANDRIRAY <elie.zedeck@gmail.com>
* macros for proc types, macros for types (#13778)Andreas Rumpf2020-03-311-0/+6
| | | | | | | | | * new minor feature: macros for proc types, to be documented * Finished the implementation and added tests * [skip ci] Describe the new custom pragmas in the manual and the changelog Co-authored-by: Zahary Karadjov <zahary@gmail.com>
* fixes #13519Araq2020-03-111-1/+1
|
* [backport] run nimpretty on asyncnarimiran2019-09-301-9/+11
|
* async macro: general stability improvements [bugfix] (#11787)Andreas Rumpf2019-07-191-10/+13
|
* newruntime: progress to make 'async' work with --newruntimeAraq2019-07-151-7/+4
|
* make async tests green againAndreas Rumpf2019-07-111-2/+2
|
* make more parts of the stdlib compile with --styleCheck:errorAraq2019-07-101-1/+1
|
* newruntime: async progressAraq2019-07-091-2/+2
|
* asyncmacro produces 'owned' typesAraq2019-07-091-2/+2
|
* newruntime for async (#11650)Andreas Rumpf2019-07-051-1/+4
| | | | | | | * fixes overloading resolution for passing owned(Future[string]) to Future[T] * WIP: make --newruntime work with .async * memtracker: make it compile again * make Nimble compile again
* Fix header inconsistencies in documentation (#11071)Zed2019-04-231-2/+0
|
* Small change in how tuples are handled in async macroLemonBoy2019-02-041-7/+7
| | | | A small change that brings no functional change beside a flatter tree.
* Restore the docstring during the .async. transform (#10404) [backport]LemonBoy2019-01-221-0/+6
| | | Fixes #9816
* asyncmacro: add nnkSym support for getName() (#9204)alaviss2018-10-091-1/+1
| | | Fixes #9201
* Fix regression w/ templates defined in async procLemonBoy2018-10-031-1/+1
|
* Skip nested procedures in .async. macroLemonBoy2018-09-221-0/+3
| | | | Fixes #3075
* Minor fixes for asyncjs (#8894)LemonBoy2018-09-071-1/+1
| | | | | | | | | | * Minor fixes for asyncjs Mark internal procedures as used Allow .async. for more node kinds Make .async. work for nkStmtList * Fix logic error in both the async macros
* Rip out the `try` transformation in the async macro.Dominik Picheta2018-06-061-105/+6
|
* Fix some usages of typedesc in async procsZahary Karadjov2018-04-131-1/+3
| | | | | This also fixes a compilation error in modules, based only on the new async module (i.e. not importing the full asyncdispatch)
* fix deprecation warnings in asyncmacro and htmlgen (#7573)Arne Döring2018-04-121-20/+20
| | | | | | * fix deprecation warnings in asyncmacro and htmlgen * removed todo
* Merge pull request #6962 from nim-lang/fixes/6100Dominik Picheta2018-01-101-0/+6
|\ | | | | Fixes #6100.
| * Fixes #6100.Dominik Picheta2017-12-271-0/+6
| |
* | optimized friendly stack tracesAraq2017-12-281-0/+2
| |
* | Rename cb0 to asyncProcName_continue + other improvements to async tracebacks.Dominik Picheta2017-12-281-6/+7
|/
* Remove unneeded comment #6708Anatoly Galiulin2017-11-131-3/+0
|