Timothee Cour
e1e8af535e
merge BuildMode into SuccessX, remove code duplication w drnim, add useful info to successx, add gc to compilesettings ( #18252 )
...
* merge BuildMode into SuccessX, add more info
* refactor duplicated with drnim
* fixup
* address comment
2021-06-14 08:51:40 +02:00
Timothee Cour
79ded694d7
avoid re-exporting options from std/wrapnils ( #18222 )
2021-06-10 07:00:34 +02:00
Timothee Cour
9c6259e557
up to 20x faster jsonutils deserialization ( #18183 )
...
* up to 20x faster jsonutils deserialization
* noinline
2021-06-05 09:45:37 +02:00
Timothee Cour
654a20166e
simplify extccomp.nim json logic via jsonutils; fix #18084 ( #18100 )
...
* simplify extccomp.nim json logic via jsonutils
* fix #18084
* simplify further
* workaround for bootstrap that can be removed after updating csources_v1 >= 1.2
2021-06-03 22:29:45 +02:00
Andreas Rumpf
0aa8b793a5
clarify what a 'monotonic' timestamp is ( #18163 )
2021-06-03 16:27:34 +02:00
Timothee Cour
369a7d1246
jsonutils.toJson now serializes JsonNode as is by default ( #18097 )
...
* jsonutils.toJson now serializes JsonNode as is (without deep copy nor treating it as a regular ref object)
* JsonNodeMode
2021-05-31 22:17:52 +02:00
Timothee Cour
7f077a76fe
jsonutils: add customization for toJson via ToJsonOptions; generalize symbolName; add symbolRank ( #18029 )
...
* jsonutils: add customization for toJson via `ToJsonOptions`
* add enumutils.symbolRank
* lookup table implementation for HoleyEnum
* cleanup
* changelog
* fixup
* Update lib/std/jsonutils.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-05-18 15:10:19 +02:00
Timothee Cour
d83b25db1e
fix #18007 : std/json now serializes nan,inf,-inf as strings instead of invalid json ( #18026 )
...
* fix #18007 : std/json now serializes nan,inf,-inf as raw strings instead of invalid json
* fix roundtrip
* fix tests
* fix changelog
* simplify
* add runnableExamples
* fix typo [skip ci]
2021-05-16 23:54:10 +02:00
Andreas Rumpf
3bc625aff1
ORC: progress ( #18000 )
...
* ORC: progress
* ORC: bugfix; don't follow acyclic data even if only at runtime the subtype is marked as acyclic
* progress
* minor style changes
2021-05-12 22:00:37 +02:00
Timothee Cour
1e080eb9b4
jsonutils: handle holey enum as regular enum, via ord ( #17995 )
2021-05-11 22:49:47 +02:00
Timothee Cour
a770c98e27
jsonutils: support set ( #17994 )
2021-05-11 21:09:17 +02:00
Timothee Cour
e60672141a
improve std/tempfiles ( #17920 )
...
* improve std/tempfiles
* fixup
* fix windows
* improve test
* improve runnableExamples and tests
* address comment
2021-05-11 16:35:43 +02:00
Timothee Cour
82996aee3f
misc fixes: remove forceConst (obsolete by static), add more runnableExamples to system ( #17896 )
...
* misc fixes
* add runnableExamples for compileOption
* add runnableExamples for runnableExamples
* move tconsteval => tconst
* cleanup
2021-05-01 07:26:52 +02:00
Timothee Cour
20248a68fd
gitutils: add diffStrings, diffFiles, and use it in testament to compare expected vs gotten ( #17892 )
...
* gitutils: add diffStrings, diffFiles, and use it in testament to compare expected vs gotten
* refactor with createTempDir
* cleanup
* refacotr
* PRTEMP fake test spec changes to show effect of diffStrings
* add runnableExamples for experimental/diff + cross-reference with gitutils
* Revert "PRTEMP fake test spec changes to show effect of diffStrings"
This reverts commit 57dc8d642d .
2021-04-30 11:00:33 +02:00
Timothee Cour
e4db733d80
fix #17888 : remove undefined behavior for posix.open; fix tempfiles.createTempFile ( #17889 )
...
* fix #17888 : remove undefined behavior for posix.open; fix tempfiles.createTempFile
* fix for tests/async/tasyncfile.nim
* hide mode for now
* add notice regarding stability
2021-04-29 13:42:56 +02:00
Timothee Cour
dce0b3b002
refactor all code that builds csources ( #17815 )
...
* refactor all code that builds csources
* fixup
* nim_csourcesDir_v0 + nim_csourcesDir
* remove deprecated, unused scripts from ci/
* reuse nimCsourcesHash in ci
* simplify CI pipelines by reusing nimBuildCsourcesIfNeeded
* simplify ci_docs.yml by reusing nimBuildCsourcesIfNeeded
* cleanup
* use csources_v1 as destination dir
* fixup
* remove pushCsources
* address comment: remove build.sh support for now
* fixup
2021-04-23 11:28:42 +02:00
flywind
c631648cb3
close #9372 add std/tempfiles ( #17361 )
...
* close #9372 add std/tempfile
2021-04-21 15:07:36 +02:00
Andreas Rumpf
a9b62de895
CIs: attempt to use csources_v1 ( #16282 )
...
* CIs: attempt to use csources_v1
* also updated the BSDs
* also updated azure pipelines
* std modules should not itself use the 'std/' import dir...
* compiler has to be careful with std/ for v1 booting
2021-04-21 07:41:33 +02:00
flywind
603af22b7c
[std/tasks]add gcsafe pragmas ( #17799 )
...
* [std/tasks]add gcsafe pragmas
* Update tasks.nim
2021-04-21 11:05:16 +08:00
Clyybber
24abe10aa8
Small privateAccess improvement ( #17786 )
2021-04-19 17:51:00 +02:00
Clyybber
6de5aa1971
Rename = to =copy in stdlib ( #17781 )
2021-04-19 13:16:10 +02:00
Timothee Cour
0a10af5a2c
privateAccess now works with ref | ptr ( #17760 )
2021-04-19 00:15:58 +02:00
Timothee Cour
8161b02897
import foo {.all.} reboot (#17706 )
2021-04-16 09:16:39 +02:00
flywind
44657b78c4
callback cannot be nil ( #17718 )
...
`Task.callback` cannot be nil, we need to raise it at debug and release mode
Situations:
- if users create a Task object without using `toTask` and invoke the Task
- if users already move the Task and invoke the Task
2021-04-14 19:14:14 +02:00
flywind
58f44c8b4e
Update channels.nim ( #17717 )
2021-04-14 16:45:22 +02:00
Timothee Cour
e92c78a9ac
add number literal jsbigints.big ( #17707 )
2021-04-13 09:33:28 +02:00
flywind
f25243140b
add std/tasks ( #17447 )
2021-04-09 11:51:51 +02:00
konsumlamm
9f0f477552
Update sysrand documentation ( #17676 )
...
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-04-08 12:41:43 -05:00
flywind
a807233aeb
fix #17615(runnableExamples silently ignored if placed after some code) ( #17619 )
...
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-04-02 18:26:30 -07:00
Timothee Cour
9abd383a2a
new genAst as replacement for quote do ( #17426 )
...
* new `macros.genAst`: fixes all issues with `quote do`
* add changelog entry
* add workaround for https://github.com/nim-lang/Nim/issues/2465#issuecomment-511076669
* add test for #9607
* add kNoExposeLocalInjects option
* add test case for nested application of genAst
* genAst: automatically call newLit when needed
* allow skipping `{}`: genAst: foo
* add test that shows this fixes #11986
* add examples showing mixin; add examples showing passing types, macros, templates
* move to std/genasts
* improve docs
2021-04-02 13:11:03 +02:00
Timothee Cour
9b67e5c61b
jsonutils: support cstring (including as Table key); improve docs ( #16062 )
...
* jsonutils: support cstring (including as Table key); improve docs
* changelog
* un-disable a test now that #16061 was fixed
2021-03-31 18:24:39 +02:00
Timothee Cour
04520c0ce4
remove std/ prefix from doc/lib.rst now that canonical import is shown in module docs ( #17543 )
...
* remove std/ prefix from doc/lib.rst now that canonical import is shown in module docs
* cleanup top docs for std/sha1
2021-03-29 13:07:14 +02:00
konsumlamm
9e3960e83d
Small doc improvements for std/with ( #17556 )
2021-03-29 12:44:31 +02:00
Timothee Cour
a65189a739
nnkArglist => nnkArgList + special case stylecheck:error ( #17529 )
...
* nnkArglist => nnkArgList
* special case stylecheck:error
2021-03-27 10:28:11 +01:00
flywind
c8dda867f2
close #11330 sets uses optimized countSetBits ( #17334 )
...
* Update lib/pure/bitops.nim
* Update lib/system/sets.nim
* Apply suggestions from code review
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-03-22 00:36:48 +01:00
Timothee Cour
05743bc9f7
improve jsutils docs ( #17421 )
...
* improve jsutils docs
* address comments
2021-03-21 10:35:00 +01:00
konsumlamm
9997b42c35
Use importjs ( #17422 )
2021-03-19 14:22:48 -07:00
flywind
e332c20ba7
follow up #17276 ( #17355 )
...
* improve test coverage for isolation
* a bit better
* rename channels to channels_builtin
* follow up #17276
* fix
* Update lib/std/private/jsutils.nim
2021-03-19 16:54:10 +01:00
flywind
60fc7e986b
fix a typo ( #17417 )
...
* 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
* fix a typo
2021-03-19 21:44:13 +08: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
d5eb658034
fix #17380 ( #17391 )
2021-03-16 07:14:56 +01:00
flywind
51a04a3674
make std/sysrand better ( #17360 )
2021-03-15 14:07:27 +01:00
flywind
686bf3bfc6
clarify the behavior of newChan
...
follow up the advice of `timothee`
2021-03-12 22:18:10 +08: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
flywind
5dff66b35a
fix wrong examples ( #17350 )
...
* fix wrong examples
* Update lib/std/compilesettings.nim
* Update lib/std/compilesettings.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-03-12 07:33:13 +01:00
flywind
d8b5879c7d
clarify the docs of isolation ( #17335 )
...
* improve test coverage for isolation
* a bit better
* clarify the docs of isolation
2021-03-11 14:04:08 +01:00
konsumlamm
9819fb21d8
Use .. warning:: ( #17320 )
2021-03-10 10:39:23 -08: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