summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Document that proc named fooTask is created for every foo task [backport] ↵Kaushal Modi2020-05-021-0/+15
| | | | | (#14187) Ref: https://irclogs.nim-lang.org/01-05-2020.html#15:18:03
* change 'iff' to 'if' to stop "corrections" once and for all (#14182)Miran2020-05-0112-37/+37
|
* discardable async procs are now an error (#14176)hlaaftana2020-05-011-8/+14
| | | | * add discard warning in manual
* fix sendTo and recvFrom in asyncnet (#14154)rockcavera2020-04-301-76/+40
| | | | | | | | | | | | | * added high level sendTo and recvFrom to std/asyncnet; tests were also added. * add .since annotation, a changelog entry and fixed to standard library style guide. * Improved asserts msgs and added notes for use with UDP sockets * pointers removed in parameters and fixes * added .since annotation * minor fixes
* fixes #13698 [backport:1.2] (#14175)Andreas Rumpf2020-04-301-2/+2
|
* fixes the regression #12860 caused; hotfixAraq2020-04-302-1/+4
|
* JS unittest stacktrace fix, cleanup js repr and inclrtl includes (#14168)hlaaftana2020-04-304-46/+21
|
* fixes #14054 [backport:1.2] (#14061)Andreas Rumpf2020-04-302-7/+4
| | | | | | | | | * fixes #14054 * make tests green again * more tests are green * maybe now
* fixes #14079 [backport:1.2] (#14163)Andreas Rumpf2020-04-291-1/+1
|
* many bugfixes for js (#14158)hlaaftana2020-04-292-23/+16
| | | | | | | | | | | | | * many bugfixes for js fixes #12672, fixes #14153, closes #14123, closes #11331, fixes #11783, fixes #13966, fixes #14087, fixes #14117, closes #12256. mostly fixes the fact that it was allowed to assign to newly created temp variables. additionally attempts to get rid of null initialized seqs/strings (though they might pop up here and there); this simplifies a lot of things and makes code size smaller. even if null seqs/strings pop up here and there it's still better than all those bugs existing. * formatting fixes * CI fixes * more CI fixes
* parseEnum_regression (#14150)cooldome2020-04-281-1/+1
| | | Co-authored-by: cooldome <ariabushenko@bk.ru>
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-2833-155/+178
| | | | | | | | | | | | | | * 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.
* StringStream & more stdlib modules support for JS/NimScript (#14095)hlaaftana2020-04-2810-291/+429
| | | | | * StringStream & more stdlib modules support for JS/NimScript * change back pegs test in line with #14134
* bug fix (#14149) [backport:1.2]cooldome2020-04-281-1/+4
| | | Co-authored-by: cooldome <ariabushenko@bk.ru>
* Add RSA key reading and encrypt/decrypt to openssl (#14137)PMunch2020-04-271-0/+23
| | | | This adds the procedures to read RSA keys and encrypt/decrypt messages with both public and private keys.
* Undefine `paramCount` & `paramStr` in nimscript.nim for *.nims (#12860)Neelesh Chandola2020-04-272-9/+17
| | | | | | | * Remove `paramStr` and `paramCount` from implicitly imported nimscript.nim * Update changelog.md * Update stable nimble commit hash Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* `$` now works for unsigned intergers with `nim js` (#14122)Timothee Cour2020-04-272-4/+22
| | | | * $(unsigned) now works for js * move NimMajor+friends closer to NimVersion according as per reviewer feedback
* `$(a: float)` now works consistently in nim js, avoiding printing floats as ↵Timothee Cour2020-04-271-0/+15
| | | | | | | | | ints (#14134) * fix https://github.com/timotheecour/Nim/issues/133; $(a: float) works in nim js like in other backends * fix tests * fix test for windows that prints 1.1e17 differently than other OS
* Remove some deprecated procs from std/times (#14129)Oscar Nihlgård2020-04-271-143/+31
|
* new implementations for --gc:orc (#14121)Andreas Rumpf2020-04-276-19/+418
| | | | | | | | | * cycle collector: new implementation * cycle collector: make self-adaptive based on its previous effectiveness * cycle collector: added Lins's jump stack to improve traversal from 3*N to 2*N * cycle collector: make tests green * API extensions and bugfixes * code cleanup and use --gc:orc for tasyncawait
* add FileReader Web API to js dom (#14105)cooldome2020-04-271-9/+59
| | | | | * add FileReader to js dom * minor improvement Co-authored-by: cooldome <ariabushenko@bk.ru>
* since now takes an optional patch, eg: `since: (1, 3, 1)` (#14124)Timothee Cour2020-04-262-3/+19
| | | add tests for tinclrtl
* added high level sendTo and recvFrom to std/asyncnet (UDP functionality) ↵rockcavera2020-04-261-0/+127
| | | | | | | | | (#14109) * added high level sendTo and recvFrom to std/asyncnet; tests were also added. * add .since annotation, a changelog entry and fixed to standard library style guide. * Improved asserts msgs and added notes for use with UDP sockets
* small docs fix in typetraits (#14108)hlaaftana2020-04-251-1/+1
|
* Make await a template (#12085)Alexander Ivanov2020-04-251-132/+30
| | | | | * Make await a template * Generate await inside async/multisync
* Faster readStr() (#14099)Christopher Dunn2020-04-251-6/+22
| | | | | | | | | * Faster readStr() * https://github.com/nim-lang/Nim/issues/13857 * Add .since annotation and add to changelog * Private, un-sinced proc for csource bootstrapping
* Fixes #14110 (#14111)Jae Yang2020-04-251-1/+1
| | | Fixes jsffi usage example in doc
* Add critbits.commonPrefixLen (#14072)Phil Krylov2020-04-241-0/+16
| | | | | | | * Add critbits.commonPrefixLen * add inline and since annotations, as well as a changelog entry Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* changed type() to typeof() in docs and error messages (#14084)hlaaftana2020-04-243-5/+5
|
* CT sizeof(+friends) for {.importc, completeStruct.} types, enable ABI static ↵Timothee Cour2020-04-231-4/+0
| | | | | | | | | | | checks (#13926) * -d:checkabi obsolete (ABI check now enforced); add `addTypeHeader` helper * cleanups * import sizeof at CT for {.completeType.} * address comments; revert default enabling of -d:checkAbi for now * mimportc_size_check.nim => msizeof5.nim; merge mabi_check.nim into msizeof5.nim; refactor * all pragmas in errmsgs should be written: '.importc' (un-ambiguous and less verbose than {.importc.})
* Set O_NONBLOCK flag atomically (#13934)Hiroki Noda2020-04-221-8/+4
| | | | These flags were added in Linux 2.6.27, I'm not sure Nim's minimal support Linux version.
* fix #14064 xmltree should allow create text node with raw text(non-es… ↵Bung2020-04-221-1/+11
| | | | | | | | | | | | | (#14070) * fix #14064 xmltree should allow create text node with raw text(non-escaped) eg. html style element's text * change xnRawText to VerbatimText,newRawText to newVerbatimText ,add since anotation * change changelog_1_2_0.md latest date * move change log Co-authored-by: bung87 <crc32@qq.com>
* Make debugSend/debugRecv procs public. Fixes #12189 (#12190)Chris Heller2020-04-221-3/+37
| | | | | | | * Make debugSend/debugRecv procs public. Fixes #12189 * Make checkReply proc public. Part of #12189 * Add doc comments for debugSend,debugRecv and checkReply
* Add the ability to pass title case headers to an HTTP server (#13968)wonderix2020-04-221-12/+38
| | | | | | | | | * Add the ability to pass title case headers to an HTTP server * Remove unnecessary type spec of titleCase * Replace convert member proc by isTitleCase Co-authored-by: wonderix <wonderix@googlemail.com>
* cycle collector (#14071)Andreas Rumpf2020-04-223-106/+74
| | | | * figured out the wrong cycle trace proc problem * cycle collector/break refactorings and minor improvements
* change some Exceptions to CatchableError or Defect, fixes #10288 (#14069)hlaaftana2020-04-224-5/+5
|
* base `parseEnum` on a case statement, fixes #14030 (#14046)Vindaar2020-04-222-11/+84
| | | | | | | | | | | | | | | | | | | | * base `parseEnum` on a case statement, fixes #14030 * apply simplifactions / clean up, remove `norm` node, use strVal * export `normalize` in json.nim * cmp using nimIdentNormalize, error at CT if ambiguous enum found `nimIdentNormalize` provided by @cooldome. We track all names of the branches we have created so far and error if a duplicate is found. Dummy change to make github react... * fix docstring of `nimIdentNormalize` * make `typ` arg `typedesc`, add lineinfo, call norm. only once
* Treat zig like clang/gcc wrt integer arithmetic. (#13957)Hessam Mehr2020-04-221-1/+1
|
* Fix OS detection in a docker container (#13172)Arnaud Moura2020-04-221-32/+46
| | | | | | | * Support detection in docker container. * Get only ID information in os-release. * Add test to distros module. * Fix Linux OS detection in Windows. * Fix OS detection for FreeBSD and OpenBSD.
* fix #13222: make relativePath more robust and flexible (#13451)Timothee Cour2020-04-211-68/+90
| | | | | | | | | * * relativePath(foo) now works * relativePath(rel, abs) and relativePath(abs, rel) now work (fixes #13222) * relativePath, absolutePath, getCurrentDir now available in more targets (eg: vm, nodejs etc) * fix bug: isAbsolutePath now works with -d:js; add tests * workaround https://github.com/nim-lang/Nim/issues/13469 * remove `relativePath(path)` overload for now * add back changelog after rebase
* Add deques.peekFirst/Last(var Deque[T]) -> var T (#13542)hlaaftana2020-04-211-0/+41
| | | | | | | * Add deques.peekFirst/Last(var Deque[T]) -> var T * Add changelog entry for deques.peekFirst/Last var T overloads * Add since annotation to peekFirst/peekLast Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Add package install command for FreeBSD and OpenBSD. (#14051)Arnaud Moura2020-04-211-1/+3
|
* Times refactorings (#13949)Oscar Nihlgård2020-04-211-753/+778
|
* #12103 - CI for OpenBSD (#12105)Euan2020-04-212-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Working on OpenBSD CI * Condense steps into 2 steps to make output easier to follow. * Move up one directory after csources build. * Remove FreeBSD build manifest and add OpenBSD test ignores for coroutines and hot code reloading. * If runCI fails, run the test results script. * Add email trigger for build failure * Remove .git from repository URL * Disable SFML test on OpenBSD * Disable tgetaddrinfo on OpenBSD as only UDP and TCP protocols are supported. * Remove getFilePermissions as it causes CI test failures with NimScript. * Set clang as cc in nim.cfg and use gmake to build csources. * Add getCurrentDir to nimscript. * Remove duplicate getCurrentDir and check for not weirdTarget. * Add CI badge for OpenBSD. * Disable tests which allocate lots of memory for OpenBSD. * Use `CORO_BACKEND_SETJMP` on OpenBSD rather than ucontext. * Simplify building of koch * Disable t8657 on OpenBSD. See issue #13760. * Fix #12142 - tarray_of_channels fails on OpenBSD * Disable thhtpclient_ssl and tosprocterminate on OpenBSD. These tests can be enabled at a later date after fixing them. * Install libffi. * Set path to libc for openbsd. * Disable tevalffi for now. * Remove tevalffi.nim. * Use ncpuonline sysctl rather than ncpu. * Disable tacceptcloserace and tasynchttpserver on OpenBSD. * Enable tacceptcloserace and tasynchttpserver. * Fix #13775 as suggested by @alaviss - use /bin/cat on OpenBSD rather than /bin/sh. * Enable test on OpenBSD. * Disable tflowvar on OpenBSD.
* Fix the getSelection method. (#13632)treeform2020-04-211-1/+8
|
* fix mapIt issues #12625 & #12639 (#14041)Judd2020-04-211-14/+36
| | | | | | | | | | | | * fix mapIt issues #12625 & #12639: 1. fallback to call `map` when the result of `op` is a closure; 2. use `items(s)` in the for loop. * fix test errors. * add comments and InType is moved. * fix ident.
* New runnableExample for `newAsyncHttpClient()` (#14045)Tristram Oaten2020-04-211-0/+11
|
* asyncdispatch: export Callback (#14042) [backport]alaviss2020-04-211-2/+2
| | | | | | This let us see the definition of `Callback` in docs, which is required to even make use of asyncdispatch. Ref #13539.
* Fix broken async httpclient exampleTristram Oaten2020-04-211-3/+7
| | | | | | | | | | | | | | | | | As the async httpclient is almost certainly the first async example beginners will want to try, we OWE it to them to give them a real example. Example repeated here for clarity: ```nim import asyncdispatch, httpclient proc asyncProc(): Future[string] {.async.} = var client = newAsyncHttpClient() return await client.getContent("http://example.com") echo waitFor asyncProc() ``` This is my first Nim contribution, please let me know if the code is right. (it runs on my machine, but may not be the best example)
* fixes #14038Andreas Rumpf2020-04-201-1/+1
|