flywind
465a41c308
[isolation]fix empty ref object bug ( #17471 )
...
* fix nim js cmp fails at CT
* [Minor]fix empty ref object for isolation
* Update compiler/isolation_check.nim
* Update compiler/isolation_check.nim
Co-authored-by: Clyybber <darkmine956@gmail.com >
Co-authored-by: Clyybber <darkmine956@gmail.com >
2021-03-24 09:44:24 +01:00
flywind
c015ecdc37
fix #17490 ( #17491 )
2021-03-24 08:16:41 +01:00
flywind
c719d79d23
add algorithm.merge ( #16182 )
...
* add merge to algorithm
* Apply suggestions from code review
* Update lib/pure/algorithm.nim
* Apply suggestions from code review
* Update changelog.md
Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com >
2021-03-23 10:49:02 +01:00
Timothee Cour
1d19cd660f
fix #17458 tnetconnect.nim flaky ( #17459 )
...
* fix tests
* fix #17458
2021-03-23 08:37:15 +01:00
Timothee Cour
f3a6427109
refs #17292 fix repr with do: ( #17449 )
...
* refs #17292 fix `repr` with `do:`
* address comment
2021-03-23 08:34:04 +01:00
Timothee Cour
d78ebe4a0e
fix #17454 ( #17461 )
2021-03-23 08:33:09 +01:00
flywind
83e002a318
follow up #17391 add testcase ( #17404 )
...
* Revert "make system random work in VM"
* fix #17380
* attempt to fix bug
* fix
* better
* fix
* a bit
* fix the leaks
* revert
* fix
* better
* follow up #17391
* fix
* Update tchannels.nim
* Update tests/stdlib/tchannels.nim
* Update tchannels.nim
2021-03-19 14:48:31 +08:00
Timothee Cour
2356d0603f
followup #17398 : getTempDir, getConfigDir now do not have trailing DirSep ( #17402 )
...
* followup #17398 : `getTempDir`, `getConfigDir` now do not have trailing DirSep
* fix test
2021-03-18 13:25:56 +01:00
Andrey Makarov
4bfc5a9551
Rst test check messages ( fix #17280 ) ( #17338 )
2021-03-17 20:13:04 +01:00
Andrey Makarov
144e338abb
allow short-style rst references with symbols ( #17372 )
2021-03-17 18:08:13 +01:00
flywind
e9b5543bd5
[std/channels]fix recv leaks(Part One) ( #17394 )
2021-03-17 10:08:54 +01:00
Timothee Cour
895a40d1ac
fix #17383 : json.%,to and jsonutils.formJson,toJson now works with uint|uint64 ( #17389 ) [backport:1.2]
...
* fix #17383 : json.%,to and jsonutils.formJson,toJson now works with uint|uint64
* fixup
* fix for js
2021-03-16 21:44:54 +01:00
flywind
84cf3e5fca
Revert "make system random work in VM" ( #17378 )
2021-03-15 10:21:25 +01:00
flywind
a0b8a3d920
New channels implementation for ORC ( #17305 )
...
* Update lib/std/channels.nim
* Rename tchannel_pthread.nim to tchannels_pthread.nim
* Rename tchannel_simple.nim to tchannels_simple.nim
Co-authored-by: Mamy Ratsimbazafy <mamy_github@numforge.co >
2021-03-12 13:33:47 +01:00
Andrey Makarov
d97bf4f1c8
fix RST parsing when no indent after enum.item ( fix #17249 ) ( #17257 )
2021-03-12 08:33:21 +01:00
Miran
e922d73dd6
refs #4347 , add ZZZ and ZZZZ patterns for timezone offsets without colons ( #17318 )
2021-03-11 16:32:50 +01:00
Timothee Cour
eb07a5a75b
add typetraits.OrdinalEnum, enumutils.symbolName ( #17281 )
2021-03-10 08:08:24 -08:00
flywind
cc37fee0ab
fix #17275 ( #17276 )
2021-03-09 12:22:26 +01:00
flywind
761ec2ccc8
improve test coverage for isolation ( #17297 )
...
* improve test coverage for isolation
* a bit better
2021-03-08 22:21:57 +08:00
flywind
dd8383b10a
add testcase for #12005 ( #17278 )
...
* remove unnecessary when statement
* remove outdated codes
* reuse jsffi
* move js json coverage
* close #12005 add testcase
* Update tests/stdlib/tthreadpool.nim
* Update tests/stdlib/tthreadpool.nim
* Update tests/stdlib/tthreadpool.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-03-08 14:37:52 +01:00
Timothee Cour
93cb5d6896
add setutils.[]= ( #17272 )
...
* add setutils.[]=
* address comments
* proc => func (for other symbols too)
2021-03-08 10:39:39 +01:00
Roman Inflianskas
31424b3808
stdlib/os: add isAdmin ( #17012 )
...
* stdlib/os: add isAdmin
* uint8 -> cuchar, assert isAdmin on Azure
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update lib/pure/os.nim docs
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Address comments on #17012
* Raise on errors in #17012
* Check the result of FreeSid in #17012
* Change case in #17012
* Fix memory leak in #17012
* Address comments in #17012
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-03-07 22:40:16 +01:00
flywind
0e3ea16554
use lowercase --define switches ( #17283 )
2021-03-07 12:08:41 +01:00
flywind
171b03c386
fix #17264 [backport:1.4] ( #17266 )
...
* fix #17264
* fix vm
* fix js and add tests
2021-03-05 14:39:46 +01:00
flywind
cda443ee68
follow up #17165 ( #17262 )
2021-03-04 22:41:20 -08:00
flywind
81889fb84c
reuse jsffi in json module ( #17165 )
...
* remove unnecessary when statement
* remove outdated codes
* reuse jsffi
* move js json coverage
2021-03-04 19:37:12 +01:00
Jason Beetham
c180de60a8
Added math.clamp for slice clamping ( #17246 )
...
* Added math.clamp for slice clamping
* Added inline to math.clamp
* Cleaned up math.clamp + test
2021-03-03 23:54:23 +00:00
flywind
6391f6e861
fix #16384 and #17144 ( #17126 ) [backport]
2021-03-03 11:58:50 +01:00
Juan Carlos
4982d1c662
https://github.com/nim-lang/Nim/pull/15826/files#r585368355 ( #17233 )
2021-03-03 11:58:05 +01:00
Andrey Makarov
02f4464058
RST heading improvements ( fix #17091 ) ( #17195 )
2021-03-02 16:41:10 +01:00
Timothee Cour
f1bf672ffc
re-enable disabled tests after #17173 ( #17228 )
2021-03-02 12:53:05 +01:00
Timothee Cour
0cb02fbbee
add overload add(a: var string, b: openArray[char]) ( #15951 )
...
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-03-01 07:51:12 -08:00
Timothee Cour
63f1c38f4e
hashes: support object default hash ( #17175 )
2021-02-26 08:45:37 +01:00
Timothee Cour
578d1ee751
std/options: $some(3) is now "some(3)", etc. (#17147 )
...
* std/options: $some(3) is now "some(3)", not "Some(3)", `$none(int)` is now `"none(int)"` instead of `"None[int]"`
* fix tests
* disable optionsutils
2021-02-24 22:17:16 +00:00
flywind
99633d7682
remove deprecated stuff in unittest module ( #17156 )
...
* remove unnecessary when statement
* remove outdated codes
* remove deprecated stuff in testament
* fix
2021-02-24 21:02:33 +01:00
Timothee Cour
8942586fa6
wrapnils: add ??. which returns an Option ( #16931 )
...
* wrapnils: add option-like API with ??., isSome, get
* fix test after rebase
* cleanups
* fix changelog
* address comments regarding get vs unsafeGet
2021-02-24 14:02:32 +01:00
Timothee Cour
11a7fa68f6
fix #17159 items(cstring) works in VM ( #17160 )
...
* fix #17159 items(cstring) works in VM
* improve test coverage tests/stdlib/tcstring.nim; add helpers: whenRuntimeJs, whenVMorJs
* document items(cstring)
* address comments
2021-02-24 14:01:06 +01:00
Timothee Cour
0bb7e8dcb4
cleanup tests/stdlib/tstring.nim ( #17158 )
...
* cleanup tests/stdlib/tstring.nim
* cleanup tests/stdlib/tstring.nim
* cleanup rest of test
2021-02-24 13:47:36 +01:00
flywind
cbe3c993b6
close #15563 add testcase ( #17168 )
...
* remove unnecessary when statement
* remove outdated codes
* close #15563
* Update tests/typerel/t15563.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* address comments
* tiny
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-02-24 13:44:10 +01:00
flywind
3f38f8fbb7
add strbasics.strip ( #16280 )
2021-02-24 10:22:47 +01:00
flywind
46bd222c89
[stdlib] make cookies module modern ( #17116 )
...
* update cookies module
* introduce sameSite.Default
Co-authored-by: hlaaftana <10591326+hlaaftana@users.noreply.github.com >
2021-02-24 10:14:19 +01:00
Timothee Cour
c274e67198
add enumutils.items for sparse enums, typetraits.SomeSparseEnum ( #17080 )
...
* add enumutils.items for enum with holes
* changelog
* ref in lib.rst
* use `type SomeSparseEnum* = (not Ordinal) and enum` instead of concept
* address comment: rename back to enum with holes
2021-02-23 20:25:35 +01:00
Timothee Cour
ce7caec4b3
add io.readChars overload (simpler, less error prone) ( #16044 )
...
* add simpler to use readChars overload
* use new readChars overload
* Update lib/wrappers/openssl.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
Co-authored-by: flywind <xzsflywind@gmail.com >
2021-02-22 20:13:08 +01:00
konsumlamm
a1f4113705
Improve the ropes module ( #17145 )
...
* Improve ropes module
Improve wording
Update runnableExamples
Add index bound check for `[]`
Minor format changes
* Update tests/stdlib/tropes.nim
Run on C & JS target
Test in VM
Add tests for `[]`
2021-02-22 19:58:37 +01:00
rockcavera
d76d79336f
fix #15215 ( #17142 )
...
* fix 15215
* fix test
* end line
* Update tests/stdlib/tnetconnect.nim
Co-authored-by: flywind <xzsflywind@gmail.com >
* Update lib/pure/net.nim
Co-authored-by: flywind <xzsflywind@gmail.com >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-02-22 17:40:57 +01:00
flywind
f07a072691
[JS + docs] improve std/monotimes module ( #17103 )
2021-02-22 11:09:25 +01:00
Andrey Makarov
fab1618eb4
make rst.nim use object variant ( #17138 )
...
* make rst.nim use object variant
* add workaround
* fix mistake
2021-02-22 11:00:31 +01:00
flywind
32bf10126c
fix #17118 ( #17119 ) [backport:1.2]
...
* fix js unsigned integer
* Use `std` prefix for standard library modules
* fix #17118
2021-02-22 09:14:18 +01:00
Timothee Cour
cde950e1bc
make copySign for js consistent with other backends ( #16609 )
...
* make copySign work more robustly in js
* improve tests
* improve tests/vm/tcastint.nim
2021-02-22 08:47:00 +01:00
flywind
146beb2797
remove unnecessary when statement ( #17135 )
2021-02-21 11:17:25 +01:00