summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* correct typos (#19485)flywind2022-02-031-1/+1
|
* move io out of system (#19442)flywind2022-02-0217-36/+76
| | | | | | | | | | | | | | | | | | | | | | | | | * move io out of system * fix tests * fix tests * next step * rename to syncio * rename * fix nimscript * comma * fix * fix parts of errors * good for now * fix test
* Clonkk fix2 11923 (#19451)Regis Caillaud2022-02-021-5/+22
| | | | | | | * fix nnkBracketExpr not compiling for getImpl on customPragmaNode * fix test import * fix alias not working with hasCustomPragmas
* Update jsfetch with latest API and fix missing bindings (#19473)tandy10002022-02-011-21/+25
| | | | | | | | | | | | | | | | | | | | * Update with latest API and fix missing bindings remove deprecated `Body` remove implicit `cstring` convs add `Headers` to `FetchOptions` add `Request` init proc which takes `FetchOptions` * Update lib/std/jsfetch.nim Co-authored-by: Juan Carlos <juancarlospaco@gmail.com> * Update lib/std/jsfetch.nim Co-authored-by: Juan Carlos <juancarlospaco@gmail.com> * remove experimental flag Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
* Merge pull request from GHSA-ggrq-h43f-3w7mDominik Picheta2022-01-291-3/+19
| | | | This fixes a CVE (currently https://github.com/nim-lang/Nim/security/advisories/GHSA-ggrq-h43f-3w7m)
* os: faster getFileSize (#19438)ehmry2022-01-241-5/+4
| | | | Use "stat" rather than "open", "seek", and "close" system calls. The Windows implementation remains the same.
* RST: allow empty number-lines directives just like it was done for a decade; ↵Andreas Rumpf2022-01-221-1/+2
| | | | all my documents rely on this feature [backport (#19431)
* New/better macro pragmas, mark some as experimental (#19406)metagn2022-01-201-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New/better macro pragmas, make some experimental fix #15920, close #18212, close #14781, close #6696, close https://github.com/nim-lang/RFCs/issues/220 Variable macro pragmas have been changed to only take a unary section node. They can now also be applied in sections with multiple variables, as well as `const` sections. They also accept arguments. Templates now support macro pragmas, mirroring other routine types. Type and variable macro pragmas have been made experimental. Symbols without parentheses instatiating nullary macros or templates has also been documented in the experimental manual. A check for a redefinition error based on the left hand side of variable definitions when using variable macro pragmas was disabled. This nerfs `byaddr` specifically, however this has been documented as a consequence of the experimental features `byaddr` uses. Given how simple these changes are I'm worried if I'm missing something. * accomodate compiler boot * allow weird pragmas * add test for #10994 * remove some control flow, try remove some logic
* Fix #11923 (#19427)Regis Caillaud2022-01-201-1/+6
| | | | | * Apply commit https://github.com/nim-lang/Nim/commit/5da931fe811717a45f2dd272ea6281979c3e8f0b that was never merged (was part of a bigger PR). Should fix issue #11932 * add a generic object for custom pragma
* Resolve cross file resolution errors in atomics (#19422) [backport:1.6]James2022-01-201-10/+7
| | | | | * Resolve call undeclared routine testAndSet * Fix undeclared field atomicType
* Added `std/envvars` for env vars handling (#19421)flywind2022-01-201-0/+212
|
* Add noQuit option (#19419) [backport:1.6]Tom2022-01-191-2/+5
| | | | | | | | | * Add noQuit option * Add nim prefix in case of conflicts Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: flywind <xzsflywind@gmail.com>
* add an example to setControlCHook (#19416)nblaxall2022-01-191-0/+9
| | | | | | | * add an example to setControlCHook * [skip CI] format example for setControlCHook Co-authored-by: Nathan Blaxall <nathan.blaxall@actionstep.com>
* suppress deprecated warnings (#19408)flywind2022-01-191-2/+1
| | | | | | | * suppress deprecated warnings once bump version to 1.7.3 enable deprecated messages * deprecate later
* update deprecated example (#19415)Hamid Bluri2022-01-181-1/+1
| | | `toNimIdent` proc is deprecated, so I replaced it with `ident` proc
* Added `std/oserrors` for OS error reporting (#19390)flywind2022-01-171-0/+118
| | | | | | | | | * Added 'std/oserrors' for OS error reporting * add a simple test * New code should not support -d:useWinAnsi anymore thanks to @Araq
* fix no net compilation on zephyr (#19399)Jaremy Creechley2022-01-171-6/+10
| | | Co-authored-by: Jaremy J. Creechley <jaremy.creechley@panthalassa.com>
* add mm to compilesettings; deprecate gc (#19394)flywind2022-01-161-1/+2
|
* deprecate unsafeAddr; extend addr (#19373)flywind2022-01-161-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | * deprecate unsafeAddr; extend addr addr is now available for all addressable locations, unsafeAddr is deprecated and become an alias for addr * follow @Vindaar's advice * change the signature of addr * unsafeAddr => addr (stdlib) * Update changelog.md * unsafeAddr => addr (tests) * Revert "unsafeAddr => addr (stdlib)" This reverts commit ab83c99c507048a8396e636bf22d55fdd84d7d1c. * doc changes; thanks to @konsumlamm Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Use openarray of bytes in md5 (#19307)hlaaftana2022-01-151-34/+97
| | | | | | | | | | * Use openarray of bytes in md5 * fix CI * cleanup * use noSideEffect for bootstrapping * fix CI again * actually fix CI by checking if it works * this is getting ridiculous * put old md5 version in compiler, remove vmop
* docs: Fix broken cross references to `rfind` in strutils (#19382) [backport]Leon2022-01-131-3/+3
| | | | | | Fixes three broken cross references to `rfind` in strutils. Breakage due to signature changes of the `rfind` methods. Co-authored-by: adigitoleo <adigitoleo@dissimulo.com>
* make rst thread safe (#19369)flywind2022-01-131-3/+3
| | | split for the convenience of review
* remove spaces between an identifier and a star (#19355)flywind2022-01-101-19/+19
| | | | | It makes search easier by searching `+`* instead of `+` which filter lots of unexported versions. Follow https://github.com/nim-lang/Nim/pull/18681
* Fix `remove` on last node of singly-linked list [backport:1.6] (#19353)gecko2022-01-101-0/+2
|
* added filemode docs (#19346)Smarcy2022-01-091-1/+4
|
* stylecheck usages part two: stdlib cleanup (#19338)flywind2022-01-082-2/+2
| | | | | | | | | | | | | * stylecheck usages part two: stdlib cleanup typeinfo.nim: importCompilerProc => importcompilerproc nre.nim: newLineFlags => newlineFlags system.nim: JSRoot => JsRoot ref #19319 * prefer importCompilerProc
* fix nim-lang#19343 (#19344) [backport]Zachary Marquez2022-01-081-1/+1
| | | | Ensure HttpClient onProgress is called once per second Ensure that reported speed is accurate
* Fix #19038 - making the Nim compiler work again on Windows XP (#19331)rockcavera2022-01-072-22/+24
| | | | | | | | | | | | | * Update osenv.nim * Update win_setenv.nim * Update lib/pure/includes/osenv.nim * Update lib/pure/includes/osenv.nim * fixing cstring Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Update net.nim (#19327) [backport]rockcavera2022-01-061-1/+1
|
* add std/private/win_getsysteminfo; refactor the usage of `GetSystemInfo` ↵flywind2022-01-043-35/+23
| | | | | | | | | | | (#19310) * add std/private/win_getsysteminfo * import at the top level * wrappers follow nep1 too * follow review comment
* devel: style fix (#19318)Ștefan Talpalaru2022-01-042-2/+2
| | | this allows "--styleCheck:usages --styleCheck:error"
* Fix #19314 - fixing broken `DoublyLinkedList` after adding empty ↵rockcavera2022-01-031-6/+6
| | | | | | | `DoublyLinkedList` (#19315) [backport] * Update lists.nim * Update tlists.nim
* Add Week-Of-Year Implementation to Times Module (#17223)Carlo Capocasa2022-01-031-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial * more tests * Apply suggestions from code review idiomatize Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * test iron age dates * add examples * fix typo * consistent param mention * add since pragrams * add changelog * Update lib/pure/times.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * fix examples * fix negative years * add getWeeksInYear tests * add back fix dropped by rebase * week-year tuple api * add changelog * fix doc tags * add docstrings * fix typos Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* [docs] clarify the raised exception (#19308)flywind2022-01-031-4/+4
| | | | | | | | | | | * [docs] clarify the raised exception Lest developers wanna know what the exception is. * Apply suggestions from @konsumlamm Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* add compile time option for POSIX sigwait on Illumos/Solaris (#19296)BarrOff2022-01-021-0/+7
| | | | | * add compile time option for POSIX sigwait on Illumos/Solaris * fix link to documentation of `sigwait` on Illumos/Solaris
* Fix #19297 - fixing broken list after adding empty list (#19299)rockcavera2021-12-301-5/+6
| | | | | | | | | * Update lists.nim * Update tlists.nim * removed check `if b.tail != nil` The tail of the list being null it is still possible to retrieve its end by going through all nodes from the head. So checking for null from `b.tail` is unnecessary. However, setting `a.tail = b.tail` only if `a.head != nil`, so you don't break a good list with an already broken one.
* enable `maxDescriptors` on Illumos/Solaris (#19295)BarrOff2021-12-302-4/+4
|
* fix 19292 (#19293)rockcavera2021-12-291-6/+9
|
* Fix #19107 (#19286) [backport]Tomohiro2021-12-251-2/+10
|
* Revert "Update uri.nim (#19148) [backport:1.0]" (#19280)Andreas Rumpf2021-12-231-2/+0
| | | This reverts commit a3ef5df680e55d9bf68027fcb0ec6358b4279d09.
* Fix group reference (with capital letters (#19196)Andrey Makarov2021-12-201-1/+1
| | | in group name)
* Extract runnables that specify `doccmd` (#19275) [backport:1.6]Jake Leahy2021-12-201-2/+2
|
* Update colors.nim (#19274)MichalMarsalek2021-12-201-145/+162
| | | | | | | | | | | * Update colors.nim Added `lightgray` alias to `lightgrey` and `...grey`aliases for the rest of the gray colors. Added color `rebeccapurple`. Fixed the incorrect values for the `PaleVioletRed` and `MediumPurple` colors. This module should now be matching the CSS colors. I used the seq[tuple] syntax for defining the names. * Document colors changes.
* use uppercase "type" for Proxy-Authorization header (#19273)xioren2021-12-191-1/+1
| | | | | Some servers will reject authorization requests with a lowercase "basic" type. Changing to "Basic" seems to solve these issues. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Proxy-Authorization
* [formatter] async.nim uses two spaces (#19264)flywind2021-12-171-4/+4
| | | according to https://nim-lang.org/docs/nep1.html#introduction-spacing-and-whitespace-conventions, two spaces should be preferred in stdlib.
* fix #19244 - solves the problem of the InAddr object constructor in Windows. ↵rockcavera2021-12-171-1/+1
| | | | | | | (#19259) * Update winlean.nim * Update tnet_ll.nim
* suggestion to respect typedarray type (#19257)Sven Keller2021-12-161-1/+27
| | | | | | | * suggestion to respect typedarray * Update jssys.nim Co-authored-by: Sven Keller <s.keller@cortona.de>
* [backport:1.0] json: limit recursion depth (#19252)Miran2021-12-141-3/+9
| | | | | * json: limit recursion depth * do not run this check for JS backend
* Fix #19253 (#19254)PMunch2021-12-141-0/+3
| | | | This fixes 19253 by marking the bodyStream as completed when no content was sent.
* fix: fixes bug in CVerifyPeerUseEnvVars (#19247)Nick Wilburn2021-12-141-1/+2
| | | | | | Previously CVerifyPeerUseEnvVars was not being passed into scanSslCertificates, which meant that we weren't scanning additional certificate locations given via the SSL_CERT_FILE and SSL_CERT_DIR environment variables