summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix type mismatch with future logging (#19131)Jake Leahy2021-11-121-1/+1
|
* fixed colorNames sorting mistake (#19125) [backport]orthoplex2021-11-111-1/+1
|
* refactoring: orc can use getThreadId() (#19123)Andreas Rumpf2021-11-114-96/+110
| | | | | * refactoring: orc can use getThreadId() * progress
* correct cookie docs (#19122)flywind2021-11-111-2/+1
|
* Add security tip for setCookie (#19117)Federico Ceratto2021-11-111-0/+3
| | | | | | | | | | | | | | | * Add security tip for setCookie * Update lib/pure/cookies.nim Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com> * Update lib/pure/cookies.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* fix nimindexterm in rst2tex/doc2tex [backport] (#19106)Andrey Makarov2021-11-091-1/+1
| | | | | * fix nimindexterm (rst2tex/doc2tex) [backport] * Add support for indexing in rst
* Deprecate `std/sharedlist` and `std/sharedtables` (#19112)konsumlamm2021-11-094-2/+4
|
* Add deprecation pragmas in lib/deprecated/pure (#19113)konsumlamm2021-11-095-7/+13
|
* change os.nim doc links to new style (#19102)Andrey Makarov2021-11-085-321/+325
|
* Remove invalid statements about try in async docs. (#19108)Dominik Picheta2021-11-081-13/+13
|
* fixes another effect inference bug [backport:1.6] (#19100)Andreas Rumpf2021-11-074-11/+18
| | | | * fixes another effect inference bug [backport:1.6]
* fix for #19020, credit to @ElegantBeef (#19021)Don-Duong Quach2021-11-031-1/+1
|
* Added support for sending "ehlo" and receiving multiline "ehlo" response. ↵David Krause2021-11-031-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (#19077) * Added support for sending "ehlo" and receiving multiline "ehlo" response. Signed-off-by: David Krause <enthus1ast@users.noreply.github.com> * fix typo Signed-off-by: David Krause <enthus1ast@users.noreply.github.com> * send "EHLO" first, if not supported, send "HELO" to smtp server. Signed-off-by: David Krause <enthus1ast@users.noreply.github.com> * fix english Signed-off-by: David Krause <enthus1ast@users.noreply.github.com> * add changelog entry for smtp `ehlo` Signed-off-by: David Krause <enthus1ast@users.noreply.github.com> * recvEhlo must not be exported Signed-off-by: David Krause <enthus1ast@users.noreply.github.com>
* fixes #19078 [backport] (#19090)Andreas Rumpf2021-11-021-3/+6
|
* libs/impore/re: Add note about the requirement of `matches` to be ↵Kaushal Modi2021-11-021-0/+34
| | | | | | | pre-allocated (#19081) Add few runnableExamples for `findBounds` for clarity. Fixes https://github.com/nim-lang/Nim/issues/18775
* fixes #19000 (#19032)Andreas Rumpf2021-10-301-0/+6
| | | | | * fixes #19000 * progress
* Freeing critical sections via atexit in system/alloc and system/io (#19062)Tail Wag Games2021-10-293-7/+7
| | | | | | | | | | | | | | | * adding new system module sysexitprocs and including system exit procedures when registering exit handlers defined in userland * fixing failing tests and adding initialization guard to handle cases where the module's global init logic isn't invoked first as is the case with some gc implementaions * js backend shouldn't try to invoke actual system exit procs * fixing formatting in sysexitprocs.nim * 256 was too much - my max number of plugins in my engine is 64 and I require two hooks per runtime it looks like with tls emulation turned off, so for my purposes 128 should be sufficient * so atExit should be enough here, can get rid of all the extra cruft I had added on top since I didn't realize atExit already provided a stack * done being cute - since newruntime prevents correct cpp codegen for object variants apparently and breaks tests if I try to use std/exitprocs, ddSysExitProc is just going into both modules. Since system doesn't include system/io, polluting system with it doesn't make sense either... at least it is only importc'd when it is required in either module and we don't have to have any weird when defined(nimOwnedEnabled) with a comment explaining why
* Fix nimIdentNormalize, fixes #19067 (#19068)Tomasz Kramkowski2021-10-291-2/+3
| | | | | | | * Make nimIdentNormalize return "" when passed ""; fixes #19067 Fixes #19067 * Add tests for nimIdentNormalize
* docgen: implement doc link resolution in current module (#18642)Andrey Makarov2021-10-285-78/+545
|
* Minor update to terminal docs (#19056)Netsu2021-10-261-0/+14
| | | | | | | | | | | | | | | | | | | | | * Update terminal.nim - Added some extra docs to cursorUp/Down/Forward/Backward - I was able to use hideCursor and showCursor without adding stdout, removed the parameter - Added docs to terminalHeight()* and terminalWidth()* * Update lib/pure/terminal.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update lib/pure/terminal.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Added back f: file to cursor movement * Removed unnecessary comments Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Fix #19052; [backport:1.6.0] (#19053)Timothy Alexander2021-10-261-1/+6
| | | | | | | | | | | | | | | | | * Fix #19052; [backport:1.6.0] Adds a compile flag to avoid a getrandom syscall, fixing #19052. This is neccesary when the getrandom syscall is missing, as noted in #19052, particularly in kernel versions < 3.17 when getrandom was introduced. Specifically relevant is this is missing from kernel 3.10, which is the supported kernel throughout RHEL 7 and CentOS 7, which is widely used at many organizations. Without this, versions of nim that include sysrand (i.e. versions >= 1.6.0) will not compile without modification, however with this change a compile flag may be used to fall back using /dev/urandom as done with any unknown Posix OS (preferred here as a fallback since it already supplies a cryptographically secure PRNG and existing code deals with entropy pool init, etc). The change is placed behind a compile flag, as discussed in github ticket #19052 (summed up here): * First, I can't seem to catch that a importc such as SYS_getrandom is declared without using it (the declared proc returns true, but compiler throws an undeclared identifier flag when referencing it). * Second, it seemed preferable to be behaviorally explicit vs implicit when considering this is intended to be a cryptographically secure PRNG. * Third, if I intend to compile on a kernel >= 3.17 while running the binary on at least one system < 3.17, I'll want to be able to target this without relying on a compile time determination if the getrandom syscall is available. * Documenting compile flag for -d:nimNoGetRandom and adding changelog entry Related to #19052 and comments in PR #19053. Also created a new changelog file since none currently exists. Co-authored-by: Timothy Alexander <talexander@midwestlabs.com>
* deinitializing locks at program exit (#19043)Tail Wag Games2021-10-252-24/+35
| | | | | | | | | | | | * deinitializing locks at program exit * deinitLock shouldn't be called for js backend I guess... * I suppose this is the best way to detect the ewruntime option * I guess I need these guards here too... * fixing merge conflict
* Add Zephyr Support (#19003)Jaremy Creechley2021-10-2417-338/+508
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Porting Nim to run on Zephyr. Includes changes to `std/net`. Squashed commit of the following: tweaking more memory / malloc things revert back bitmasks tweaking nim to use kernel heap as C malloc doesn't work fixing socket polling on zephyr cleanup getting maximum sockets for process or for rtos'es reorganizing and fixing net for async / system merge netlite changes back into nativesockets merge netlite changes back into nativesockets reverting native sockets back tweaking nim / zephyr network adding option to run 'net-lite' from linux bridging zephyr's max connections fixing net errors fixing compilation with getAddrString fixing compilation with getAddrString experimenting with a nativesockets_lite ... getAddrString experimenting with a nativesockets_lite ... getAddrString experimenting with a nativesockets_lite ... getLocalAddr experimenting with a nativesockets_lite ... getLocalAddr experimenting with a nativesockets_lite ... add note regarding incorrect FreeRTOS Sockadd_in fields changing to NIM_STATIC_ASSERT cleaning up the static_assert error messages cleaning up the static_assert error messages setting up static assert ftw! testing compile time asserts reworking Sockaddr objects to more closely match various platforms reworking Sockaddr objects to more closely match various platforms reworking Sockaddr objects to more closely match various platforms finding missing items (issue #18684) fixup posix constants (issue #18684) adding plumbing for zephyr os (issue #18684) adding plumbing for zephyr os (issue #18684) * fixing constant capitalizations * remove extra debug prints and fix TSa_Family/cint issue * remove extra debug prints and fix TSa_Family/cint issue * Porting Nim to run on Zephyr. Includes changes to `std/net`. Squashed commit of the following: tweaking more memory / malloc things revert back bitmasks tweaking nim to use kernel heap as C malloc doesn't work fixing socket polling on zephyr cleanup getting maximum sockets for process or for rtos'es reorganizing and fixing net for async / system merge netlite changes back into nativesockets merge netlite changes back into nativesockets reverting native sockets back tweaking nim / zephyr network adding option to run 'net-lite' from linux bridging zephyr's max connections fixing net errors fixing compilation with getAddrString fixing compilation with getAddrString experimenting with a nativesockets_lite ... getAddrString experimenting with a nativesockets_lite ... getAddrString experimenting with a nativesockets_lite ... getLocalAddr experimenting with a nativesockets_lite ... getLocalAddr experimenting with a nativesockets_lite ... add note regarding incorrect FreeRTOS Sockadd_in fields changing to NIM_STATIC_ASSERT cleaning up the static_assert error messages cleaning up the static_assert error messages setting up static assert ftw! testing compile time asserts reworking Sockaddr objects to more closely match various platforms reworking Sockaddr objects to more closely match various platforms reworking Sockaddr objects to more closely match various platforms finding missing items (issue #18684) fixup posix constants (issue #18684) adding plumbing for zephyr os (issue #18684) adding plumbing for zephyr os (issue #18684) * fixing constant capitalizations * remove extra debug prints and fix TSa_Family/cint issue * remove extra debug prints and fix TSa_Family/cint issue * fixing PR issues * Porting Nim to run on Zephyr. Includes changes to `std/net`. Squashed commit of the following: tweaking more memory / malloc things revert back bitmasks tweaking nim to use kernel heap as C malloc doesn't work fixing socket polling on zephyr cleanup getting maximum sockets for process or for rtos'es reorganizing and fixing net for async / system merge netlite changes back into nativesockets merge netlite changes back into nativesockets reverting native sockets back tweaking nim / zephyr network adding option to run 'net-lite' from linux bridging zephyr's max connections fixing net errors fixing compilation with getAddrString fixing compilation with getAddrString experimenting with a nativesockets_lite ... getAddrString experimenting with a nativesockets_lite ... getAddrString experimenting with a nativesockets_lite ... getLocalAddr experimenting with a nativesockets_lite ... getLocalAddr experimenting with a nativesockets_lite ... add note regarding incorrect FreeRTOS Sockadd_in fields changing to NIM_STATIC_ASSERT cleaning up the static_assert error messages cleaning up the static_assert error messages setting up static assert ftw! testing compile time asserts reworking Sockaddr objects to more closely match various platforms reworking Sockaddr objects to more closely match various platforms reworking Sockaddr objects to more closely match various platforms finding missing items (issue #18684) fixup posix constants (issue #18684) adding plumbing for zephyr os (issue #18684) adding plumbing for zephyr os (issue #18684) * fixing constant capitalizations * remove extra debug prints and fix TSa_Family/cint issue * remove extra debug prints and fix TSa_Family/cint issue * Remerge * fixing constant capitalizations * remove extra debug prints and fix TSa_Family/cint issue * remove extra debug prints and fix TSa_Family/cint issue * fixing PR issues * fix maxDescriptors on zephyr/freertos * move maxDescriptors to selector.nim -- fixes compile issue * change realloc impl on zephyr to match ansi c behavior * change realloc impl on zephyr to match ansi c behavior * force compileOnly mode for tlwip Co-authored-by: Jaremy J. Creechley <jaremy.creechley@wavebaselabs.com> Co-authored-by: Jaremy Creechley <jaremy.creechley@panthalassa.com>
* use the correct header for TIOCGWINSZ on Solaris (#19037)BarrOff2021-10-221-2/+5
|
* Add Elbrus 2000 architecture (#19024)Danil Yarantsev2021-10-211-1/+3
| | | | | | | | | * Add Elbrus 2000 architecture * Add e2k to niminst * Update compiler/installer.ini Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Fix isInvalidFilename & always operate on the full passed in string (#19004)John Novak2021-10-201-45/+46
| | | | | | | | | | | | | * Fix isInvalidFilename segfault & deprecate the method * Update lib/pure/os.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update lib/pure/os.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* bump NimVersion to 1.7.1narimiran2021-10-191-1/+1
|
* fix parsesql.treeRepr when nil is in input (#18974)Andrey Makarov2021-10-171-3/+3
| | | | | * fix parsesql.treeRepr when nil is in input * return newNode(nkNone) as default value, not nil
* sequtils: fix errors from `strictFuncs` use (#18998)ee72021-10-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nim 1.4.x compiled the below code without error when using `--experimental:strictFuncs` import std/sequtils type Foo = ref object let foo1 = Foo() let foo2 = Foo() let foos = @[foo1, foo2] let fooTuples = @[(foo1, 1), (foo2, 2)] discard repeat(foo1, 3) discard zip(foos, foos) discard unzip(fooTuples) However, since 2020-12-09, devel Nim produced errors like /tmp/bar.nim(11, 15) template/generic instantiation of `repeat` from here /foo/nim/pure/collections/sequtils.nim(172, 6) Error: 'repeat' can have side effects an object reachable from 'x' is potentially mutated /foo/nim/pure/collections/sequtils.nim(183, 15) the mutation is here /foo/nim/pure/collections/sequtils.nim(183, 15) is the statement that connected the mutation to the parameter This commit reverts some `proc` to `func` changes so that code that: - calls `repeat`, `zip`, or `unzip` - and instantiates them with types containing `ref` can once again be compiled with `strictFuncs`. Otherwise, a user might be forced to drop or alter their `strictFuncs` use when upgrading from Nim 1.4.x, or when writing new code that uses these procedures (at least for now, with the current `strictFuncs` implementation). This commit also adds tests to assert that the remaining funcs in this module can be compiled with `strictFuncs` when used with types containing `ref`. The original batch of `proc` to `func` changes in `sequtils.nim` was in commit 6f57ebae349f, which was partially reverted in 38eb021f8158. See also: https://github.com/nim-lang/Nim/issues/16305
* fix a potential bug (#18900)flywind2021-10-141-1/+1
|
* remove deprecated stuffs from std/times (#18937)flywind2021-10-131-25/+25
|
* Removes deprecated {.injectStmt.}. Fixes #18666 (#18984)Dominik Picheta2021-10-131-10/+0
|
* Fixed `strictFuncs` support for `std/pegs` (#18951)quantimnot2021-10-071-138/+142
| | | | | | | | | | | | | | | | | * Fixed `strictFuncs` support for `std/pegs` Enabled `std/pegs` in the `strictFuncs` import test. Fixes #18057 Fixes #16892 See #18111 * Rebased from `devel` * Conditionally compile `std/pegs` in `koch` This is for supporting `csources` bootstrap. Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* typo [backport] (#18967)flywind2021-10-071-1/+1
|
* rst: minor fixes (#18960)Andrey Makarov2021-10-063-3/+4
|
* fixes #18954 (#18955)Andreas Rumpf2021-10-051-2/+2
|
* rename nimEnableHashRef [backport] (#18941)flywind2021-10-041-5/+13
| | | | | | * rename nimEnableHashRef [backport] * Apply suggestions from code review Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Add support for `strictEffects` to `std/pegs` (#18949)quantimnot2021-10-041-1/+4
| | | | | | | * Add support for `strictEffects` to `std/pegs` * Fixed support of older Nim versions Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* document -d:nimStrictDelete [backport] (#18939)flywind2021-10-031-0/+4
|
* with this patch :idx: can be used for the index generation for LaTeX (#18946)Andreas Rumpf2021-10-031-1/+1
|
* rename nimLegacyJsonutilsHoleyEnum [backport] (#18938)flywind2021-10-011-1/+5
| | | | | * enable nimPreviewJsonutilsHoleyEnum [backport] * docuement nimPreviewJsonutilsHoleyEnum
* [std/tempfiles] docs improvement (#18936)flywind2021-10-011-5/+6
| | | | | * unify comments * more
* correct licence header (#18935)flywind2021-10-015-5/+5
| | | | | * rename licence * spaces
* [std/tasks] more gcsafe stuffs [backport] (#18926)flywind2021-09-301-3/+3
|
* Adds source to single tags list (#18920)Jonas Schubert Erlandsson2021-09-291-1/+1
|
* envPairs works in vm, nims (#18615)Timothee Cour2021-09-292-179/+189
| | | | | * envPairs works in vm, nims * fixup
* change comment (#18913)flywind2021-09-281-1/+1
|
* fixes #18878 (#18883)Aditya Siram2021-09-251-1/+2
|
* fix a typo (rename `temporal` to `temporary` (#18892) [backport]flywind2021-09-241-1/+1
|
* ported Nim to proprietary CrossOS [backport] (#18889)Andreas Rumpf2021-09-241-1/+1
|