Commit Graph

8623 Commits

Author SHA1 Message Date
Jasper Jenkins
122751aa52 add nnkMacroDef to RoutineNodes (#13676) 2020-03-17 23:41:07 +01:00
Andreas Rumpf
fe7b1dfb2a rewritten goto based exception handling; much cleaner implementation;… (#13677)
* rewritten goto based exception handling; much cleaner implementation; fixes #13668
2020-03-17 23:18:43 +01:00
Araq
b737bb4be0 fixes a bug for 'dup' and 'with'; they can now handle nested statement lists that can result from macros 2020-03-17 18:00:11 +01:00
Andreas Rumpf
955b31a7d9 fixes #13654 2020-03-16 23:00:43 +01:00
Araq
b9b53b6ca1 fixes #13645 2020-03-16 16:24:50 +01:00
Timothee Cour
6e0c06f50e fix #13218: avoid some irrelevant warnings for nim doc,rst2html,--app:lib, + other fixes (#13550)
* fix #13218: avoid some irrelevant warnings for nim doc,rst2html
* suppress warnRedefinitionOfLabel for nim doc
* lots of fixes for UnusedImport warnings
2020-03-13 20:42:41 +01:00
Andreas Rumpf
a6682de004 catchable defects (#13626)
* allow defects to be caught even for --exceptions:goto (WIP)
* implemented the new --panics:on|off switch; refs https://github.com/nim-lang/RFCs/issues/180
* new implementation for integer overflow checking
* produce a warning if a user-defined exception type inherits from Exception directly
* applied Timothee's suggestions; improved the documentation and replace the term 'checked runtime check' by 'panic'
* fixes #13627
* don't inherit from Exception directly
2020-03-12 23:44:33 +01:00
Miran
14b2354b7d rename lenTuple and lenVarargs (#13639)
* rename 'lenTuple' to 'tupleLen'

Rationale:
`lenTuple` is a tuple consisting of lengths (e.g. `(1, 5, 0)`),
`tupleLen` is a length of a tuple (e.g. `tupleLen((1, 5, 0) == 3`)

* rename 'lenVarargs' to 'varargsLen'

The same rationale as a previous commit. Consistency.
2020-03-12 20:07:02 +01:00
genotrance
bbc231f8e0 Fix #12676 (#13634) 2020-03-12 08:53:11 +01:00
Kaushal Modi
64995db4fd unicode.split: Fix the splitting when a Rune separator is used [backport] (#13629)
* unicode.split: Fix the splitting when a Rune separator is used [backport]

- Fixes https://github.com/nim-lang/Nim/issues/13628
- Ref https://irclogs.nim-lang.org/11-03-2020.html#20:01:34

* unicode.split: Remove the sepLen based logic.. resulted in wrong jumps
2020-03-12 00:41:45 +01:00
treeform
f2c7152770 Add more JS stuff to dom.nim (#13483)
* Add more JS stuff to dom.nim

* Make all links to docs doc comments.

* Fix minor textContent * space.

* Remove Selection object.

* More work on docs.

* Fixing links.

* Made the links be "see <docs>".
2020-03-11 23:24:56 +00:00
Miran
70bd41dae0 fix #13310, Deque misbehaves on VM (#13625)
* fix #13310, Deque misbehaves on VM
* use 'when nimVM'
2020-03-11 17:30:36 +01:00
Timothee Cour
281e02fc79 fixes #13558: toDateTime buggy on 29th, 30th and 31th of each month; breaking change: do not use now to compute result, was undocumented and non-sensical (#13565) 2020-03-11 09:47:34 +01:00
Araq
3aed8ff432 fixes async regression 2020-03-11 09:26:57 +01:00
Araq
861a5340fe fixes #13519 2020-03-11 09:26:57 +01:00
Arne Döring
f95eef99a9 add expectIdent to macros (#12778)
* add expectIdent to macros

* apply feedback

* Update lib/core/macros.nim

Co-Authored-By: Clyybber <darkmine956@gmail.com>

* Update texpectIdent2.nim

* Update texpectIdent1.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-03-11 08:27:31 +01:00
めぐみ発動機 (isVowel / GreenWing)
8e3a349561 fixed to jsonArrayEnd comment. (#13624)
typo: start → end
2020-03-11 08:26:10 +01:00
Arne Döring
2f557652d4 fix operators containing percent for VM usage (#13536)
* fixes #13513
* merge tarithmetics in tarithm
2020-03-11 01:01:25 +01:00
Araq
3b7b017798 fixes #13607 2020-03-10 16:01:13 +01:00
Araq
9e2bce2a8c hotfix: make --useVersion:1.0 work 2020-03-10 16:01:13 +01:00
Miran
4aecc6b346 fix #12508, unaligned access on sparc64 (#13594) 2020-03-09 14:08:50 +01:00
Andreas Rumpf
dc94c81cb0 fixes #13605 (#13611) 2020-03-09 13:13:54 +01:00
Juan Carlos
6a5b3811e7 Add isValidFilename (#13561)
* Add os.isValidFilename

* Add os.isValidFilename

* Peer Review Feedbacks https://github.com/nim-lang/Nim/pull/13561#discussion_r388013139

* Peer Review Feedbacks https://github.com/nim-lang/Nim/pull/13561#issuecomment-595259568

* Add since to const

* Update the documentation comment

* Update the changelog

* Update lib/pure/os.nim

Co-Authored-By: Dominik Picheta <dominikpicheta@googlemail.com>

* Update lib/pure/os.nim

Co-Authored-By: Dominik Picheta <dominikpicheta@googlemail.com>

* Peer Review Feedbacks, Add more Tests

Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
2020-03-07 14:10:22 +00:00
Zed
e056298ceb Implement file streaming for httpclient's MultipartData (#12982)
* Add `uploadFile` to POST files by streaming them

* Use constant for \c\L

* Formatting

* Remove uploadFile

* Implement MultipartData file streaming

* Remove unnecessary var annotations

* Call string on TaintedStrings

Fixes #12789

* Move cl constant to httpcore

* Fix `request` inconsistencies

* Update documentaion

* Clean up

* Skip multipart formatting when there's 0 entries

* Remove extraneous `cl` from multipart formatting

* Update MultipartData `$` to match old behaviour

* Update comment

* Address comments
2020-03-06 18:55:45 +00:00
Andrea Ferretti
7ae0811818 Fix #13573 and #13574 (#13575)
* Fix https://github.com/nim-lang/Nim/issues/13573 and https://github.com/nim-lang/Nim/issues/13574

* Restored asynchttpserver
2020-03-06 18:38:56 +00:00
Dominik Picheta
ec8a17cc86 Revert broken asynchttpserver FutureStream additions.
As discussed in #13394, these changes cannot work. Reverted via

```
git revert --no-commit 5bf571f061
git revert --no-commit abd660c407
git revert --no-commit 955465e5f4
git commit
```
2020-03-06 11:52:30 +01:00
Andreas Rumpf
cb0f7c5d9e Removed simpleGetOrDefault (#13590) 2020-03-05 21:03:39 +01:00
Andreas Rumpf
62c113ebc7 fix #13579 joinPath("/foo/", "../a") is now /a (#13586) 2020-03-05 15:31:22 +01:00
Andreas Rumpf
a0eca75182 sink parameter inference for types that have destructors (#13544)
* ensure capitalize doesn't take an inferred sink parameter

* sink parameter inference: first version, for now disabled. Changed that sink parameters can be consumed multiple times in order to adhere to our spec.

* sink inference can now be disabled with .nosinks; sometimes for proc type interop this is required

* fixes yet another critical DFA bug

* better implementation that also understands if expressions etc

* document sink parameter inference and allow for global disabling
2020-03-04 14:28:53 +01:00
Andreas Rumpf
614fb7567c std/compilesettings implementation (#13584)
* Implement compileSetting() and compileSettingSeq()
* Change from magic to vmop
* better design for querySetting

Co-authored-by: genotrance <dev@genotrance.com>
2020-03-04 13:46:42 +01:00
genotrance
f8175688a3 Fix docgen snippet numbering (#13507) 2020-03-03 20:52:16 +01:00
Arne Döring
eb42f38088 Remove dead magics (#13551) 2020-03-03 12:42:43 +01:00
Timothee Cour
451b724c40 make genericParams support static[T] generic params (#13433)
* make genericParams support static[T] generic params

* WrapStatic => StaticParam
2020-03-02 18:05:14 +01:00
Timothee Cour
22d1ba4be7 fixes #13543 and added times.isLeapDay (#13547) 2020-03-01 21:56:20 +01:00
solo989
e84e01cb8c Update pegs.nim to work at compiletime. No range errors. (#13459) 2020-02-27 11:08:57 +01:00
Timothee Cour
6a0e87eb38 cleanup Ordinal (#13501) 2020-02-27 10:43:13 +01:00
Timothee Cour
42dad3a836 tables/sharedtables/intsets/etc: fix #13496, #13504, #13505; add lots of tests (#13498) [backport]
* fix #13496 handle tombstones
* add test
* more tests
* fix #13504; add SharedTable tests
* fix #https://github.com/nim-lang/Nim/issues/13505 intsets.missingOrExcl silently gave wrong results sometimes
* add test for tintsets
2020-02-26 22:07:09 +01:00
Andreas Rumpf
d55bbefdcc added operateOn to sugar.nim to give Nim the chaining mechanism it de… (#13092)
* implemented the with stdlib module as specified in https://github.com/nim-lang/RFCs/issues/193
* change sugar.outplace to sugar.dup according to https://github.com/nim-lang/RFCs/issues/193
* changelog update
2020-02-26 20:36:06 +01:00
Kaushal Modi
f091b5a0ee xmltree: Make indentation consistent with any num of children nodes (#13482)
Ref: https://forum.nim-lang.org/t/5972
2020-02-26 11:41:44 +01:00
Timothee Cour
0c312ad898 fix #13455 ; joinPath(a,b) now honors trailing slashes in b (or a if b = "") (#13467)
* fix #13455 ; joinPath(a,b) now honors trailing slashes in b (or a if b = "")
* fix test windows
2020-02-26 11:25:27 +01:00
Juan Carlos
94b0d6bb63 Documentation staticRead maximum file size limits (#13485) 2020-02-26 10:01:23 +01:00
hlaaftana
84e78b4ffc Minor doc change in macros, future -> sugar (#13475) [ci skip] 2020-02-24 09:57:15 +01:00
Andrey Makarov
3dad130034 fix 3 minor bugs in joinPath (see #13455) (#13462) [backport] 2020-02-23 20:22:46 +01:00
Timothee Cour
a43583f9c8 relativePath("foo", "foo") is now ".", not "" (#13452) 2020-02-22 09:07:53 +01:00
hlaaftana
1276e386fe Consider proc as a pointer type in options (#13460)
* Consider proc as a pointer type in options

* Add version annotation for SomePointer having proc in options

* Log procs as pointers for options in changelog
2020-02-21 23:14:55 +01:00
Andreas Rumpf
0d219d2c67 fixes #13457 (#13458) 2020-02-21 21:06:41 +01:00
Timothee Cour
e05aca8734 make unzip faster: seq[i]=val can be 7X faster than seq.add(elem) (#13448) 2020-02-21 17:26:52 +01:00
Araq
1d90d9816b fixes #13444 2020-02-21 16:58:30 +01:00
Kaushal Modi
bb777fef76 Add sequtils.unzip to complement sequtils.zip (#13429) 2020-02-20 19:15:34 +01:00
Clyybber
87dd19453b Remove testutils (#13435) [backport] 2020-02-19 23:02:08 +01:00