Commit Graph

9364 Commits

Author SHA1 Message Date
ringabout
fc8bfd781a fixes pre-existing quit documentation regression [backport] (#20763)
fixes pre-existing `quit` documentation regression
2022-11-06 11:50:10 +01:00
ringabout
92e525d2a6 add effectsOf to map in the std/sets module (#20760) 2022-11-05 12:05:02 +01:00
ringabout
d5cc2085ea ref #20694; quit value gets saturated to ranges (#20753)
* quit value gets saturated to ranges

* add documentation

* minimal changes

* refactor

* small fix

* add documentation

* fixes

* Update lib/system.nim

Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>

Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
2022-11-05 10:58:57 +01:00
n5m
51bef9b4a8 fix posix.mq_receive compilation with cpp backend (#20710)
* fix posix.mq_receive compilation with cpp backend

* only enable runnableExample on posix

* linux, not posix

* simplify example

* add test

* mqueue.h does not exist on MacOS

* place test case in own block

* drop runnableExamples
2022-11-05 06:31:19 +01:00
ringabout
12a20b9fb6 revert #20719; relieve std/assertions of the sysFatal dep (#20743)
* Revert "make `system/fatal` importable (#20718)"

This reverts commit d735c447d3.

* relieve `std/assertions` of the sysFatal dep
2022-11-04 09:53:19 +01:00
ringabout
8fb172c7a6 add effectsOf to std/tables (#20751) 2022-11-04 16:25:40 +08:00
Juan Carlos
4503fa5422 Uri.isIpv6 exported (#20736)
* Export Uri.isIpv6

* Export Uri.isIpv6
2022-11-03 09:48:51 +01:00
Juan Carlos
f562a5c55c Improve dollar IpAddress (#20729)
* Improve dollar

* Improve dollar

* Simplify, remove 1 if in for loop

* ci

* Update lib/pure/net.nim

* Update lib/pure/net.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-11-03 09:48:25 +01:00
Antonis Geralis
606aa45ec6 Export FileMode (#20726) 2022-11-02 10:52:15 +01:00
ringabout
59083e2e48 fixes ssl static link regression (#20722) 2022-11-01 13:34:58 +01:00
ringabout
75ece74bdd fixes #20526; use nimPreviewSlimSystem for documentation build (#20714)
* fixes #20526; use `nimPreviewSlimSystem` for `koch docs`

* fixes documentation errors

* fixes remaning issues
2022-11-01 12:53:14 +01:00
ringabout
07cf4486bc change include genode/env to an import (#20721)
* change `include genode/env` to an import 

ref 0b262e9496 (diff-8718bd20d8f61d6638d3d64b19efc31bcd40a6d5be8215b2a1f0b75ed93e8d56)

* fixes comments
2022-11-01 18:18:06 +08:00
ringabout
6166b796ba refactor os imports into corresponding small modules (#20720) 2022-11-01 10:18:04 +01:00
ringabout
d735c447d3 make system/fatal importable (#20719) 2022-11-01 07:56:32 +01:00
Juan Carlos
2f6e06d224 Improve dollar (#20672)
* Improve dollar for uri

* Refactor

* .

* .

* verde

* optimize

* https://github.com/nim-lang/Nim/pull/20672#issuecomment-1295440246 [skip ci]

* https://github.com/nim-lang/Nim/pull/20670#issuecomment-1295937393

* ci

* Update lib/pure/uri.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-10-31 15:37:09 -04:00
Juan Carlos
229f146280 Improve getDataUri (#20670)
* Improve getDataUri

* Restart ci

* https://github.com/nim-lang/Nim/pull/20670#issuecomment-1295937393
2022-10-31 15:34:17 -04:00
ehmry
0b262e9496 Genode: add scheduleCallbacks to asyncdispatch (#20708)
* Genode: add native signal handler

* Genode: add scheduleCallbacks to asyncdispatch

This resolves some awkwardness where an RPC server may or may not
use callSoon while dispatching RPC but without scheduling timers
or I/O.
2022-10-31 19:24:57 +01:00
n5m
52166e3546 allow deferred close of nil stream (#20706)
* allow deferred close of nil stream

* improve example
2022-10-31 11:20:06 +01:00
ringabout
0a1f204f0f removes channels_builtin when enabling nimPreviewSlimSystem (#20713) 2022-10-31 16:56:05 +08:00
ringabout
e1ddd2d524 put std/threads under the umbrella of nimPreviewSlimSystem (#20711)
* put `std/threads` under the umbrella of `nimPreviewSlimSystem`

* add changelog

* fixes tests

* fixes tests again

* fixes tests
2022-10-31 06:36:50 +01:00
ringabout
fb2ec8d192 follow up #20668; fixes nightlies (#20701) 2022-10-31 06:33:07 +01:00
ringabout
1dab8ba334 move threads out of system (#20674)
* move syslocks first

* progress

* clean up

* go on

* clean up

* clean up

* add imports syslocks

* remove documentation

* public deallocOsPages

* fixes genode

* fixes more

* fixes boehmGC

* cover more cases

* fixes cyclic deps

* fixes genode

* cleanup

* unpublic fields

* cleanup

* clean up
2022-10-29 18:11:40 +02:00
Bung
534c97edc5 fix #16264 low(Time) OverflowDefect (#20552)
fix #16264 regression(0.18.0 => devel): import times; echo low(Time) gives OverflowDefect
2022-10-29 08:59:51 +02:00
Andrey Makarov
779b1cc5be Fix #20628 for Windows (#20667)
* Fix #20628 for Windows

* Move isRegular - !isSpecial and onlyRegular - skipSpecial

* Forgot to change it in 1 more place
2022-10-28 10:01:28 +02:00
metagn
e68a6ea759 openssl 3 support no longer opt in + some 1.0 support (#20668)
* Revert "Add OpenSSL 3 support (#19814)"

This reverts commit 2dcfd73260.

* openssl 3 support no longer opt in + some 1.0 support

* hopefully fix

* maybe fix

* final attempt

* actual fix hopefully
2022-10-27 17:24:26 +02:00
Jason Beetham
0b1989d736 Added openarray[char] overloads to std/unicode (#20648)
* Added openarray[char] overloads to std/unicode

Call substr instead of index slice inside unicode

Added substr overload for openarray for parity with string functionality

Made style checker happies and fixed overloads for substr

* Added update to changelog [skip ci]

* Inline unicode string operations

* Moved substr overload to unicode

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-10-27 14:16:41 +02:00
ringabout
c341f20476 cleanup os related documentation links (#20663)
cleanup documentation links
2022-10-27 12:16:27 +02:00
Juan M Gómez
3b973f3fc8 fixes #20654 FAMs should not be used in the C++ backend (#20655)
* fixes #20654 FAMs should not be used in the C++ backend

* updates the test so it only affects clang
2022-10-25 17:39:51 +02:00
ringabout
69eaa4f14c clean up std/os related modules (#20651)
* clean up `std/os` related modules

* use `cmpPaths`

* reset

* cleanup
2022-10-25 17:56:11 +08:00
Saint
daf35c6d1b Change both code snippets to use the same test URL (#20647) 2022-10-25 09:40:57 +02:00
Andrey Makarov
8ed2431db0 Implement Unix file regularity check (#20448) (#20628)
* Implement Unix file regularity check

* update std/dirs also
2022-10-25 07:42:47 +02:00
Jason Beetham
ea0e45e62f Added 'openArray[char]' overloads to 'std/parseutils' (#20527)
* Added 'openarray[char]' overloads to 'std/parseutils'

* Removed redundant `start` and `last` params from slice using procs

* Fixed type for parseIdent overload

* fixed one by off with 'substr'

* removed missed start parameters for procedures

* Added 'openarray[char]' overloads to 'std/parseutils'

* Removed redundant `start` and `last` params from slice using procs

* Fixed type for parseIdent overload

* fixed one by off with 'substr'

* removed missed start parameters for procedures

* Fixed VM op to work with new 'opcSlice'

* Corrected captureBetween's logic to work with openarray

* js sys's parsefloat logic now uses openarray

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-10-24 14:50:54 -04:00
Jake Leahy
eed1b6df20 Add better error messages to std/jsonutils (#20629)
* Add better error messages

* Add fmt on tuple msg
2022-10-24 12:57:48 -04:00
Jacek Sieka
e2f412145f fix fwrite prototype (#20644)
* fix fwrite prototype

* Update lib/std/syncio.nim

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
2022-10-24 17:25:34 +02:00
ringabout
878919a4df fixes the typical (not a == b) bug in the documentation (#20643)
* fixes the typical (not a == b) bug; uses runnableExamples

* cannot add runnableExamples
2022-10-24 15:20:57 +02:00
Jake Leahy
d261135c5c Fix tuple size check in std/jsonutils (#20637)
* Add test for tuple being invalid size

* Test tuple size before accessing fields

* Fix formatting for import

* Fix not being able to build from csources_v1

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-10-24 17:17:14 +08:00
Jake Leahy
69cb671d8d Pass json options to hooks (#20638)
* Added tests

* Fix expected string

* Allow hooks to take an optional parameter that is the current options

* Add options to hooks for other generic types

* Fix doc links
2022-10-24 08:14:17 +02:00
Tanguy
4578e773ce Remove side-effects from sysFatal with panics on (#20632) 2022-10-24 07:57:49 +02:00
ringabout
c75cfb363f improve error message when using toTask with a call with a return value (#20622) 2022-10-23 08:27:34 +02:00
ringabout
9361938ccd add std/appdirs (#20618) 2022-10-22 13:42:46 +02:00
ringabout
3c12b72168 add typesafe std/paths, std/files, std/dirs, std/symlinks (#20582)
* split std/os; add typesafe std/paths
* add more files, dirs, paths
* add documentation
* add testcase
* remove tryRemoveFile
* clean up
* Delete test.nim
* apply changes
* add `add` and fixes
2022-10-21 21:53:44 +02:00
Amjad Ben Hedhili
5b195ab0f0 Add safe parameter to base64.encodeMime (#20559)
* Improve `encodeMime` signature

* `string` to `openArray[char or byte]`
* `safe` parameter

* Fix

* Revert "Fix"

This reverts commit a394c505c2.

* Remove encodeMime's openArray overload

* Document the `safe` parameter

* Add changelog entry
2022-10-21 09:25:25 +02:00
ringabout
ff2cb113ad move procs in os to appdirs (#20605)
* move procs in os to `appdirs`

* Update lib/std/private/osappdirs.nim
2022-10-20 23:14:50 +02:00
ringabout
f6a002c8a5 [std/os] split and re-export (#20593)
* [std/os] split and export
* move to private modules
* fixes docs and tests

Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
2022-10-20 07:58:29 +02:00
ringabout
b07526b2c7 refactor envvars, oserrors; register vmops (#20592)
* refactor envvars, oserrors; register vmops

* remove type definitions
2022-10-18 19:44:26 +02:00
Andreas Rumpf
81087c949f fixes #20572 (#20585)
* fixes #20572

* added a test case
2022-10-17 23:48:51 +02:00
ringabout
c0824b9b80 [std/os clean up] import and export osseps (#20580)
import and export osseps
2022-10-17 20:29:00 +02:00
Juan Carlos
b7f1757952 Documentation only, dom (#20584)
Add docs to dom
2022-10-17 20:01:08 +02:00
Antonis Geralis
ed26156c99 atomicInc global alloc counters (#20571) 2022-10-16 01:07:22 +02:00
ringabout
1e15f975b8 fixes #19162; enable strictEffects for v2 (#19380)
* enable stricteffects
* add gcsafe
* fix tests
* use func
* fixes pegs tests
* explicitly mark repr related procs with noSideEffect
* add nimLegacyEffects
* change URL
* fixes docopt
* add `raises: []` to repr
* fixes weave
* fixes nimyaml
* fixes glob
* fixes parsetoml
* Apply suggestions from code review
* Update testament/important_packages.nim
* add legacy:laxEffects
2022-10-15 14:07:40 +02:00