Commit Graph

141 Commits

Author SHA1 Message Date
metagn
b97d603cd0 some test cleanups & category reorganization (#22010)
* clean up some test categories

* mention exact slice issue

* magics into system

* move trangechecks into overflow

* move tmemory to system

* try fix CI

* try fix CI

* final CI fix
2023-06-06 06:54:07 +02:00
Carlo Capocasa
9c2d2773ec Weekday parse/format (replacement) (#21857)
* parsing capability for iso week year

* remove outdated test
2023-05-21 20:12:05 +02:00
metagn
02be212dae clean up SOME pending/xxx/issue link comments (#21826)
* clean up SOME pending/xxx/issue link comments

* great
2023-05-11 10:23:52 +02:00
metagn
380dafcc32 fix iterator equality + add test for proc equality + fix sameType (#21707)
* fix iterator equality + add test also for procs

fixes #21706

* all targets

* and isNil and repr

* separate overloads, fix sameType

* more restricted sameType?

* merge overloads again??

* remove sametype change for now

* fix sameType anyway (CI failure was not related)

---------

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
2023-04-23 17:43:59 +08:00
ringabout
4fa86422c0 stdlib tests now check refc too (#21664)
* stdlib tests now check refc too

* typo

* fixes line numbers

* disable cpp

* do not touch
2023-04-21 15:37:58 +02:00
metagn
f05387045d int64/uint64 as bigint in JS (#21613)
* int64/uint64 as bigint in JS

* fix CI

* convert to compile option

* fix lie

* smaller diff, changelog entry
2023-04-11 21:20:20 +02:00
metagn
16bc546aea remove useVersion (#21626)
test removing useVersion
2023-04-08 11:42:17 +02:00
ringabout
cbf3ed9d92 fixes #21317; 1.6.4 regression; etyBaseIndex should return fat pointers [backport 1.6] (#21320)
fixes #21317; regression; etyBaseIndex should return fat pointers
2023-02-01 07:58:12 +01:00
ringabout
9ba07edb2e build the documentation of official packages (#20986)
* remove db stuffs

* remove punycode

* remove

* fixes script

* add cloner

* patches

* disable

* patch

* fixes external packages

* disable two packages

* preview documentation build

* try again

* fixes URL

* fixes a bug

* simplify

* fixes documentaion

* fixes

* Apply suggestions from code review
2022-12-06 22:37:16 +08:00
metagn
4ca2dcb404 Named arguments in commands + many grammar fixes (#20994)
* Breaking parser changes, implement https://github.com/nim-lang/RFCs/issues/442

Types are separated from expressions and better reflected in the grammar.

* add test

* more accurate grammar

* fix keyword typedescs

* accept expressions in proc argument lists

* CI "fixes"

* fixes

* allow full ref expressions again, adapt old tests

* cleanup, fix some tests

* improve grammar, try and revert semtypes change

* restrict sigil binding to identOrLiteral

* fix, should have caught this immediately

* add changelog entry, fix double not nil bug

* correct grammar

* change section

* fix

* real fix hopefully

* fix test

* support LL(1) for tuples

* make grammar.txt too
2022-12-06 13:11:56 +01:00
ringabout
06cd15663d fixes ptr to cstring warnings[backport] (#20848)
* fix =#13790 ptr char (+friends) should not implicitly convert to cstring

* Apply suggestions from code review

* first round; compiles on windows

* nimPreviewSlimSystem

* conversion is unsafe, cast needed

* fixes more tests

* fixes asyncnet

* another try another error

* last one

* true

* one more

* why bugs didn't show at once

* add `nimPreviewCstringConversion` switch

* typo

* fixes ptr to cstring warnings[backport]

* add fixes

Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
2022-11-16 10:22:51 +01:00
ringabout
723a71bd22 follow up #20109; remove shallow seqs/strings for ORC (#20502)
* remove `shallow` seqs/strings for ORC

* add a changelog item

* change url of DelaunayNim
2022-10-06 07:16:50 +02:00
ringabout
7739e23420 defaults to ORC (#19972)
* defaults to Orc

* bootstrap using refc

* use gc

* init orc defines

* unregister orc

* fix gc

* fix commands

* add prepareMutation for orc

* enable deepcopy for orc

* prepareMutation

* more fixes

* some cases

* bug #20081

* partial fixes

* partial fixes

* fixes command line

* more fixes

* build Nim with refc

* use gc

* more fixes

* rstore

* orc doesn't support threadpool

* more shallowCopy

* more fixes

* fixes unsafeNew

* workarounds

* small

* more fixes

* fixes some megatest

* tcodegenbugs1 refc

* fxies megatest

* build nimble with refc

* workaround tensordsl tests

* replace shallowCopy with move

* fixes action

* workaround

* add todo

* fixes important packages

* unpublic unregisterArcOrc

* fixes cpp

* enable windows

Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
2022-09-23 13:05:05 +02:00
ringabout
12f23d5ae8 fixes nimPreviewSlimSystem; register echoBinSafe for nimPreviewSlimSystem (#20194)
* register echoBinSafe

* add output
2022-08-24 13:32:11 +02:00
flywind
430a179307 default threads on (#19368)
* default threads on

* make rst gcsafe

* ignore threads option for nimscript

* threads off

* use createShared for threads

* test without threads

* avr threds off

* avr threads off

* async threads off

* threads off

* fix ci

* restore option

* make CI pleased

* fix ic tests

* Update config.nims

* add changelog

* Update changelog.md

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

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2022-07-06 13:06:41 +02:00
flywind
4c76f9f152 support useVersion:1.6 (#19601) 2022-03-10 17:01:27 +01:00
flywind
d102b2f54c deprecate unsafeAddr; extend addr (#19373)
* deprecate unsafeAddr; extend addr

addr is now available for all addressable locations, unsafeAddr is deprecated and become an alias for addr

* follow @Vindaar's advice

* change the signature of addr

* unsafeAddr => addr (stdlib)

* Update changelog.md

* unsafeAddr => addr (tests)

* Revert "unsafeAddr => addr (stdlib)"

This reverts commit ab83c99c50.

* doc changes; thanks to @konsumlamm

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

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2022-01-16 11:08:38 +01:00
flywind
9df195ef58 style usages part one (openarray => openArray) (#19321)
* style usages (openArray)

* revert doc changes
2022-01-04 13:29:50 +01:00
Jason Beetham
fa96e56ad0 Fixed object field access of static objects in generics (#19283) [backport] 2021-12-23 07:12:56 +01:00
Kaushal Modi
5fed1c05ce manual: Document the use of static as a proc call (#19084)
* manual: Document the use of `static` as a proc call

Also adds tests.

Fixes https://github.com/nim-lang/Nim/issues/16987 .

* Update doc/manual.rst

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

* Use the "bug #NNNN" comment syntax for consistency

Ref:
https://nim-lang.github.io/Nim/contributing.html#writing-tests-stdlib

> Always refer to a GitHub issue using the following exact syntax: bug
for tooling.

* manual: Undocument usage of foo.static

foo.static and foo.static() are not expected to work.

Ref: https://github.com/nim-lang/Nim/pull/19084/files#r741203578

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-11-03 06:48:30 +01:00
flywind
4d8108046b remove exception (#18906) 2021-10-22 12:15:08 +02:00
Timothee Cour
394f4ac7bb improvements to addInt and $ for integer types (#18592)
* improvements to $(SomeInteger) and addInt
* remove mIntToStr, mInt64ToStr
* improvements
* fix tests/pragmas/tinjectstmt.nim; the diff is harmless, cgen code is identical with -d:danger or debug mode
* rm tests/system/tstrmantle.nim
* revert compiler/jsgen.nim for -d:nimVersion140
2021-08-19 11:33:52 +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
Timothee Cour
b667e288e2 move travis, appveyor, ci.yml.disabled to unmaintained/ (#17828)
* move travis, appveyor, ci.yml.disabled to unmaintained

* update some mentions of travis, appevyor

* fix test
2021-04-24 07:54:31 +02:00
Timothee Cour
42c6eec4ef fix #17749 ignore SIGPIPE signals, fix nim CI #17748 (#17752)
* fix #17749 SIGPIPE

* fix for windows
2021-04-18 15:34:29 +02:00
flywind
e25a487ed6 close #6133 add testcase (#17605)
* close #6133 add testcase

* b
2021-04-01 12:46:47 +02:00
flywind
7c09e0c757 fix #15617(fix compilation failure on -d:useMalloc --gc:none) (#17555)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-03-30 20:15:14 +02:00
flywind
69611ee487 Ref #12700 add testcase (#17096)
* fix js unsigned integer

* better

* ref #12700 add testcase
2021-02-19 14:09:12 +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
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
flywind
2c6f5ae681 fix #16650 (#16660) 2021-01-10 21:51:29 +00:00
flywind
c80261bc00 fix #12311 (#16578) 2021-01-04 10:24:52 +01:00
flywind
73f778e441 follow #16505 move and active tests (#16508)
* fix printing negative zero in JS backend

* move tests
2020-12-30 15:06:50 +01:00
flywind
271f68259b remove some noises in tests (#16448) 2020-12-27 14:45:57 +01:00
Timothee Cour
7e1ae35195 testament: error instead of silently ignore invalid targets; remove pointless alias target vs targets; document matrix; DRY (#16343)
* testament: error instead of silently ignore invalid targets
* s/target/targets/
* fix test; refs #16344
* address comments
* Update testament/specs.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-12-14 10:58:29 +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
flywind
c65f95417a better addInt (#16160)
* better addint
* Update lib/system/strmantle.nim

Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
2020-12-01 20:19:39 +01:00
Timothee Cour
b809562c7c make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec (#16151)
* fix megatest newlines
* still allow missing trailing newline for now but in a more strict way than before
2020-11-28 09:09:31 +01:00
flywind
7848da7abe inc and dec are atomic in JS backend (#16129) 2020-11-25 14:09:03 +01:00
Andreas Rumpf
1fae66e4df better nativestacktrace support; refs #15284; backport [1.2] (#15384)
* nimStackTraceOverride: enable stack traces in exceptions

This is a two-step stack trace collection scheme, because re-raised
exceptions will collect multiple stack traces but use them rarely, when
printing info about an uncaught exception, so it makes sense to only do
the cheap stack unwinding all the time and the relatively expensive
debugging information collection on-demand.

`asyncfutures` implements its own `$` proc for printing
`seq[StackTraceEntry]`, so we have to add the debugging info there, just
like we do for the private `$` proc in `system/excpt`.

* cleaned up PR #15284

Co-authored-by: Ștefan Talpalaru <stefantalpalaru@yahoo.com>
2020-09-22 13:03:24 +02:00
Miran
371b416ac8 fix #14912, make --useVersion:1.0 work again (#14945)
* fix #14912, make `--useVersion:1.0` work again
* a better fix
* add test
2020-07-10 16:44:12 +02:00
Juan Carlos
5d5df4a394 Clean out Deprecated proc (#14797)
* Remove and/or clean out Deprecated 'add' proc for floats
* Update a test
2020-06-29 09:33:07 +02:00
hlaaftana
80c360fceb fix #14350, cstrings in JS init as null (#14355)
* fix #14350, cstrings in JS init as null
2020-05-15 10:07:30 +02:00
Jacek Sieka
7d6cbf290a Error -> Defect for defects (#13908)
* Error -> Defect for defects

The distinction between Error and Defect is subjective,
context-dependent and somewhat arbitrary, so when looking at an
exception, it's hard to guess what it is - this happens often when
looking at a `raises` list _without_ opening the corresponding
definition and digging through layers of inheritance.

With the help of a little consistency in naming, it's at least possible
to start disentangling the two error types and the standard lib can set
a good example here.
2020-04-28 19:56:01 +02:00
Timothee Cour
a3a317b76d $ now works for unsigned intergers with nim js (#14122)
* $(unsigned) now works for js
* move NimMajor+friends closer to NimVersion according as per reviewer feedback
2020-04-27 19:15:17 +02:00
Euan
7828199827 #12103 - CI for OpenBSD (#12105)
* Working on OpenBSD CI
* Condense steps into 2 steps to make output easier to follow.
* Move up one directory after csources build.
* Remove FreeBSD build manifest and add OpenBSD test ignores for coroutines and hot code reloading.
* If runCI fails, run the test results script.
* Add email trigger for build failure
* Remove .git from repository URL
* Disable SFML test on OpenBSD
* Disable tgetaddrinfo on OpenBSD as only UDP and TCP protocols are supported.
* Remove getFilePermissions as it causes CI test failures with NimScript.
* Set clang as cc in nim.cfg and use gmake to build csources.
* Add getCurrentDir to nimscript.
* Remove duplicate getCurrentDir and check for not weirdTarget.
* Add CI badge for OpenBSD.
* Disable tests which allocate lots of memory for OpenBSD.
* Use `CORO_BACKEND_SETJMP` on OpenBSD rather than ucontext.
* Simplify building of koch
* Disable t8657 on OpenBSD. See issue #13760.
* Fix #12142 - tarray_of_channels fails on OpenBSD
* Disable thhtpclient_ssl and tosprocterminate on OpenBSD. These tests can be enabled at a later date after fixing them.
* Install libffi.
* Set path to libc for openbsd.
* Disable tevalffi for now.
* Remove tevalffi.nim.
* Use ncpuonline sysctl rather than ncpu.
* Disable tacceptcloserace and tasynchttpserver on OpenBSD.
* Enable tacceptcloserace and tasynchttpserver.
* Fix #13775 as suggested by @alaviss - use /bin/cat on OpenBSD rather than /bin/sh.
* Enable test on OpenBSD.
* Disable tflowvar on OpenBSD.
2020-04-21 15:05:21 +02:00
Miran
8088633250 faster CIs (#13803)
* ttables: smaller table, 5x speedup

* thavlak: less iterations, less loops; 30% speedup

* tasyncclosestall: shorter timeout; 35% speedup

* gcleak4: less iterations, 2x speedup

* ttimes: remove deprecated stuff

* tdangerisrelease: remove cpp backend, 3x speedup

* tfrexp1: smaller range, 2x speedup

* trtree: fix warnings, less iterations, 6x speedup

* tasyncawait_cyclebreaker: smaller swarm size; 2x speedup

* trealloc: smaller number of iterations; 10x speedup

* towned_binary_tree: less iterations, 4x speedup

* tclosure: remove unused code, less iterations; 2x speedup

* twaitany: less durations; 1.4x speedup

* tasync_misc: less iterations, 2x speedup

* t8535: smaller sleep, 1.5x speedup

* tmanyjoin: smaller sleep, 2x speedup

* t12221: shorter sleeps, removed two slower tests; 1.6x speedup

* tfuturestream: smaller sleep; 1.5x speedup

* growobjcrash: less iterations; 2x speedup

* ttryrecv: smaller sleep; 1.5x speedup

* treusetvar: less threads; 2x speedup

* delete tthreadanalysis2, basically a duplicate of tthreadanalysis

* t7758: less iterations, 1.5x speedup

* tasyncawait: smaller swarm, less messages; 1.5x speedup

* tjsandnativeasync: smaller sleep, 1.5x speedup

* tpendingcheck: smaller sleep, 1.5x speedup

* remove rodfiles test category

* move tseq from its own category to 'collections' category

* remove unneeded tests and helpers from 'assert' category

* stdlib: merge tbitops2 into tbitops

* remove 'trepr2' from 'stdlib' cat

* merge 'tstreams' into one file

* remove 'tinefficient_const_table' from 'ccbugs' cat

* merge 'tcollections_to_string' into 'tcollections'

* tblocking_channel: smaller sleep, small speedup

* tconvexhull: less iterartions; 1.2x speedup

* merge 'tdeepcopy2' into 'tdeepcopy'

* merge 'tdisjoint_slice2' into 'tdisjoint_slice1'

* tmissing_deepcopy: smaller sequence

* tsendtwice: smaller arrays; 5x speedup

* remove 'tindexerrorformatbounds'

* disable multimethod tests

* remove 'gc:none' and 'refc' without 'd:useRealtimeGC' from gc tests

* koch.nim: bootstrap just with '-d:release', no need for 'csource'

* add github workflow for documentation

* testament: no need for 8 sub-second decimals
2020-03-30 13:18:12 +02: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
Timothee Cour
6a0e87eb38 cleanup Ordinal (#13501) 2020-02-27 10:43:13 +01:00