Commit graph

9,001 commits

Author SHA1 Message Date
flywind
e2b19bb2de
remove deprecated stuffs from std/times (#18937) 2021-10-13 14:58:31 +02:00
Dominik Picheta
2aa97a228a
Removes deprecated {.injectStmt.}. Fixes #18666 (#18984) 2021-10-13 11:09:45 +02:00
quantimnot
19774a72e7
Fixed strictFuncs support for std/pegs (#18951)
* Fixed `strictFuncs` support for `std/pegs`

Enabled `std/pegs` in the `strictFuncs` import test.

Fixes #18057
Fixes #16892
See #18111

* Rebased from `devel`

* Conditionally compile `std/pegs` in `koch`

This is for supporting `csources` bootstrap.

Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
2021-10-07 12:16:58 +02:00
flywind
f8d6a53227
typo [backport] (#18967) 2021-10-07 12:01:27 +02:00
Andrey Makarov
f03872d99e
rst: minor fixes (#18960) 2021-10-06 13:53:01 +02:00
Andreas Rumpf
f1f1e85ec6
fixes #18954 (#18955) 2021-10-05 12:29:59 +02:00
flywind
e7bac91773
rename nimEnableHashRef [backport] (#18941)
* rename nimEnableHashRef [backport]
* Apply suggestions from code review

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-10-04 21:28:13 +02:00
quantimnot
f017eadc97
Add support for strictEffects to std/pegs (#18949)
* Add support for `strictEffects` to `std/pegs`

* Fixed support of older Nim versions

Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
2021-10-04 21:27:13 +02:00
flywind
45c4332c81
document -d:nimStrictDelete [backport] (#18939) 2021-10-03 07:22:53 +02:00
Andreas Rumpf
e9268b52d9
with this patch :idx: can be used for the index generation for LaTeX (#18946) 2021-10-03 07:21:08 +02:00
flywind
5c4692fad4
rename nimLegacyJsonutilsHoleyEnum [backport] (#18938)
* enable nimPreviewJsonutilsHoleyEnum [backport]

* docuement nimPreviewJsonutilsHoleyEnum
2021-10-01 20:26:29 +02:00
flywind
7577ea9e4c
[std/tempfiles] docs improvement (#18936)
* unify comments

* more
2021-10-01 20:14:10 +02:00
flywind
2aeac26f08
correct licence header (#18935)
* rename licence

* spaces
2021-10-01 13:57:06 +02:00
flywind
6bb32da4ae
[std/tasks] more gcsafe stuffs [backport] (#18926) 2021-09-30 07:46:30 +02:00
Jonas Schubert Erlandsson
f35e9a5752
Adds source to single tags list (#18920) 2021-09-29 18:14:31 +02:00
Timothee Cour
f061971a9b
envPairs works in vm, nims (#18615)
* envPairs works in vm, nims

* fixup
2021-09-29 09:32:39 +02:00
flywind
5eb357f5a2
change comment (#18913) 2021-09-28 06:45:25 +02:00
Aditya Siram
e3b19cbe52
fixes #18878 (#18883) 2021-09-25 14:17:41 +02:00
flywind
4adada0d80
fix a typo (rename temporal to temporary (#18892) [backport] 2021-09-24 16:34:12 +02:00
Andreas Rumpf
5d315ebcc2
ported Nim to proprietary CrossOS [backport] (#18889) 2021-09-24 13:24:41 +02:00
Andreas Rumpf
90a2b5afd8
correct effect tracking for .borrowed procs [backport] (#18882)
* correct effect tracking for .borrowed procs [backport]

* progress

* fix error message in a test

* correctly fix it

Co-authored-by: narimiran <narimiran@disroot.org>
2021-09-23 16:47:24 +02:00
flywind
ee9795f76f
fix #18844 (#18851) 2021-09-20 09:50:20 +02:00
Andreas Rumpf
3241df2a13
fixes #18858 [backport] (#18868)
* fixes #18858 [backport]

* ensure async tests work with --experimental:strictEffects [backport]

* ensure async tests work with --experimental:strictEffects [backport]
2021-09-19 23:35:50 +02:00
flywind
1f68f71ec2
[minor] fix docs (#18834) 2021-09-11 11:33:52 +02:00
flywind
6c2f041368
fix code-block which causes missing docs 2021-09-11 09:25:48 +08:00
Juan Carlos
0ef830577b
distros.foreignDeps made public (#18830)
* Deprecate distros.echoForeignDeps

* Deprecate distros.echoForeignDeps

* https://github.com/nim-lang/Nim/pull/18830#discussion_r705364162

* https://github.com/nim-lang/Nim/pull/18830#discussion_r705364162
2021-09-10 10:20:32 +02:00
flywind
b3ad68edea
remove channels (#18801)
* remove channels

* test
2021-09-04 15:57:02 +02:00
Sven Keller
3c2edd142b
fix for js strict mode (#18799)
* Assignments, which would accidentally create global
variables, instead throw an error in strict mode

* Assignment to a getter-only property

Co-authored-by: Sven Keller <s.keller@cortona.de>
2021-09-04 12:53:02 +02:00
Andreas Rumpf
ac7acd827c
we need something better than warningAsError for effect handling viol… (#18796)
* we need something better than warningAsError for effect handling violations
2021-09-04 08:18:00 +02:00
Jacek Sieka
0635697a89
Document -d:async_backend flag (#18700)
* Document `-d:asyncBackend` flag

Since libraries may want to support multiple async backends, it's useful
to standardize the way this is done, so as to simplify usage of any
async backend within the ecosystem.

A similar text is being added to chronos here:
https://github.com/status-im/nim-chronos/pull/216

See also https://github.com/status-im/nim-chronos/issues/207

* typos, add none

* Update lib/pure/asyncdispatch.nim

* Update lib/pure/asyncdispatch.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-09-03 14:20:57 +02:00
Andreas Rumpf
f46569bafd
fixes #18494 (#18783) 2021-09-02 17:16:03 +02:00
Andreas Rumpf
69cabaa81c
sequtils now support strict effect tracking (#18782) 2021-09-02 14:35:25 +02:00
Tomohiro
7c8ea490a2
Fix initrand to avoid random number sequences overlapping (#18744)
* Fix initrand to avoid random number sequences overlapping

* Minor fix

* Fix compile error on js backend

* Disable new test for js backend

* Minor fix

* tempfiles module uses random.initRand()

* Remove unused module import from lib/std/tempfiles.nim

* Initialize baseState in initRand()

* Run tests/stdlib/trandom.nim from tests/test_nimscript.nims

* baseState is initialized only with sysrand.urandom and quit if failed

* Add comments
2021-09-02 14:12:14 +02:00
Andreas Rumpf
e0ef859130
strict effects (#18777)
* fixes #17369
* megatest is green for --cpu:arm64
* docgen output includes more tags/raises
* implemented 'effectsOf' 
* algorithm.nim: uses new effectsOf annotation
* closes #18376
* closes #17475
* closes #13905
* allow effectsOf: [a, b]
* added a test case
* parameters that are not ours cannot be declared as .effectsOf
* documentation
* manual: added the 'sort' example
* bootstrap with the new better options
2021-09-02 12:10:14 +02:00
konsumlamm
f02de25ca1
Fix #15150 (#18730) 2021-08-31 08:14:05 +02:00
flywind
c07d8da7b9
add missing docs (#18758) 2021-08-29 09:18:54 +02:00
Juan Carlos
041edaa1df
Implement RFC-413 (#18749)
* Implement RFC 413

* Implement RFC 413

* Implement RFC 413

* Implement RFC 413

* https://github.com/nim-lang/Nim/pull/18749#discussion_r696320995

* Update lib/js/dom_extensions.nim

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update lib/js/dom_extensions.nim

* https://github.com/nim-lang/Nim/pull/18749#discussion_r696913310

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-08-26 23:07:54 +02:00
Dankr4d
c70e4040bd
fixes #14511 [backport:1.4] (#18732)
* fixes #14511 [backport:1.4]

Signed-off-by: Dankr4d <dude569@freenet.de>

* Replaced fix with code from alaviss, for better readability, with small
changes.

Signed-off-by: Dankr4d <dude569@freenet.de>

* - Specified output in test.

Signed-off-by: Dankr4d <dude569@freenet.de>

* Replaced case in nnkRecCase with a simpler version, which just adds the
last son.

Signed-off-by: Dankr4d <dude569@freenet.de>

* Update tests/macros/t14511.nim

* Update tests/macros/t14511.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-08-25 17:27:00 +00:00
flywind
9674ff4361
make deprecated message better (#18737) 2021-08-23 11:13:10 -07:00
konsumlamm
2d84f6e7c8
Fix #18718 (#18731)
Update tests
2021-08-23 00:13:39 +02:00
Juan Carlos
e65dc36ddd
Implement RFC-391 (#18585) 2021-08-22 12:32:55 -07:00
flywind
cc08d5c2c6
fix #17898(randomPathName called twice in a row can return the same string on windows) (#18729)
* close #17898

* no need to consider js
2021-08-22 07:40:20 +02:00
flywind
061a9183f7
replace wrt with proper word (#18724)
* what does wrt mean?

* clarify
2021-08-22 06:21:53 +02:00
Tomohiro
373bbd9bb4
Add ceilDiv to math (#18596)
* Use assert in runnableExamples and improve boundary check
* Add more tests for ceilDiv
* Fix comment in ceilDiv
* Calling ceilDiv with int type T such like sizeof(T) > 8 is error
2021-08-19 11:35:40 +02:00
Timothee Cour
394f4ac7bb
improvements to addInt and $ for integer types (#18592)
* improvements to $(SomeInteger) and addInt
* remove mIntToStr, mInt64ToStr
* improvements
* fix tests/pragmas/tinjectstmt.nim; the diff is harmless, cgen code is identical with -d:danger or debug mode
* rm tests/system/tstrmantle.nim
* revert compiler/jsgen.nim for -d:nimVersion140
2021-08-19 11:33:52 +02:00
Emery Hemingway
5fd150b7f7
asynchttpserver: ipv6 support (#18706)
Fix #18705
2021-08-18 14:25:25 +02:00
flywind
901c5ded52
fix #18702(fix parseutils.parseFloat) (#18703) [backport:1.0]
* fix #18702
* Apply suggestions from code review
2021-08-16 15:14:35 +02:00
Juan Carlos
b3e077863a
Documentation only, Terminal (#18696)
Add simple progress bar example to terminal module
2021-08-14 20:51:41 -04:00
Timothee Cour
52cc0a82ca
fix #18692 AsyncHttpServer was hanging because client.close was not called (#18693) 2021-08-14 02:13:30 -07:00
Timothee Cour
b24812df5f
properly fix #10053 ; FieldDefect msg now shows discriminant value + lineinfo, in all backends (c,vm,js) (#11955)
* fix #10053 FieldError for vm

* fixup

* FieldError now also shows runtime value of discriminant

* fix field error reporting in vm

* also report culprit line info in err msg

* fix errors for newruntime 2

* fix for js

* fixup

* PRTEMP4

* works

* works

* works perfect

* refactor

* std/private/repr_impl

* suppport --gc:arc

* cleanup

* refactor

* simplify

* simplify

* simplify

* fixup

* move out compiler.vmgen.genCustom

* fixup

* fixup

* add tests

* revert compiler/debugutils.nim

* simplify reprDiscriminant

* fixup

* lib/std/private/repr_impl.nim -> lib/system/repr_impl.nim

* try to fix D20210812T165220

* honor --declaredlocs

* control toFileLineCol via --declaredlocs
2021-08-13 09:35:48 +02:00