Commit Graph

1506 Commits

Author SHA1 Message Date
Timothee Cour
11a7fa68f6 fix #17159 items(cstring) works in VM (#17160)
* fix #17159 items(cstring) works in VM

* improve test coverage tests/stdlib/tcstring.nim; add helpers: whenRuntimeJs, whenVMorJs

* document items(cstring)

* address comments
2021-02-24 14:01:06 +01:00
Timothee Cour
c274e67198 add enumutils.items for sparse enums, typetraits.SomeSparseEnum (#17080)
* add enumutils.items for enum with holes
* changelog
* ref in lib.rst
* use `type SomeSparseEnum* = (not Ordinal) and enum` instead of concept
* address comment: rename back to enum with holes
2021-02-23 20:25:35 +01:00
Danil Yarantsev
4e619a6bea A few rst doc fixes (#17151)
* Fix a couple of rst formatting issues

* no need for the extra space
2021-02-23 08:59:13 +01:00
Timothee Cour
ce7caec4b3 add io.readChars overload (simpler, less error prone) (#16044)
* add simpler to use readChars overload

* use new readChars overload

* Update lib/wrappers/openssl.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: flywind <xzsflywind@gmail.com>
2021-02-22 20:13:08 +01:00
flywind
70ec17eede use single backtick (#17133) 2021-02-21 00:27:39 -08:00
Andrey Makarov
d1fec552d0 stricter checks for RST headlines (#17089) 2021-02-20 18:01:45 +01:00
alaviss
ccc0667c29 system/excpt: let the OS handle termination on signal (#16712) 2021-02-19 00:29:21 -08:00
flywind
cd274a5ac9 fix stringify unsigned integer in JS and JS VM (#17086)
* fix js unsigned integer

* better
2021-02-18 20:13:52 +01:00
Timothee Cour
31bb67a309 add -d:nimStrictMode in CI to keep code from regressing; fixes ConvFromXtoItselfNotNeeded, UnusedImport notes (#16764) 2021-02-17 19:30:09 +01:00
Andreas Rumpf
f32ffb6ed8 fixes #17033 [backport:1.4] (#17061)
* fixes #17033 [backport:1.4]

* make test robust against stdlib gensym things

* cleanup assertions.nim to make topt_no_cursor easier to get right
2021-02-17 11:00:03 +01:00
Timothee Cour
b9994925f5 remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 (#16918)
* nimNoArrayToCstringConversion deadcode
* nimbabel deadcode
* nimHasalignOf deadcode
* nimvarargstyped deadcode
* nimhygiene deadcode
* nimNewTypedesc deadcode
* nimlocks deadcode
* nimHasCppDefine deadcode
* nimHasRunnableExamples deadcode
* nimHasNilChecks deadcode
* nimSymKind deadcode
* minor macros refactoring
* nimVmEqIdent deadcode
* nimNoNil deadcode
* nimNoZeroTerminator deadcode
* nimHasSymOwnerInMacro deadcode
* nimVmExportFixed deadcode
* nimNewRuntime deadcode
* nimAshr deadcode
* nimUncheckedArrayTyp deadcode
* nimHasTypeof deadcode
* nimErrorProcCanHaveBody deadcode
* nimHasHotCodeReloading deadcode
* nimHasSignatureHashInMacro deadcode
* nimHasDefault deadcode
* nimMacrosSizealignof deadcode
2021-02-17 09:32:36 +01:00
Andreas Rumpf
e463a67c74 don't introduce 'dispose', use '=dispose', fixes #17003 [backport:1.4] (#17062) 2021-02-17 00:07:37 +01:00
flywind
a03ec067da better getTempDir (#16914)
* better getTempDir

* fix comments

* better

* address comments

* use uint32
2021-02-15 19:39:03 +01:00
hlaaftana
81533a0014 [backport:1.4] JS cstring null fixes (#16979)
* [backport:1.4] JS cstring null fixes
* fix JS move string
* make it look cleaner
2021-02-11 17:04:32 +01:00
konsumlamm
d4f7f1d8f3 Improve documentation for assertions (#16988)
* Improve documentation for assertions

* Apply suggestions

Fix tests/assert/tassert_c.nim

* Use runnableExamples

* Move runnableExamples to module scope
2021-02-11 07:21:27 +01:00
flywind
f140c92409 fix some warnings (#16952) 2021-02-08 13:50:15 +01:00
flywind
d447c0fe3f use typeof instead type (#16962) 2021-02-08 09:46:07 +01:00
Clyybber
2b2836fc9d Fix link to switch 2021-02-04 14:40:32 +01:00
Clyybber
cccf219ceb Allow strings for -- in config.nims (#16934) 2021-02-04 13:59:55 +01:00
flywind
777888fdea add widestrs.newWideCString overload (#16860) 2021-02-01 20:16:50 +01:00
flywind
4e1e231e29 fix floats slice (#16853)
* see whether it breaks

* fix

* fix

* minor

* fix

* add enum

* use Ordinal types

* fix tests

* fix

* another style

* fix remainning cases
2021-01-29 12:26:36 +01:00
flywind
5f5a8aa5c6 remove unused warning (#16809) 2021-01-24 17:14:21 -08:00
Timothee Cour
18b983d7e3 addQuitProc => addExitProc (#16765) 2021-01-22 19:51:11 +01:00
Juan Carlos
78a99587a4 Deprecate TaintedString (#15423)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
2021-01-15 18:56:38 -08:00
Timothee Cour
52cf728001 followup for #16717: minimized example + improved comment (#16721) 2021-01-15 01:09:58 +01:00
flywind
ef9027c290 fix #16706 (#16717) [backport:1.4] 2021-01-14 16:52:00 +01:00
Andreas Rumpf
6317e4004d make --gc:arc --exceptions:quirky work again [backport:1.4] (#16583)
* make --gc:arc --exceptions:quirky work again [backport:1.4]

* fixes #16404 [backport:1.4]
2021-01-04 19:44:50 +01:00
flywind
9531afac48 fix #16499 (#16514) 2021-01-04 18:27:58 +01:00
flywind
b42e7c0ef9 make the docs of arithmetics better (#16510)
* fix

* Update lib/system/arithmetics.nim

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

* Apply suggestions from code review

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

* Apply suggestions from code review

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

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2020-12-30 17:30:43 +01:00
flywind
2f4d00fb98 fix #16502 (#16512) 2020-12-30 14:51:17 +01:00
flywind
89a2390f8b fix printing negative zero in JS backend (#16505) 2020-12-29 15:50:22 +01:00
Antonis Geralis
d5a3c2c2da Added cmpMem export (#16484)
* added cmpMem export

* updates

* fix test

* Tiny changelog change

* Add a dot.

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-12-29 13:27:08 +01:00
flywind
3f9a2ebea5 fix nim js cmp fails at CT (#16473) 2020-12-27 10:13:57 +01:00
Jonah Snider
fa1a04188f Avoid creating a holey array in makeNimstrLit for JS target (#16461)
* Avoid creating a holey array in makeNimstrLit
* Use array index instead of push
2020-12-27 09:33:51 +01:00
ee7
297c8e403d styleCheck: Fix some inconsistent identifiers (#16177) 2020-12-21 09:41:56 -08:00
Matt Haggard
23d23ecb08 Make 'echo' raise IOErrors when appropriate (#16367)
* Make 'echo' raise IOError when fwrite/fflush fail

* Fix fwrite return value comparison

* Add test for echo raising error and don't fail to release locks in echo

* Fix exitcode expectation

* Make 'echo' raise IOError on Windows if it fails

* Add nimLegacyEchoNoRaise for prior no-IOError echo behavior

* Use checkErrMaybe template
2020-12-18 10:06:13 +01:00
Andreas Rumpf
868c31e88a fixes #16365 [backport] (#16381) 2020-12-17 23:21:55 +01:00
Elliot Waite
f3d57761ab Fix broken links in docs (#16336)
* Fix broken links in docs

* Fix rand HSlice links
2020-12-14 20:13:12 +01:00
rockcavera
d15f63a0f2 Fix #14259 #15621 (#16322) [backport:1.4]
* IPv6 text representation according to RFC 5952

* Revert IPv6 text representation according to RFC 5952

* fix #14259 #15621

fix #14259 #15621

* Update lib/system/io.nim

* reverted IoHandle removal

* adaptation of types for WinAPI

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-12-12 09:35:18 +01:00
Timothee Cour
bb1c962286 fix partially #13115 (now works for cpp; but still fails for js on openbsd) (#16167)
* fix partially #13115 properly (works for c,js,cpp,vm; still fails for js on openbsd)
* address comment: also test with -d:danger, -d:debug
2020-12-11 10:35:05 +01:00
flywind
9ce2f87a0a clean up old codes (#16284)
* clean up old codes

* fix docs and links

* clean
2020-12-09 12:18:32 +01:00
flywind
1aaa67fc18 [docs minor] remove unicode in docs comments (#16267) 2020-12-06 05:51:29 +01:00
Andreas Rumpf
af7f7726fe ORC: make the adaptive strategy the default in order to fight memory consumption (#16250)
* ORC: make the adaptive strategy the default in order to fight memory consumption

* added missing test case
2020-12-05 23:15:17 +01:00
Andreas Rumpf
edce5897a5 fixes #16214 [backport] (#16252) 2020-12-04 17:47:41 +01:00
flywind
e4e5a0c65a cleanup docs and tests (#16235)
* js module also uses runnableExamples

* cleanup docs and tests
2020-12-03 22:59:17 +01:00
Alf-André Walla
545c406cbe Add 32-bit RISC-V support (#16231) 2020-12-03 17:33:42 +01:00
flywind
b1554cfeb5 better setops docs (#16236)
* js module also uses runnableExamples

* better setops docs

* Update lib/system/setops.nim

* better

* Update lib/system/setops.nim

* Update lib/system/setops.nim

* better

* better
2020-12-03 14:47:44 +01:00
Clyybber
af984a3db9 Fix typo and improve grammar for clamps note 2020-12-02 17:18:51 +01:00
flywind
d2bf0fb43c small style changes and clarify clamp (#16228)
* [docs minor]better comparisons docs

* switch from PRNG to random module

* apply suggestions

* not compile

* Revert "switch from PRNG to random module"

This reverts commit 83b4d8946d.

* small style changes and clarify clamp
2020-12-02 17:06:23 +01:00
flywind
e875f27ee6 [docs minor] better comparisons docs (#16201) 2020-12-02 09:34:34 +01:00