Commit Graph

19405 Commits

Author SHA1 Message Date
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
alaviss
0adb47aa15 system/excpt: check if the exception is not nil before pop (#18247)
In CPS we would consume an exception in the except branch by stashing it
into a local then remove the exception from Nim environment so as not to
leak it to other code that would be running before the continuation
continues

However since popCurrentException() assumes that the exception always
exist, removing the exception from an except branch will cause a
SIGSEGV to happen. This commit fixes that.
2021-06-14 18:26:12 +02:00
Federico Ceratto
2d34b1f5bc Enable parallel build in build.sh (#18195)
Add help
2021-06-14 09:30:04 +02:00
Saem Ghani
488acd9d07 fixes #18235 - proc annotation type macro sym leak (#18249)
* fixes #18235 - proc annotation type macro sym leak

- also fixed a typo
- proc annotations guard symbol exports with shadow scopes
- symbol handling is shadow scope aware

* test for exporting an existing unexported sym

this one is for my homie alaviss.

* Special handling not needed in semProcAnnotation

* Testcasing

* [skip ci]  clean-up and add some more comments

* [skip ci] rm trailing whitespace

Co-authored-by: Clyybber <darkmine956@gmail.com>
2021-06-14 09:21:33 +02:00
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
065243dc59 followup #17777: declaredloc field error msgs now work with generics (#18259)
* followup #17777: declaredloc field error msgs now work with generics

* fix tests

* cleanup
2021-06-14 08:21:18 +02:00
Federico Ceratto
a266c54921 Improve httpClient docs on SSL cert verification (#15201)
* Improve httpClient docs on SSL cert verification

Cert verification is enabled by default after CVE-2021-29495

* Update httpclient.nim

Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
2021-06-13 16:50:04 +01:00
Timothee Cour
c871e22da2 fix #7717 roundtrip float to string; fix parseFloat for js (#18248)
* refs #7717 roundtrip float to string
* make parseFloat more correct
* improve float tests
* improve float tests
* cleanup
2021-06-13 07:32:47 +02:00
Timothee Cour
897e50d5fe getType now works with tyInferred (arising from concepts); refs #18220 (#18241)
* getType now works with tyInferred (concepts); refs #18220

* avoid cast

* add more docs
2021-06-12 21:35:12 +02:00
Araq
2ca6169ba1 added a test case ensuring exception inference continues to work 2021-06-11 11:09:18 +02:00
Miran
57609902c4 use more meaningful name than "workaround14447" (#18237) 2021-06-11 10:07:23 +02:00
Timothee Cour
c64d917619 handle tyUserTypeClassInst in addDeclaredLoc (#18236) 2021-06-11 08:36:06 +02:00
flywind
6b97889f44 fix #9437(fix re.replace wrong behaviour) (#17546)
* fix nim js cmp fails at CT

* fix
2021-06-10 18:26:58 +02:00
Andreas Rumpf
f65f760dee fixes #15884 (#18230)
* fixes #15884

* micro optimization
2021-06-10 18:19:20 +02:00
Andreas Rumpf
2ea7287217 view types: spec changes (#18226)
* view types: spec changes

* Update doc/manual_experimental.rst

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

* Update doc/manual_experimental.rst

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

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-06-10 16:49:17 +02:00
Kaushal Modi
3481ff6172 Update nims.rst to reflect that -d:release is now allowed in config.nims (#18221)
`-d:release` and `-d:danger` started working in `config.nims` after df429fa287 .
2021-06-10 14:29:03 +02:00
Fröhlich A
7bf0404dd8 #18216 make moveDir work across partitions on windows (#18223)
* return false if AccessDeniedError in tryMoveFSObject - fixes #18216

* add moveDir & moveFile tests

* rename `isMoveDir` parameter to `isDir`
2021-06-10 14:28:00 +02:00
Timothee Cour
8a9b20579e update changelog for wrapnils (#18228) 2021-06-10 01:27:12 -07:00
Andreas Rumpf
0a4858dc59 fixes #18220 (#18227) 2021-06-10 09:25:51 +02:00
Timothee Cour
79ded694d7 avoid re-exporting options from std/wrapnils (#18222) 2021-06-10 07:00:34 +02:00
Timothee Cour
19918ceb2b update .github/ISSUE_TEMPLATE/bug_report.md, mention PRs, contributing, devel branch (#18224) 2021-06-09 22:46:00 +01:00
Andreas Rumpf
47acc80f4e make strict funcs analysis smarter (#18219)
* make strict funcs analysis smarter: varParam[i] = v is different from varParam[i][] = v
* added a test case
* Update compiler/varpartitions.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>
2021-06-09 17:33:19 +02:00
drtheuns
51ab7ccec1 Fix JS error on index page and detect dark mode (#18191)
* Fix JS error on index page and detect dark mode

The theindex.html page doesn't have a dark mode switch so the main
function will error because `toggleSwitch` is not defined. Checks have
been added to prevent this from happening.

Also add automatic detection of system settings for dark-mode. This
could also be done with pure css, but then the dark mode variable
declarations would have to be duplicated to work with the switch so I
went with this approach.

* Fix nimdoc tests

* Fix rst2html tests
2021-06-07 18:40:09 +02:00
Andreas Rumpf
21f3b8539a fixes #18088 (#18209) 2021-06-07 17:22:35 +02:00
flywind
5bad022d58 alternative to #18185 (#18206) 2021-06-07 15:32:37 +02:00
Bung
429b128632 change mimedb stroe stringtable to orderedtable (#18065)
* change mimedb stroe stringtable to orderedtable

* Update lib/pure/mimetypes.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-06-07 13:57:42 +02:00
Federico Ceratto
2ec52faae5 koch: print help if no command is given (#18199) 2021-06-07 11:44:43 +02:00
slangmgh
e7aa41ff3f fix 18186 with adding importc _umul128 (#18200) 2021-06-07 11:42:32 +02:00
Andrey Makarov
e7816a3e77 update docgen documentation (#18192)
* update docgen documentation

* --fullhelp

* Update doc/docgen.rst

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

* [skip ci] fix typos

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-06-06 09:55:20 +02:00
Timothee Cour
9106ab7db1 make changeDetectedViaJsonBuildInstructions warning less verbose when json file invalid (eg due to spec change) (#18197) 2021-06-06 09:53:22 +02:00
Timothee Cour
b9843b156d fix #18178, set a CI timeout for github action pipelines instead of the 6 hour default (#18179) 2021-06-05 09:47:28 +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
Andrey Makarov
9c0666e0bb rst: remove roSkipPounds option (#18175) 2021-06-05 09:12:37 +02:00