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
Miran
c625ce80cb
add 'pixie' to important_packages ( #17215 )
2021-03-01 17:05:09 +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
dd6b0f81ef
use -r:off for runnableExamples that should compile but not run ( #17203 )
...
* use -r:off for runnableExamples that should compile but not run
* use -r:off in other RT disabled tests
2021-03-01 14:26:39 +01:00
Danil Yarantsev
aef55a7a88
Replace double backticks with single backticks - Part 3 out of ~7 ( #17207 )
2021-02-28 23:22:05 -08:00
Danil Yarantsev
82d8e9bff3
Replace double backticks with single backticks - Part 2 out of ~6 ( #17206 )
2021-02-28 23:15:26 -08:00
Danil Yarantsev
ac8166ab3d
Replace double backticks with single backticks - Part 1 out of ~6 ( #17205 )
2021-02-28 23:08:12 -08:00
Danil Yarantsev
56461c280f
Change stdlib imports to use std prefix in most examples ( #17202 )
2021-02-28 13:17:19 -08:00
Juan Carlos
26a6ceb34e
Fix Typos ( #17194 )
2021-02-27 09:51:54 +08:00
flywind
60ec3e2417
add warnings to std/sysrand ( #17191 )
...
* remove unnecessary when statement
* remove outdated codes
* add warnings to std/sysrand
* Update lib/std/sysrand.nim
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 >
2021-02-26 20:06:20 +01:00
Timothee Cour
e9f12dd89e
document ; vs , for generic params ( #17192 )
2021-02-26 16:14:25 +01: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
zetashift
c7d6e4c6a6
Fix unicode.split with seperators examples ( #17176 )
...
* Fix unicode.split with seperators examples
https://nim-lang.org/docs/unicode.html#split.i%2Cstring%2CRune%2Cint didn't work with the set constructor `{}` so replaced it with a string that's converted to an openArray compatible type containing `Rune`s.
* Add runnableExamples to unicode.split
* Add runnableExamples to split with single separator too
* Simplify runnableExamples unicode.split
* Improve the rest of the runnableExamples with the simplified code
* Simplify runnableExamples of unicode.split even more
* Formatted unicode.split example
* Update lib/pure/unicode.nim
Co-authored-by: zetashift <rishi2@laptop.localdomain >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-02-26 15:08:48 +01:00
Timothee Cour
63f1c38f4e
hashes: support object default hash ( #17175 )
2021-02-26 08:45:37 +01:00
Timothee Cour
4a31088ac2
improve docs for sugar.collect ( #17188 )
2021-02-26 08:43:32 +01:00
Timothee Cour
b725e0ed4d
make jsconsole.assertion errors less confusing in logs ( #17179 )
...
* make jsconsole.assertion errors less confusing in logs
* address comments
* fixup
2021-02-25 14:02:00 +01:00
flywind
f07bdbe945
clarify the docs of existsOrCreateDir a bit ( #17182 )
...
* remove unnecessary when statement
* remove outdated codes
* clarify the docs a bit
2021-02-25 13:58:31 +01:00
flywind
dcd3f26876
clean up wrapnils
2021-02-25 17:52:58 +08:00
Timothee Cour
bea037f856
refs #17114 : workaround for arm64 which should segfault but does not ( #17178 )
...
* refs #17114 : workaround for arm64 which should segfault but does not
* fixup
* Update lib/std/wrapnils.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-02-25 08:40:43 +01:00
flywind
60929953cb
mark inline ( #17180 )
2021-02-24 21:52:23 -08:00
flywind
fcb5cf643c
use single backtick ( #17181 )
2021-02-24 21:47:27 -08: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
alaviss
d35f366d6f
compiler/installer.ini: package cacert.pem on Windows [backport:1.2] ( #17172 )
...
Follow up of 5dc544e1f5
After updating windeps.zip, it appears that Windows' build was
unchanged. As it turns out, cacert.pem is not set for packaging by the
compiler package manifest.
This commit add cacert.pem to the Windows package.
2021-02-24 17:57:19 +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
Andreas Rumpf
b48a32053f
fixes yet another SSL problem on Windows [backport:1.2] ( #17167 )
2021-02-24 10:12:47 +01:00
flywind
47c078e29c
use single backtick ( #17166 )
2021-02-23 21:05:39 -08: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
74a8f23801
document type bound operators ( #17063 )
...
* document type bound rountines
* address comments
* Update doc/manual.rst
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-02-23 13:52:20 +01:00
Timothee Cour
5d95137ce0
remove tests/deps/ ( #17132 )
...
* remove tests/deps/
* fix tests
* fix tests/manyloc/keineschweine/lib/zlib_helpers.nim
* fixup
2021-02-23 13:31:53 +01:00
Timothee Cour
b1a3651ae4
fix UnusedImport for nim c compiler/nim ( #17152 )
2021-02-23 10:40:40 +01:00
Saem Ghani
7c2ac98880
Fixes #17039 - ldObj checks node/nodeAddr access ( #17123 )
...
Checked field expressions, such as an object variant field access results in
occasionally broken address analysis crashing the VM. This guard added here
mimics guarded access in ldObjAddr as well. This is to prevent a crash, while a
fix is devised.
2021-02-23 09:02:06 +01:00
Danil Yarantsev
4e619a6bea
A few rst doc fixes ( #17151 )
...
* Fix a couple of rst formatting issues
* no need for the extra space
2021-02-23 08:59:13 +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
Saem Ghani
2aba116bbc
when statements branches exit early ( #17143 )
...
When statement branches exit early outside of nimvm. In nimvm it seems that all
sides of the branches must be evaluated as the code gen happens at a later
stage, this remains intact.
2021-02-22 12:27:23 +01:00
konsumlamm
05711d95e0
Add example for pattern matching on options ( #17120 )
...
* Add example for pattern matching on options
* Use code-block
* Apply suggestions
* Use block comments
* Fix example
2021-02-22 11:16:15 +01:00
Timothee Cour
ef5303114c
fix prelude regression refs #16238 : include prelude doesn't interfere with nim doc ( #17111 )
...
* fix bug1 from #16238 nim doc now works with include prelude
* fix for windows
* fixup
2021-02-22 11:10:34 +01:00
flywind
f07a072691
[JS + docs] improve std/monotimes module ( #17103 )
2021-02-22 11:09:25 +01:00
Timothee Cour
55a33e1664
testament: support disabled:osx as alias to disabled:macosx ( #17124 )
2021-02-22 11:01:15 +01:00