ringabout
2d3e3ab527
closes #6213 #11777 ; add testcase ( #20656 )
2022-10-25 22:39:36 +08: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
Bung
4728c52c78
fix #12094 Use of _ (as var placeholder) inside a template causes XDe… ( #20635 )
...
fix #12094 Use of _ (as var placeholder) inside a template causes XDeclaredButNotUsed
2022-10-25 08:43:14 +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
ringabout
c1343739e1
add type check for default fields ( #20652 )
2022-10-25 07:39:57 +02:00
ringabout
064b72a59c
fixes #1027 ; disallow templates to use ambiguous identifiers ( #20631 )
...
* test qualifiedLookUp in templates
* check later
* add testcase
* add 4errormsg
* Update tests/template/m1027a.nim
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
* Update tests/template/m1027b.nim
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
2022-10-24 21:44:09 +02:00
Andreas Rumpf
48d41ab375
fixes #20645 ( #20646 )
...
* fixes #20645
* better bugfix
2022-10-24 21:41:29 +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
7c2aa53e44
fixes #19278 ; make privateAccess work with generic ref object ( #20640 )
...
* fixes #19278 ; make `privateAccess` work with generic ref object
* fixes
2022-10-24 15:24:51 +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
ringabout
98b2838a30
borrowed procs can have a body now for documentation generation ( #20617 )
...
* borrowed procs can have a body now
* fixes examples
2022-10-24 10:08:39 +02:00
Tanguy
008c3ec76a
Fix double defer with break in closureiterators [backport] ( #20630 )
...
Fix double defer with break in closureiterators
Signed-off-by: Tanguy <tanguy@status.im >
Signed-off-by: Tanguy <tanguy@status.im >
2022-10-24 08:50:48 +02: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
6d8178a93e
closes #4678 ; add testcase ( #20634 )
2022-10-24 09:26:07 +08:00
ringabout
684a862526
closes #4466 ; add testcase ( #20625 )
2022-10-23 16:47:52 +08: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
fa1606c6d6
enable static tests for topenarray ( #20620 )
2022-10-23 00:36:11 +08:00
ringabout
9361938ccd
add std/appdirs ( #20618 )
2022-10-22 13:42:46 +02:00
Jason Beetham
da0a2fdca2
Unpack mSlice tupleconstr for static openarrays ( #20615 )
2022-10-22 06:37:23 +02:00
Andreas Rumpf
0faae4d5e2
fixes a strict case object problem that has been reported on the forum ( #20614 )
2022-10-21 22:46:32 +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
Bung
66cbcaab84
fix #20152 Illegal capture of closure iterator, when should be legal ( #20607 )
2022-10-21 09:59:05 +02:00
Bung
84fab7f39b
fix #19349 incompatible type when mixing float32 and cfloat in generics ( #20551 )
2022-10-21 09:28:18 +02:00
Bung
04c48e3c5b
fix #19426 compile error using when/elif/else and typedesc in template ( #20550 )
2022-10-21 09:26:46 +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
1db25ffcd3
closes #19969 ; add testcase for #19969 #15952 #16306 ( #20610 )
...
closes #19969 ; add testcase
2022-10-21 13:38:40 +08:00
Andreas Rumpf
76763f51aa
implemented strictCaseObjects ( #20608 )
...
* implemented strictCaseObjects
* changelog update
2022-10-21 06:55:52 +02:00
Jason Beetham
4aa67ad7fd
Implemented mSlice on the VM allowing toOpenArray to work at compile time. ( #20586 )
...
* Implemented opcSlice to make 'toOpenArray' work on the VM
* Added nkOpenArray for VM to reduce bodgeness
* Fixed range issues and erraneous comments
* Range check correctly for openArrays in opcLdArr
* Inverted logic for ldArr checking
* vm now supports slicing strings
* Added string tests
* Removed usage of 'nkOpenArray' and redundant operations
* Refactored vmSlice implementation, removing redundant and incorrect code
* Made tuples go throw opcWrObj for field assignment
* All strkinds should be considered for openarrays
2022-10-20 23:59:57 +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
14a2fb71b9
change vm imports after bootstrapping ( #20602 )
2022-10-20 21:47:59 +08:00
ringabout
2ffa230b49
enable ggplotnim ( #20600 )
...
ref https://github.com/Vindaar/ggplotnim/pull/151
ref b1a653b198
2022-10-20 17:11:51 +08: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
ea5dcdbe8f
add measuremancer to important packages ( #20599 )
...
* add measuremancer to important packages
wait for https://github.com/nim-lang/packages/pull/2392
* Update testament/important_packages.nim
* Update testament/important_packages.nim
* Update testament/important_packages.nim
2022-10-20 01:22:53 +08:00
SirOlaf
2f441ac675
[backport] Handle nkOpenSymChoice for nkAccQuoted in considerQuotedIdent ( #20578 )
...
* Handle nkOpenSymChoice for nkAccQuoted in considerQuotedIdent
* Add test
* Update compiler/lookups.nim
Co-authored-by: SirOlaf <a>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2022-10-18 14:56:38 -04: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
ringabout
b13ef07f58
enable telebot ( #20589 )
...
ref https://github.com/ba0f3/telebot.nim/pull/79
ref https://github.com/ba0f3/telebot.nim/releases/tag/2022.10.18
2022-10-18 18:25:26 +08:00
ringabout
15dff4daff
fixes niminst with stricteffects; add testcase for niminst ( #20587 )
...
fixes niminst with stricteffects; add testcase
2022-10-18 08:59:02 +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
Can Lehmann
2102e3b02f
Fix #12517 Allow single branch when nimvm statements ( #20577 )
...
Allow single branch when statements
2022-10-17 08:01:53 +02:00
Andrey Makarov
081dfea746
Fix "imported but not used" warnings ( #20575 )
2022-10-16 20:24:16 +02:00
ringabout
0bacdf5fdf
fixes #20515 ; base method requires explicit {.gcsafe.} to be GC-safe ( #20574 )
...
* fixes #20515 ; base requires explicit `{.gcsafe.}` to be GC-safe
* add tests
2022-10-16 13:20:05 +02:00
ringabout
619d6c318c
enable glob ( #20573 )
...
ref 5cc3310437
2022-10-16 09:52:19 +08:00
Antonis Geralis
ed26156c99
atomicInc global alloc counters ( #20571 )
2022-10-16 01:07:22 +02:00