Commit Graph

5028 Commits

Author SHA1 Message Date
Clyybber
4545995e2d Revert "Revert "close #16607 add testcase (#17317)" (#17336)" (#17347)
This reverts commit 3ce27511ad.
2021-03-12 00:21:31 +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
Clyybber
3cbc80045d Fix #14325 (#17308)
* Fix #14325
* Refactor and fix
2021-03-11 14:03:25 +01:00
Clyybber
3ce27511ad Revert "close #16607 add testcase (#17317)" (#17336)
This reverts commit 1655103d83.
2021-03-11 20:43:45 +08:00
Timothee Cour
789cc49b60 disable most flaky test in CI (refs #16338) (#17113) 2021-03-10 19:08:27 -08:00
Timothee Cour
eb07a5a75b add typetraits.OrdinalEnum, enumutils.symbolName (#17281) 2021-03-10 08:08:24 -08:00
flywind
58e88dbf12 close #9440 add testcase (#17316) 2021-03-09 22:50:17 -08:00
flywind
1655103d83 close #16607 add testcase (#17317) 2021-03-09 22:16:34 -08:00
Andreas Rumpf
2f213db7ee fixes #11225; generic sandwich problems; [backport:1.2] (#17255)
* fixes #11225; generic sandwich problems; [backport:1.2]
* progress
* delegating these symbols must be done via 'bind'
2021-03-09 20:19:24 +01:00
flywind
cc37fee0ab fix #17275 (#17276) 2021-03-09 12:22:26 +01:00
Timothee Cour
d161d27cdd fix #13491 #17279 runnableExamples now don't get lost in translation (#17282)
* fix #13491 runnableExamples rendering
* fix a runnableExamples thanks to this bugfix
2021-03-09 07:09:24 +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
d1e093207a fix #17267 (#17273)
* remove unnecessary when statement

* remove outdated codes

* reuse jsffi

* move js json coverage

* fix #17267

* address comments

* Update compiler/main.nim

* Update tests/threads/tjsthreads.nim
2021-03-07 12:13:41 +01:00
flywind
0e3ea16554 use lowercase --define switches (#17283) 2021-03-07 12:08:41 +01:00
Clyybber
38d82795da Fix #16437 (#17277)
* Fix #16437

* Fix

* Small cleanup
2021-03-06 22:35:02 +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
konsumlamm
2e8325a19c Remove support for named procs with sugar.=> (#17220)
* Add docs & tests for named procs with sugar.=>
* Remove support for named procs in sugar.=>
* Resolve conflict
* Fix test
2021-03-05 12:08:03 +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
flywind
e1cc3b83fb deprecate newruntime (#17245)
* deprecate newruntime
* tests
* Update compiler/commands.nim
2021-03-04 19:33:16 +01:00
Timothee Cour
a66637bda4 followup #16871 asyncjs.then: allow pipelining procs returning futures (#17189)
* followup #16871 asyncjs.then: allow pipelining procs returning futures
* rename test files where they belong
* fix tests
* tests for then with `onReject` callback
* rename test file containing fail to avoid messing with grep
* address comments
* cleanup
* un-disable 1 test
2021-03-04 14:00:04 +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
flywind
ec068a2687 fix #17177 (#17243)
* remove unnecessary when statement

* remove outdated codes

* fix #17177

* add testcase
2021-03-03 11:57:34 +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
flywind
5628cd5de1 attempt to fix #16374 (#17232)
* remove unnecessary when statement

* remove outdated codes

* attempt to fix #16374

* fix
2021-03-02 19:41:55 +08:00
Saem Ghani
ab780f66ef fixes #17198, DFA failure on large case stmts (#17210)
This alters the DFA control flow graph generation for case statments.
Gotos are now generated as a chained link, this ensures that evaluation
of variant branches collapses as early as possible, without hitting the
2k call limit.
2021-03-02 10:32:43 +01:00
flywind
eabb9b79b2 close #5342 add testcase (#17230)
* remove unnecessary when statement

* remove outdated codes

* close #5342 add testcase

* update the example
2021-03-02 10:24:45 +01:00
Timothee Cour
6c5872c169 --nilseqs is now a deprecated noop (#17211)
* --nilseqs is now a deprecated noop

* fix tests; fix: future => sugar
2021-03-01 20:59:43 +01:00
Andreas Rumpf
bb0c19f42c fixes #17173 (#17213)
* fixes #17173

* add testcase (#17214)

* Apply suggestions from code review

* fix for newruntime

* Apply suggestions from code review

* Update lib/system.nim

* Update lib/system.nim

* Update lib/system.nim

Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>

Co-authored-by: flywind <xzsflywind@gmail.com>
Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
2021-03-01 20:58:12 +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
ff3ace2232 fix code-block test bugs: fix #17183, fix https://github.com/timotheecour/Nim/issues/620 (#17184)
* fix code-block test bugs: fix #17183, fix https://github.com/timotheecour/Nim/issues/620

* cleanup
2021-02-26 16:05:20 +01: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
Timothee Cour
a4e6b242d5 asyncjs: add then, catch for promise pipelining (#16871)
* asyncjs: add then
* improve tests, changelog, API
* fix cryptic windows error: The parameter is incorrect
* address comments
2021-02-24 21:03:21 +01: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
Andreas Rumpf
e9a287fe12 fixes #17170 (#17171) 2021-02-24 17:43:13 +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
flywind
3021252ad4 close #14581 add testcase (#17169)
* remove unnecessary when statement

* remove outdated codes

* close #14581
2021-02-24 13:49:47 +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
Andreas Rumpf
6278b5d89a new-style concepts implementation, WIP (#15251)
* fixes #15210 [backport:1.2]

* make tests green
* make ordinal work
* makes Swapable test compile
* make Indexable example work
* concepts: 'self' is now 'Self'
* concepts: make Dictionary example compile
* document the new concept implementation
* concepts: make typeDesc work properly
* concepts: allow documentation comments (d'oh)
2021-02-24 13:17:33 +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