summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* hashes for refs should be an opt-in feature (#18098)Miran2021-05-301-1/+1
|
* close #16569: deprecated `reversed(a, start, last)` overload, use ↵Timothee Cour2021-05-301-30/+11
| | | | | | | | | toOpenArray instead (#18047) * close #16569: deprecated reversed overload, use toOpenArray instead * [skip ci] change wording in changelog per review * fixup
* Move async example to asynchronous version of proc (#18078)xioren2021-05-241-7/+14
| | | | | | | | | | * improve runnableExamples in std/httpclient * Add synchronous example. * Update lib/pure/httpclient.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* close #18009 parseJson JInt vs JFloat; preserve -0.0 as JFloat to ↵Timothee Cour2021-05-231-1/+1
| | | | distinguish from 0.0 (#18067)
* docs: make inline markup more compatible with Markdown (#18053)Andrey Makarov2021-05-213-50/+99
| | | fixes https://github.com/timotheecour/Nim/issues/739
* asyncdispatch+stackTraceOverride: fix premature collection (#18039) ↵Ștefan Talpalaru2021-05-192-15/+33
| | | | | | | | | | | | | | | | | | | | | | [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.
* make strformat part of the prelude (#18046)Andreas Rumpf2021-05-191-1/+1
|
* ARC: fixes memory leaks with newSeq used in a loop [backport:1.4] (#18040)Andreas Rumpf2021-05-181-0/+4
| | | | * ARC: fixes memory leaks with newSeq used in a loop [backport:1.4] * Update tests/arc/tnewseq_legacy.nim
* jsonutils: add customization for toJson via `ToJsonOptions`; generalize ↵Timothee Cour2021-05-182-13/+95
| | | | | | | | | | | | | | | | | | | symbolName; add symbolRank (#18029) * jsonutils: add customization for toJson via `ToJsonOptions` * add enumutils.symbolRank * lookup table implementation for HoleyEnum * cleanup * changelog * fixup * Update lib/std/jsonutils.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* add sink and lent annotations for xmltree and streams (#18037)Antonis Geralis2021-05-182-16/+16
|
* Add `checked` to dom (#18033)Joey2021-05-171-0/+3
| | | This allows the ability to set a checkbox as checked programmatically. It's different from `setAttribute` because once an input has been clicked on by the user, `setAttribute` no longer works programmatically.
* follow-up #17930 - inline syntax highlighting (#18013)Andrey Makarov2021-05-161-11/+14
| | | | | * follow-up #17930 - inline syntax highlighting * make closure->nimcall
* fix #18007: std/json now serializes nan,inf,-inf as strings instead of ↵Timothee Cour2021-05-162-50/+74
| | | | | | | | | | | | | | | | | invalid json (#18026) * fix #18007: std/json now serializes nan,inf,-inf as raw strings instead of invalid json * fix roundtrip * fix tests * fix changelog * simplify * add runnableExamples * fix typo [skip ci]
* Revert "[std/re]fix terrible and strange interface" (#18027)flywind2021-05-161-6/+6
| | | This reverts commit c218f2ba0b8e27110087ea754c11cff123806a94.
* [std/re]fix terrible and strange interfaceflywind2021-05-161-6/+6
|
* Escape `%00` / `\0` in `dbQuote` (#18015) [backport:1.4]Thomas T. Jarløv2021-05-151-1/+3
| | | Fix https://github.com/nim-lang/Nim/issues/17925
* RST opt.list to have priority over def.list (#17845)Andrey Makarov2021-05-151-2/+2
|
* Revert "fix #14873 properly by skipping `abi` field in importc type ↵Andreas Rumpf2021-05-152-0/+13
| | | | | (#17944)" (#17992) This reverts commit 98c29c01eb91a0c6ce7da09380a272eebe6bca6f.
* refs #18011 disable some newly failing tests on cpp windows; refs #17946 ↵Timothee Cour2021-05-141-4/+4
| | | | increase timeout for tchannels (#18012)
* `doc2tex`: generate docs to Latex (#17997)Andrey Makarov2021-05-142-30/+33
| | | | | * `doc2tex`: generate docs to Latex * address some comments
* ORC: progress (#18000)Andreas Rumpf2021-05-123-10/+24
| | | | | | | | | * ORC: progress * ORC: bugfix; don't follow acyclic data even if only at runtime the subtype is marked as acyclic * progress * minor style changes
* jsonutils: handle holey enum as regular enum, via ord (#17995)Timothee Cour2021-05-111-0/+3
|
* jsonutils: support set (#17994)Timothee Cour2021-05-111-1/+5
|
* improve std/tempfiles (#17920)Timothee Cour2021-05-112-23/+52
| | | | | | | | * improve std/tempfiles * fixup * fix windows * improve test * improve runnableExamples and tests * address comment
* fix #17467 1st call to rand is now non-skewed; allow seed == 0 (#17468)Timothee Cour2021-05-111-57/+36
| | | | | | | | | | | | | | | * fix #17467 1st call to rand is now non-skewed; allow passing 0 as seed * changelog + fallback * document behavior for seed == 0 * address comments * _ * fix tests, disable kdtree * re-enable kdtree with -d:nimLegacyRandomInitRand
* Revert "Fix parseUri to sanitize urls containing ASCII newline or tab ↵Andreas Rumpf2021-05-091-29/+3
| | | | | (#17967)" (#17984) This reverts commit f4dd95f3bee14b69caec63c3be984c4a75f43c8a.
* Fix parseUri to sanitize urls containing ASCII newline or tab (#17967)Beshr Kayali2021-05-091-3/+29
| | | | | | | | | | | | | | | | | | | * Fix parseUri to sanitize urls containing ASCII newline or tab * Fix ups based on review Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Additional fix ups based on review - Avoid unnecessary `removeUnsafeBytesFromUri` call if parseUri is strict - Move some parseUri tests to uri module test file Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com> * Update changelog Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* merge `initUri()` overloads, improve uri examples (#17970)Timothee Cour2021-05-081-30/+11
| | | | | | | * deprecate `uri.initUri` and improve uri examples * remove `func initUri*()` and make isIpv6 optional * fixup
* ORC: cursor inference bugfix (#17973)Andreas Rumpf2021-05-081-2/+2
| | | | | * fixed a .cursor inference bug * added a test case
* fix #17941: UnusedImport works for var/let/const/type invoked inside a ↵Timothee Cour2021-05-083-4/+3
| | | | | | | generic (#17942) * fix #17941: UnusedImport works for var/let/const/type invoked inside a generic * fixup
* fix #14873 properly by skipping `abi` field in importc type (#17944)Timothee Cour2021-05-072-13/+0
| | | | | | | * fix #14873 properly by skipping `abi` field in importc type * add test * fix test for windows
* remove unsused OsPlatform.nimVM (#17953)Timothee Cour2021-05-071-2/+1
|
* Export sslHandle in `net` and `asyncnet`. (#17573)Ardek Romak2021-05-062-0/+10
|
* Fix C++ compilation error in excpt.nim (#17951)Danil Yarantsev2021-05-061-1/+1
|
* minor cleanups (#17948)Andreas Rumpf2021-05-061-1/+1
|
* follow-up #17837: add `Console` for interactive sessions (#17930)Andrey Makarov2021-05-062-14/+33
| | | | | * follow-up #17837: add `Console` for interactive sessions * fix Latex
* Add copyWithin for JavaScript (#17937)Juan Carlos2021-05-051-0/+13
| | | | * Add jscore.copyWithin for seq and array * Shallow copy mention docs
* parsecsv fix style (#17933)Juan Carlos2021-05-041-67/+64
| | | | | | | * ReSync with Devel * Fix style in parsecsv * Update lib/pure/parsecsv.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* highlite: fix #17890 - tokenize Nim escape seq-s (#17919)Andrey Makarov2021-05-031-19/+33
| | | | | | | | | * highlite: fix #17890 - tokenize Nim escape seq-s * Update tests/stdlib/thighlite.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* typo: nonexistant => nonexistent (#17918)Timothee Cour2021-05-022-2/+2
| | | | | * typo: nonexistant => nonexistent * fix test (ordering differs because of https://github.com/nim-lang/Nim/issues/17910)
* fix #17911 rawProc for cpp (#17912)Timothee Cour2021-05-012-10/+21
|
* system.nim cleanup some exported constants which should never have be… ↵Andreas Rumpf2021-05-017-24/+28
| | | | | | (#17909) * system.nim cleanup some exported constants which should never have been exported
* WIP: Added missing functions to jsre module (#17881)Yanis Zafirópulos2021-05-011-0/+30
| | | | | | | * added missing functions: `replace`, `replaceAll`, `split`, `match` * added `startsWith` & `endsWith` * Update lib/js/jsre.nim Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
* [std/base64] uses runnableExamples (#17882)flywind2021-05-011-32/+30
| | | | | | * [std/base64] uses runnableExamples * Update lib/pure/base64.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* misc fixes: remove `forceConst` (obsolete by static), add more ↵Timothee Cour2021-05-012-45/+41
| | | | | | | | | | | | | runnableExamples to system (#17896) * misc fixes * add runnableExamples for compileOption * add runnableExamples for runnableExamples * move tconsteval => tconst * cleanup
* Fix nim-lang/nimforum#285 - punctuation after URL (#17908)Andrey Makarov2021-05-011-11/+17
| | | | | * Fix nim-lang/nimforum#285 - punctuation after URL * keep only one leaf in a rnStandaloneHyperlink * add more complex URL
* Document the difference between toFloat/toInt and type conversion (#17894)Gabriel Huber2021-04-301-2/+3
|
* fix #17905: hash(closure) was not being tested (#17906)Timothee Cour2021-04-301-12/+20
|
* close #16646; `since` now works with bootstrap nim post csources_v1 (#17895)Timothee Cour2021-04-301-3/+2
| | | | | | | * revive #16627 now that csources_v1 was merged * use dedent in rst.nim, refs https://github.com/nim-lang/Nim/pull/17257#discussion_r589025683 * fix test and improve rendering of a rst warning
* gitutils: add diffStrings, diffFiles, and use it in testament to compare ↵Timothee Cour2021-04-303-45/+88
| | | | | | | | | | | | | expected vs gotten (#17892) * gitutils: add diffStrings, diffFiles, and use it in testament to compare expected vs gotten * refactor with createTempDir * cleanup * refacotr * PRTEMP fake test spec changes to show effect of diffStrings * add runnableExamples for experimental/diff + cross-reference with gitutils * Revert "PRTEMP fake test spec changes to show effect of diffStrings" This reverts commit 57dc8d642dce6c1127c98b7cbc9edbfe747d4047.