Commit Graph

8623 Commits

Author SHA1 Message Date
Christopher Dunn
c6ceefea6d Fix a problem for long symlinks in conda (#15908) [backport]
* d8c80ea69d (diff-e1d8e552330911f9f779f85b6f2c00a15e790dcc3fbb3b28f5da1d660a30c5b8)
2020-11-12 09:32:38 +01:00
Timothee Cour
e5db5316c2 doAssertRaises improvements; nimscript supports except Exception as e (#15765)
* doAssertRaises now correctly handles foreign exceptions; now shows which exception is raised on mismatch
* nimscript now handles `Exception as e`
* remove catch-all doAssertRaises overload from this PR

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-11-12 09:25:41 +01:00
Bung
826e62953f fix #12726 Cannot take the compile-time sizeof Atomic types (#15928)
* fix #12726 Cannot take the compile-time sizeof Atomic types

* fix for arch 32
2020-11-12 09:16:40 +01:00
ee7
42c434fa3d Docs(strutils): Fix broken links (#15912)
The `dedent` and `unindent` links were introduced by commit d67c5cb751
(#15264).
2020-11-11 10:37:14 +08:00
Miran
bbe49a14ae Correct all eggs (#15906)
* "eg" is a misspelled "egg", "e.g." is "exempli gratia"
* Also, "ie" is "i.e.".
2020-11-10 21:53:25 +01:00
flywind
b38f0403fd fix #12471 (#15901)
* fix #12471

* add testcase

* fix

* test nimdoc is tricky

* Delete t12471.nim
2020-11-10 13:15:16 +01:00
Miran
ee78d76108 rst: add support for markdown tables (#15854)
* rst: add support for markdown tables

* change template into proc

* don't create unnecessary `seq[string]`
2020-11-10 09:41:26 +01:00
Ivan Bobev
d03f24147a Add a macro returning enum items count (#15824)
Add a macro `enumLen` which is used to determine the number of items in
an enumeration type to the `typetraits.nim` module. Also, add unit tests
for it in the `ttypetraits.nim` module.

Related to nimlang/Nim#15824
2020-11-09 10:02:01 +01:00
Luca Guzzon
49f68122e6 Console apps in Windows can raise OSError (#15874)
Console apps in Windows implementation can raise OSError so I've fixed it, see below some examples for reference:
- c07807bedf/lib/pure/terminal.nim (L170)
- c07807bedf/lib/pure/terminal.nim (L178)
- c07807bedf/lib/pure/terminal.nim (L191-L192)
- c07807bedf/lib/pure/terminal.nim (L196-L197)
- ...
2020-11-08 11:51:40 +08:00
flywind
9fd67958b9 follow #11707(add pragmas examples for =>) (#15863) 2020-11-06 11:42:43 +01:00
flywind
218ff27b70 fix #15851 (#15852)
* fix #15851

* {.cast(noSideEffect).}
2020-11-06 11:40:14 +01:00
Clyybber
d1bea1f71f Tiny unittest doc fix 2020-11-05 21:02:14 +01:00
Andreas Rumpf
3aab6a409d micro improvements (#15849) 2020-11-05 14:56:44 +01:00
flywind
adde5ba6b0 document #15618 (#15810)
* document #15618

* Update lib/pure/unittest.nim

* Update lib/pure/unittest.nim

Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>

* Update lib/pure/unittest.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
2020-11-05 14:04:24 +01:00
flywind
c4cc907433 fix adding empty sequence to HTTP headers (#15783)
* fix adding empty sequence to HTTP headers

* add tests
2020-11-05 14:01:28 +01:00
flywind
8e1fa84b0d fix #15663 (#15839) [backport:1.4] 2020-11-05 14:00:49 +01:00
flywind
cae92f670a change non-working example to runnableExamples (#15841) 2020-11-05 13:11:22 +01:00
flywind
7d640e0943 fix #15835 (#15838)
* fix #15835

* add tests
2020-11-04 01:24:40 -05:00
flywind
b0e26d8fbf remove iup from stdlib in contrast to #15828 (#15830)
* remove iup from stdlib

* Update changelog.md
2020-11-03 20:43:51 +01:00
flywind
75dc69417a fix deprecated messages regarding high (#15832) 2020-11-03 16:31:16 +01:00
cooldome
d62f3627aa EnumUtils, speed up findStr in compiler (#15777)
* add parseEnumRange
* fix runnable example
* update changelog
* use parseEnumRange in compiler
* reorganise code
* add changelog, make single normalizer argument
2020-11-03 16:26:16 +01:00
Miran
c243639979 ioutils are moved to fusion (#15822) 2020-11-02 16:52:54 +01:00
Timothee Cour
235e4930ab simplify toHex (#15821) 2020-11-02 14:48:36 +01:00
Andreas Rumpf
dfd8a83f35 fixes #15804 (#15820)
* fixes #15804

* fix the existing test

* add the testcase for #15804

Co-authored-by: narimiran <narimiran@disroot.org>
2020-11-02 14:17:09 +01:00
flywind
eb429988cd fixes #15594 (#15819) 2020-11-02 14:16:33 +01:00
Regis Caillaud
6fa82a5b3a Handle BLOB column type in SQLite as binary data (#15681)
* Fixed not handling blob correctly in sqlite
* Fixed setLen commented by mistake
* Added binary example as db_sqlite doc
* Added tests for sqlite binary data
2020-11-02 13:02:55 +01:00
flywind
4fe56b56ce more clear (#15812) 2020-11-02 13:01:19 +01:00
Thomas Tay
5298366f86 Update tables documentation (#15807)
Added a case where a user might use mgetOrPut and create an accidental
copy of a seq.
2020-11-02 10:33:16 +01:00
flywind
919593395c fix #15815 (#15817) 2020-11-02 10:22:26 +01:00
flywind
8115b655e7 support par expression as checkpoint (#15802) 2020-10-31 09:05:01 +00:00
Clyybber
7364794fed Grammar fixes 2020-10-30 16:00:37 +01:00
Miran
ec059240b0 promote collect macro as a map+filter replacement (#15788)
* promote `collect` macro as a map+filter replacement

* Update lib/pure/collections/sequtils.nim
2020-10-30 10:12:01 +01:00
Miran
c0fdc8b215 fix toHex - make it work with int literals (#15770) 2020-10-30 10:04:53 +01:00
Antonis Geralis
c274d9aed6 add approxequal (#15766)
* add approxequal

* Address review comments, tests that pass

* more wikipedia links [ci skip]

* forgot since

Co-authored-by: b3liever <b3liever@yandex.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-10-30 09:56:28 +01:00
Antonis Geralis
912d8f80ad Fix doc comment for sumKbn (#15769)
Co-authored-by: b3liever <b3liever@yandex.com>
2020-10-29 17:54:28 +01:00
Andreas Rumpf
87a60c1b28 fixes #15413 (#15768)
* fixes #15413

* better hide it properly

* see if this makes our list of important packages happy
2020-10-29 17:32:56 +01:00
Antonis Geralis
53d9902347 Make default state public (#15763)
* Make default state public

* Address review comments

Co-authored-by: b3liever <b3liever@yandex.com>
2020-10-29 11:14:22 +01:00
Antonis Geralis
94e2b9e837 Make newObjUninit proc to adhere to its name (#15764)
Co-authored-by: b3liever <b3liever@yandex.com>
2020-10-28 17:54:42 +01:00
cooldome
0956a99537 ARC now capable of custom extra alignment. Ref, closure and seq support. (#15697) 2020-10-28 14:00:49 +01:00
narimiran
b13fb9ddb8 fix #15750 2020-10-28 10:20:18 +01:00
shirleyquirk
218acfe367 fixes #10456,#12928 issues when chaining templates to sortedByIt (#15734)
* update c_malloc's to csize_t 

fix for broken --os:ios

* I'm an idiot sorry

* Create talgorithm.nim

* workaround for #10456

I don't understand the intricacies of how lambdalifting and template expansions interact with lent, so i don't know how to fix the real problem, but this sidesteps whatever issue that is.

* working test, use typeof rather than auto
2020-10-27 12:38:46 +00:00
Regis Caillaud
12143d90c8 Add C function dup and dup2 posix to system/io (#15675)
* * Add handle to dup and dup2 posix as duplicate and duplicateTo in std/ioutils.
* Added small test & changelog entry

* Fixed import in tioutils
removed when isMainModule

* * Nest test inside block. Rename proc var -> let in captureStdout
* Renamed tmpfile to iotuils.txt
* Added block: # duplicate, duplicateTo
* Improved docstring
* Clean non-idiomatic code
* Added runnable examples

* rm 2 trailing space in expected output

* Made syntax prettier

* Runnable example: file in getTempDir()

* Tmp -> Temp

* Fixed runnableExamples on windows
2020-10-27 08:52:40 +01:00
Juan Carlos
3a69f14621 Documentation only iup (#15732)
* ReSync with Devel

* ReSync

* Add Examples for IUP, based from official doc
2020-10-26 13:49:01 -04:00
Danil Yarantsev
b2740f5c63 Add support to the latest LibreSSL version (#15715) [backport:1.2] [backport:1.4] 2020-10-26 11:03:44 +01:00
Juan Carlos
e284445e51 Fix Prelude (#15714)
* ReSync with Devel

* Fix prelude for JS target

* ReSync devel

* Fix prelude for JS target
2020-10-26 10:36:12 +01:00
Andreas Rumpf
226595515c explicit ID generation for easier IC (#15559)
* refactoring: idents don't need inheritance
* refactoring: adding an IdGenerator (part 1)
* refactoring: adding an IdGenerator (part 2)
* refactoring: adding an IdGenerator (part 3)
* refactoring: adding an IdGenerator (part 4)
* refactoring: adding an IdGenerator (part 5)
* refactoring: adding an IdGenerator (part 5)
* IdGenerator must be a ref type; hello world works again
* make bootstrapping work again
* progress: add back the 'exactReplica' ideas
* added back the missing exactReplica hacks
* make tcompilerapi work again
* make important packages green
* attempt to fix the build for 32 bit machines (probably need a better solution here)
2020-10-25 08:50:47 +01:00
rockcavera
7252a50fef fix #15698 (#15699)
* fix in the net.`$` to print zeros that are not in the compressed group

* Update lib/pure/net.nim

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

* Update net.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-10-25 08:29:57 +01:00
Clyybber
01a62320f0 Fix #12410 (#15685)
* Fix #12410, big thanks to @pmetras for this fix

* Add testcase
2020-10-23 03:26:50 +02:00
Andreas Rumpf
9a059657ca fixes bootstrapping for any machine that has a Nim already installed [backport:1.4] (#15660) 2020-10-20 21:07:24 +02:00
Dominik Picheta
675cf5760f Fixes compilation for --os:any + --exception:setjmp (#15626) 2020-10-20 16:47:23 +02:00