summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* make -d:nimFpRoundtrips work consistently in vm vs rt, fix #18400, etc (#18531)Timothee Cour2021-07-206-121/+126
| | | | | | * compiler/vmhooks: add getVar to allow vmops with var params * addFloat vmops with var param * cgen now renders float32 literals in c backend using roundtrip float to string
* follow up #18517 (#18537)flywind2021-07-201-2/+3
| | | | | | | | | | | * follow up #18517 * Update lib/pure/os.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/pure/os.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* use more `.}` (#18542)flywind2021-07-203-6/+6
|
* termux ssl (#18520)Paul Roberts2021-07-202-1/+2
|
* use .} instead of } for code highlightersAraq2021-07-201-2/+2
|
* rst: add missing line/column info for some warnings (#18383)Andrey Makarov2021-07-203-83/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rst: add missing line/column info for some warnings * add workaround * use TLineInfo/FileIndex for storing file names * fix blank lines in include file (rm harmful strip) * don't use ref TLineInfo * return `hasToc` as output parameter for uniformity * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rst.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * address review - stylistic things * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * unify RST warnings/errors names * doAssert + minor name change * fix a bug caught by doAssert * apply strbasics.strip to final HTML/Latex * rm redundant filename * fix test after rebase * delete `order` from rnFootnoteRef, also display errors/warnings properly when footnote references are from different files * Update compiler/lineinfos.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rstast.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rstast.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rstast.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * revert because of error: Error: cannot prove that it's safe to initialize 'info' with the runtime value for the discriminator 'kind' * Update lib/packages/docutils/rstgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * apply suggestion * Update lib/packages/docutils/rst.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * add Table for string->file name mapping * do not import compiler/lineinfos * fix ambiguous calls Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: narimiran <narimiran@disroot.org>
* [std/os]document `checkDir` and use `runnableExamples` (#18517)flywind2021-07-191-22/+16
| | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* Revert #17321 (#18521)konsumlamm2021-07-191-135/+135
| | | Use better names in example
* fixed system.delete (#18507)Andreas Rumpf2021-07-181-7/+10
|
* deprecate strutils.delete and add an overload with saner semantics ↵Timothee Cour2021-07-181-7/+33
| | | | consistent with sequtils.delete; follows #18487 (#18510)
* add NIM_STATIC_ASSERT(CHAR_BIT == 8, "") to fail-fast where assumption is ↵Timothee Cour2021-07-181-0/+3
| | | | violated (#18512)
* Revert #17398 and #17402 (#18480)Miran2021-07-181-25/+15
| | | | | | | | | | | * Revert "followup #17398: `getTempDir`, `getConfigDir` now do not have trailing DirSep (#17402)" This reverts commit 2356d0603f70cad90f76fa57999054bf5c0a9157. * Revert "fix #17393 getHomeDir and expandTilde should not include trailing `/` (#17398)" This reverts commit bebf2ce24a43bef4cde5c90c4010631a1e4a7927. * fix test
* fix nativeToUnixPath (#18501)Timothee Cour2021-07-171-3/+8
|
* make dragonbox opt-in via -d:nimFpRoundtrips (#18504)Andreas Rumpf2021-07-162-2/+2
| | | | | | | * make dragonbox opt-in via -d:nimFpRoundtrips * make tests green again * make tests green again
* deprecate cuchar, don't redefine it (#18505)Andreas Rumpf2021-07-169-49/+49
|
* Add changes required by Nimble lock file support (#12104)Ivan Bobev2021-07-151-0/+4
| | | | | | | | | | | | | | | | Implemented support for Nimble local cache with package directories with a checksum of the package at the end of their names. Now the compiler supports package paths in the form: * /path_to_nimble_cache_dir/pkgs/package_name-1.2.3- FEBADEAEA2345E777F0F6F8433F7F0A52EDD5D1B * /path_to_nimble_cache_dir/pkgs/package_name-#head- 042D4BE2B90ED0672E717D71850ABDB0A2D19CD2 * /path_to_nimble_cache_dir/pkgs/package_name-#branch-name- DBC1F902CB79946E990E38AF51F0BAD36ACFABD9 Related to nim-lang/nimble#127
* deprecate `sequtils.delete` and add an overload with saner semantics ↵Timothee Cour2021-07-151-3/+42
| | | | | | | | consistent with `system.delete` (#18487) * deprecate sequtils.delete and add an overload with saner semantics * AssertionDefect => IndexDefect * improve tsequtils * add tests; use splice in js for optimization
* added `nimAllocPagesViaMalloc` switch (#18490)Andreas Rumpf2021-07-152-5/+29
| | | | | * added switch * alloc.nim needs page aligned memory blocks
* workaround #18481 (#18482)flywind2021-07-131-18/+20
|
* fix comment (#18473)sivchari2021-07-111-6/+6
|
* sync with the same template from locks module (#18414)Antonis Geralis2021-07-101-1/+1
|
* ORC: support for custom =trace procs (#18459)Andreas Rumpf2021-07-091-0/+5
| | | | | | | | | | | * ORC: support custom =trace procs (WIP) * Update tests/arc/tcustomtrace.nim Co-authored-by: Clyybber <darkmine956@gmail.com> * =trace is now documented and seems to work * make test green Co-authored-by: Clyybber <darkmine956@gmail.com>
* [docs] improve std/encodings (#18458)flywind2021-07-091-12/+41
| | | | | | | | | | | | | | | | | | | | * [docs] improve std/encodings * tiny * shrink * Apply suggestions from code review Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Apply suggestions from code review * Update lib/pure/encodings.nim Co-authored-by: Varriount <Varriount@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Varriount <Varriount@users.noreply.github.com>
* Fix a bug with starting of asynchronous processes (#18464)Ivan Bobev2021-07-081-1/+1
| | | | | | | The asynchronous process completion handler callback should be called only once. This is achieved by passing `WT_EXECUTEONLYONCE` flag to the `registerWaitForSingleObject` Windows API procedure. Related to cheatfate/asynctools#35
* rm redundant blank lines before literal blocks (#18465)Andrey Makarov2021-07-082-2/+2
|
* Revert "Make 'echo' raise IOErrors when appropriate (#16367)" (#18460)Miran2021-07-081-16/+8
| | | This reverts commit 23d23ecb081be6702d74024be8f96d92d9f88a59.
* improve rendering of newOSError.additionalInfo (#18443)Timothee Cour2021-07-072-3/+6
| | | | | * improve rendering of newOSError.additionalInfo * fixup
* ORC: use =destroy instead of =dispose (#18440)Andreas Rumpf2021-07-074-33/+37
| | | | | | * ORC refactoring in preparation for further changes (=dispose must die) * ORC: embrace =destroy, avoid =dispose * ORC: no need for =dispose * closes #18421
* major improvements to `std/wrapnils`: optimal codegen, case objects, lvalue ↵Timothee Cour2021-07-071-51/+134
| | | | | | | semantics (#18435) * wrapnils now generates optimal code; also handles case objects * changelog * unsafeAddr => addr
* fix shebangs #! /xxx => #!/xxx (#18444)Timothee Cour2021-07-071-1/+1
|
* Cleanup interval and timeout procs (#18431)Antonis Geralis2021-07-051-8/+10
| | | clear/setTimeout procs were using ref ref Timeout. Added more interval overloads. Corrections.
* deprecate std/mersenne (#18395)pyautogui2021-07-051-8/+4
| | | | | Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #18411 (#18432) [backport:1.4]Andreas Rumpf2021-07-051-3/+1
|
* std/net: show addr+port on address already in use error; code-block => ↵Timothee Cour2021-07-051-43/+37
| | | | | | | runnableExamples (#18428) * std/net: show addr+port on address already in use error; code-block => runnableExamples * var=>let
* Add lent annotation to avoid extra copies in sample (#18404)Antonis Geralis2021-07-021-1/+1
| | | | | | | * Add lent annotation to avoid extra copies in sample * Remove lent * Update random.nim
* don't use `{.rtl.}` for generics, otherwise `-d:useNimRtl` gives `ambiguous ↵Timothee Cour2021-07-012-7/+8
| | | | identifier` nimrtl error (#18406)
* Missing spaces when compiling testament and nim_dbg. (#18403)Endeg2021-06-301-2/+2
|
* fixes #18400 (#18402)Andreas Rumpf2021-06-301-1/+1
|
* remove isKeywordIgnoreCase from highlite, not used , can't even compile with ↵Bung2021-06-301-3/+0
| | | | -d:useNimRtl (#18399)
* Add commas to docs for clarity (#18398)Elliot Waite2021-06-291-2/+2
|
* typo: enmRange => enumElementsAsSet (#18394)Timothee Cour2021-06-291-2/+2
|
* simplify rdstdin (#18382)Timothee Cour2021-06-281-10/+4
|
* Fix unused warning for $ on empty object (#18381)Clyybber2021-06-281-1/+1
|
* Simplify addInt, remove digits10 (#18356)Clyybber2021-06-283-45/+27
| | | | | | | | | | | | | * Simplify addInt, remove digits10 Co-authored-by: Charles Blake <charlechaud@gmail.com> * Fix bootstrapping * Add noInit to tmp array * noInit -> noinit Co-authored-by: Charles Blake <charlechaud@gmail.com>
* Peg captures get stack-like behavior (#18369)gemath2021-06-281-31/+59
| | | | | * Implements reverse capture indexing. * Now works for modified backrefs too. * Changed reverse indexing syntax prefix for back-references to '$^'.
* rst: fix bug 20 from #17340 (#18360)Andrey Makarov2021-06-261-1/+3
| | | and a leftover bug: priority of option list inside definition list
* even lighter version of #17938: fix most issues with UnusedImport, ↵Timothee Cour2021-06-261-29/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XDeclaredButNotUsed, etc; fix #17511, #17510, #14246 (without realModule) (#18362) * {.used: symbol} * add tests * fix tests with --import * --import works without giving spurious unused warnings * new warning warnDuplicateModuleImport for `import foo; import foo` * fix test, add resolveModuleAlias, use proper line info for module aliases * fix spurious warnings * fix deprecation msg for deprecated modules even with `import foo as bar` * disable a test for i386 pending sorting XDeclaredButNotUsed errors * UnusedImport now works with re-exported symbols * fix typo [skip ci] * ic support * add genPNode to allow writing PNode-based compiler code similarly to `genAst` * fix DuplicateModuleImport warning * adjust test * fixup * fixup * fixup * fix after rebase * fix for IC * keep the proc inline, move the const out * [skip ci] fix changelog * experiment: remove calls to resolveModuleAlias * followup * fixup * fix tests/modules/tselfimport.nim * workaround tests/deprecated/tmodule1.nim * fix properly * simplify
* Add sink annotation to option some() (#18358)tomc19982021-06-251-2/+2
|
* docs now show nimExperimentalX APIs (#18345)Timothee Cour2021-06-252-7/+7
| | | | | * docs now show nimExperimentalX APIs * fix for windows
* couple tiny typo fixes (#18344)Smooth Operator2021-06-241-2/+2
|