Commit Graph

19437 Commits

Author SHA1 Message Date
Timothee Cour
565e07a993 enable VM tracing in user code via {.define(nimVmTrace).} (#18244)
* enable VM tracing in user code via  `{.define(nimVmTrace).}`

* add vmutils.vmTrace

* add vmTrace
2021-06-24 11:55:31 +02:00
Andrey Makarov
0c8d3ae985 rst: allow comment to continue on second line (#18338) 2021-06-24 10:28:28 +02:00
Timothee Cour
55c1953f63 fix #18334: handle path with spaces on windows during bootstrap (#18337) 2021-06-24 00:58:11 -07:00
Timothee Cour
f258e4e70c fix #18332: XDeclaredButNotUsed hints now in deterministic order (#18336) 2021-06-24 08:31:55 +02:00
Andreas Rumpf
0f91b67f5c fixes #18326 (#18335)
* fixes #18326

* make tests green again
2021-06-23 23:31:17 +02:00
flywind
496bd790e1 [std/times]getTime now uses high resolution API on windows (#17901) 2021-06-23 12:33:19 -07:00
Antonis Geralis
63456c6d7f Add some tests (#18333) 2021-06-23 17:56:20 +02:00
Andreas Rumpf
0eee7f5727 OS.nim: style changes (#18331) 2021-06-23 14:39:10 +02:00
Andrey Makarov
9c43f05099 Markdown: allow to end URL with balanced parenthesis (#18321)
* Markdown: allow to end URL with balanced parenthesis

* Update lib/packages/docutils/rst.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* apply suggestion

* remove unnecessary if

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-06-23 07:50:05 +02:00
Timothee Cour
5badeea170 followup #18318: simplify dollarImpl and add a test (#18330) 2021-06-22 21:42:39 -07:00
flywind
9a81e91fa5 merge similar procs regarding digits (#18318) 2021-06-22 17:02:32 +02:00
flywind
037715285c fix #18327 (#18328) 2021-06-22 12:44:56 +02:00
mantielero
d8488e41e8 readAsText supports both Blob and File (fixes #18187) (#18189) 2021-06-21 21:19:11 -07:00
xioren
9d3a813fb9 convert code-blocks to runnableExamples in io (#18315)
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-06-21 18:56:16 -07:00
xioren
16461a8810 add multi type exception catching to manual (#18258) (#18323) 2021-06-21 18:53:35 -07:00
Timothee Cour
d398c558a4 close #13196 now that we have dragonbox (#18316) 2021-06-21 12:51:00 +02:00
flywind
2deb7011f5 fixes #17768 [backport:1.4] (#18317)
* fixes #17768 [backport:1.4]

* tiny
2021-06-21 12:50:47 +02:00
Timothee Cour
ad70a65e0e fix #18310 system.== in vm for NimNode (#18313)
* fix #18310 == in vm

* fixup

* fixup
2021-06-21 09:46:31 +02:00
Timothee Cour
abd21ef213 close #17403; improve docs for tuple (#18312) 2021-06-21 09:45:26 +02:00
Timothee Cour
40ec8184ad followup #17852, disallow all:on for now (#18311) 2021-06-20 22:49:14 +02:00
Andrey Makarov
1b3c0f142d validate rst field for :number-lines:, :status: (#18304) 2021-06-20 20:00:42 +02:00
Timothee Cour
7d5e6b0169 support --hint:all:off --hint:x (ditto with --warnings + friends) (#17852)
* select all hints via `--hint:all:on|off`, etc
* simplify code with setutils
* address comment
2021-06-20 19:52:22 +02:00
Heiko Nickerl
92cb765714 Raise IndexDefect when deleting element at out of bounds index (#17821)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: Heiko Nickerl <mail@hnicke.de>
Co-authored-by: Heiko Nickerl <heiko.nickerl@flipapp.de>
2021-06-20 08:56:33 -07:00
Antonis Geralis
eb0b323f45 Revert "disable pkg manu (#18292)" (#18307)
This reverts commit fc76565574.
2021-06-20 20:51:13 +08:00
flywind
e45b858f04 [std/terminal] improve docs a bit (#18296)
* Revert "add missing import to asynchttpserver's example"

This reverts commit 7ef364a402.

* alternative to #18185

* add std/mutexes

* cvlose #17696

* Revert "add std/mutexes"

This reverts commit 69abc8b649.

* tiny

* test

* improve terminal docs

* follow advice
2021-06-20 09:57:59 +02:00
Timothee Cour
6030e139b5 move {.injectStmt.} to experimental; add a test (#18300)
* move {.injectStmt.} to experimental; add a test

* undocument and deprecat `.injectStmt` but keep its implementation until we have a replacement
2021-06-20 09:51:07 +02:00
Andrey Makarov
590d457631 docgen: move to shared RST state (fix #16990) (#18256)
* docgen: move to shared RST state (fix #16990)

* Update lib/packages/docutils/rst.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

* Update lib/packages/docutils/rst.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

* Update lib/packages/docutils/rst.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

* Update compiler/docgen.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Update compiler/docgen.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Update compiler/docgen.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Update lib/packages/docutils/rst.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* rename `cmdDoc2` to `cmdDoc`

* fix (P)RstSharedState convention

* new style of initialization

* misc suggestions

* 1 more rename

* fix a regression

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-06-20 09:50:03 +02:00
Timothee Cour
128d21be1c add typetraits.pointerBase to return T in ref T|ptr T (#18293)
* add typetraits.deref to return T in ref T|ptr T

* deref => refBase

* refBase=>pointerBase

* [skip ci] address comment
2021-06-20 09:49:18 +02:00
Timothee Cour
ad5063aed1 testutils.assertAll: show correct location on assert failure (#18299) 2021-06-19 14:41:43 -07:00
Timothee Cour
7714ab468a make privateAccess work with generic types and generic instantiations; fix a SIGSEGV (#18260)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-06-19 11:24:46 -07:00
Timothee Cour
5d15bd7b61 refs #18278: do not gag fatal msgs (#18290) 2021-06-18 19:23:27 +02:00
Timothee Cour
5600a62229 strformat.fmt now supports non-literal const strings (#18274)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-06-18 08:57:51 -07:00
Timothee Cour
87cd9b24a3 add more APIs to compiler/debugutils; re-export it (#18243) 2021-06-18 15:52:08 +02:00
j-james
a250481dcd Make the existence of high(type) clearer, especially near subranges (#18286)
* Make the existence of high(type) clearer, especially around subranges

* Use a better example and dry up the wording
2021-06-18 12:10:45 +02:00
Timothee Cour
fc76565574 disable pkg manu (#18292) 2021-06-17 16:38:15 -07:00
Timothee Cour
ef121f3b99 followup #17876: remove annoying enum name clashes in tests/enum/tenum.nim (#18291) 2021-06-17 16:19:16 -07:00
Adrian Veith
5a3456d220 fix for #18284 int32 should be int (#18285)
the var exp was typed as int32 - it should be int since frep expects an int
2021-06-17 11:23:38 +02:00
Timothee Cour
c83ac16671 Renamed -d:nimCompilerStackraceHints to -d:nimCompilerStacktraceHints. (#18283) 2021-06-17 00:17:46 -07:00
Timothee Cour
99411674a6 tests/exception/tsetexceptions.nim not joinable (#18264) 2021-06-17 08:20:33 +02:00
Andreas Rumpf
fd8b79707c Revert "system/excpt: check if the exception is not nil before pop (#18247)" (#18265)
This reverts commit 0adb47aa15.
2021-06-17 08:20:10 +02:00
Andrey Makarov
969cb97c0a PCRE, nimgrep: add limit for buffer size (#18280) 2021-06-17 08:19:52 +02:00
Timothee Cour
49e945ed08 increase backoffDuration to avoid timeouts (#18281) 2021-06-16 23:07:40 -07:00
Timothee Cour
3c854e8c24 followup #16400; use use -d:nimCompilerStackraceHints in more places (#18282) 2021-06-16 23:04:12 -07:00
Clyybber
13b94c0297 Fix doubly typed forward declarations (#18279)
* Add testcase

* Fix testcase

* Fix doubly typed forward decls

* Better fix
2021-06-16 16:40:22 +02:00
flywind
c51680e701 fixes #17696 (#18276) 2021-06-16 11:31:20 +02:00
Clyybber
c5cf21c0c4 Don't report unused hints for consumed AST (#18270)
* Fix #18203

* Add testcase

* Fix testcase

* Fix test
2021-06-16 02:45:05 +02:00
Timothee Cour
d3b27eb63e link stable and devel docs in nim docs (#18272) [backport:1.2] 2021-06-15 23:56:49 +02:00
Timothee Cour
8ef6073543 add test case for pure enum redefinition error within enum (fixed in recent PR) (#18266)
* add test case for pure enum redefinition error within enum (fixed in recent PR)

* remove code duplication

* Revert "remove code duplication" (would require bootstrap >= 1.4)

This reverts commit 3f793874c2.

* fixup
2021-06-15 08:56:10 +02:00
Mark Pointing
e80d7ff0f2 httpclient.nim Fixes #14794 and an issue where content-header is not set on postContent (#18208)
* Fixed missing newline after bound marker in mulipart post (#14794) and a problem where calling postContent with multipart data does not set content-length header.

* Update lib/pure/httpclient.nim

* Added comment outlining the reason for changes to httpclient.nim and added tests to ensure that multipart post has a newline at the end of the body, and that the content-length header is present.

* Fixed typo in comments.

* Removed redundant blank lines in thttpclient_standalone.nim.

Co-authored-by: Mark Pointing <mark@futurepoint.com.au>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-06-14 19:29:23 +02:00
Clyybber
8c42f5be02 Small scope refactoring (#18263)
* Small scope refactoring

* Add test for #10251

* Add inline where appropriate
2021-06-14 19:19:58 +02:00