summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* tests/errmsgs/tcall_with_default_arg.nim: sync (#21237)Anna2023-03-011-1/+1
|
* tests: explicitly enable stack traces where needed (#21236)Anna2023-03-014-18/+21
| | | | | * tests/assert/tassert_c.nim: explicitly enable stack traces * tests/errmsgs: explicitly enable stack traces
* tests/stylecheck: make sure necessary hints are enabled (#21240)Anna2023-03-013-8/+6
|
* fixes #10938; fixes #13312; fixes #13918; fixes #20985; always initializes ↵ringabout2023-03-012-2/+56
| | | | | | | | | | | global variables with null values in VM (#21351) * fixes #10938; always initialize global variable in VM * fixes importc vars * there is a pre-existing issue regarding closure types in the VM * add tests
* suggestion for a simple fix for #21279 (#21378)heterodoxic2023-03-011-3/+9
|
* Fix #21452; enable Norm in important packages. (#21455)Constantine Molchanov2023-03-011-1/+1
| | | | | * fix #21452; enable Norm in important packages. * Run test that doesn't require SQLite.
* asyncdispatch: for NuttX, add destructor to clear global dispatcher. (#21432)Century Systems2023-02-282-1/+13
| | | | | | | | | | | | | * asyncdispatch: for NuttX, add destructor to clear global dispatcher using atexit(). Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp> * std: exitprocs: remove "when defined(nuttx)" block. Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp> --------- Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
* Use a cast to suppress KeyError raises (#21451)Antonis Geralis2023-02-281-4/+5
|
* Overrides `=copy` for `PackedSets` (#21417)ringabout2023-02-271-15/+14
|
* Fix typo in sourcemap.nim (#21438)Ikko Eltociear Ashimine2023-02-271-1/+1
| | | seperated -> separated
* fixes #21439; Add tyOpenArray to genTypeInfo. (#21440)Constantine Molchanov2023-02-272-1/+15
| | | | | * fixes #21439; Add tyOpenArray to genTypeInfo. * Add test.
* Add mention of breaking change about `[_]` in generics to changelog (#21437)PhilippMDoerner2023-02-261-0/+7
| | | | | | | | | Add mention of breaking change to changelog As described by #21435 , generic proc declarations making use of `_` as generic parameter are no longer possible. This is a change that was introduced by #21192 . During the debate over if this should be part of the intended spec in #21435 we concluded that it is and thus should be mentioned as a breaking change in the changelogs.
* Fix: nintendoswitch compilation (#21368)Dmitry Arkhipenko2023-02-254-5/+11
| | | | | * Fix: make nintendoswitch someGcc, remove symlink support for nintendoswitch, add getAppFilename for nintendoswitch * Fix: use getApplHeuristic on nintendoswitch
* closes #17864; add a test case (#21434)ringabout2023-02-251-0/+12
|
* Disable threads for os:any (#21425)Francis Thérien2023-02-242-0/+7
|
* fixes #20695; fixes object with distinct defaults and tables (#21428)ringabout2023-02-242-2/+41
|
* fixes #21393 and misc style changes (#21419)Andreas Rumpf2023-02-2411-61/+70
| | | | | | | | | * fixes #21393 and misc style changes * progress --------- Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* Mitigate issues related to compiler options when cross-compiling (#21330)Francis Thérien2023-02-222-4/+8
| | | | | * Document C compiler options config when cross-compiling * Allow empty string to override default
* fixes #19795; fixes #11852; fixes #19974; remove parsing pipeline, Nim now ↵ringabout2023-02-2231-72/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parses the whole module at one time (#21379) * fixes #19795; remove parse pipeline * isScript * fixes nimscriptapi * don't touch reorder * check script * fixes tests * it seems implicit imports of system cause troubles * access the first child of `nkStmtList` * ignore comments * minor messages * perhaps increases hloLoopDetector * the module is a stmtList, which changes the errors * fixes nimdoc * fixes tlinter * fixes nim secret tests * fixes arc_misc * fixes nim secret tests again * safe; fixes one more test * GlobalError is the root cause too * fixes parsing errors * put emit types to the cfsForwardTypes section * fixes #11852; `{.push checks:off}` now works in procs * disable navigator * fixes nimdoc * add tests for JS * fixes nimsuggest
* Fix the TODO portion of recently added `posix_fallocate` on OS X. (#21387)c-blake2023-02-221-2/+17
|
* ioselectors_epoll: for NuttX, limit initial numFD to configured value. (#21421)Century Systems2023-02-222-1/+9
| | | | | | | | | | | | | | | | | ioselectors: ioselectors_epoll: for NuttX, limit initial numFD to configured value. In the NuttX build config, there is a setting called "FS_NEPOLL_DESCRIPTORS". -------- config FS_NEPOLL_DESCRIPTORS int "Maximum number of default epoll descriptors for epoll_create1(2)" default 8 ---help--- The maximum number of default epoll descriptors for epoll_create1(2) -------- For NuttX, change the number of fd arrays allocated by newSelector() to that value. Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
* Fix a couple of small keyword issues. (#21416)Benji York2023-02-221-2/+2
| | | In this section of the manual, "if" should be enclosed in backticks and "elif" should be lower case.
* saves one unnecessary compare which is also a small regression (#21413)ringabout2023-02-211-1/+1
| | | | | saves one unnecessary compare which is also a sall regression follow up https://github.com/nim-lang/Nim/commit/d30c6419a051a815e3fdb354ac79522f17e55bda
* Specify that address is taken when converter takes a var parameter (#21391)Jake Leahy2023-02-212-0/+16
| | | | | | | * Add test case * closes #21247 Add the sfAddrTaken flag to var parameters in converters This allows the JS backend to properly pass the parameter as a fat pointer
* Add `getDataDir` proc (#21408)Ecorous2023-02-211-0/+27
| | | | | | | | | * Add getDataDir() * Update lib/std/private/osappdirs.nim --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Make `Time` work with `std/strformat` (#21409)Jake Leahy2023-02-212-5/+6
| | | | | | | * Add test case * Remove formatValue template for `Time` It didn't handle empty specifier correctly which caused it to be blank with strformat
* Support tuples in nim-gdb (#21410)Jake Leahy2023-02-213-5/+28
| | | | | | | | | * Support for printing tuple types * Add test of printing a tuple * Add support for printing tuples in GDB * Forgot to [skip ci]
* improve invalid module names errors (#21412)ringabout2023-02-211-1/+2
| | | I have seen these questions: "Why I got an invalid module name errors?". To eliminate this kind of questions, We might improve th error messages. Though, the question might evolve into "What is a valid Nim identifier", which should be more searchable on the Internet.
* csources_v2 can build the ORC-booted compiler; building now uses strict mode ↵ringabout2023-02-211-2/+4
| | | | | | | (#21411) * csources_v2 can build the ORC-booted compiler; building now uses strict mode * test booting in refc
* corrects the linkerexe of riscv64 in config (#21292)ringabout2023-02-211-1/+1
|
* NuttX added supports getrlimit(RLIMIT_NOFILE), so remove NuttX specific ↵Century Systems2023-02-213-9/+0
| | | | | | | codes. (#21385) async: NuttX added supports getrlimit(RLIMIT_NOFILE), so remove NuttX-specific codes. Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
* Support new runtime with nim-gdb (#21400)Jake Leahy2023-02-205-308/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for orc strings * Cleaned up testing script Enums now printing properly Merged both old and new strings into the one printer Moving onto sets which seem kinda difficult * Sets working Instead of trying to imitate how Nim represents enums, I just call the dollar proc for each enum value While this runs into problems if the user doesn't call the dollar proc anywhere, I believe its a decent tradeoff I've cleaned up the error message for when it cannot find dollar proc (Might add in proper message on how to fix) * Support sequences V2 runtime seems to have sequences that don't have a len (Guessing its some kind of short seq optimisation?) but I've rolled the implementation into normal sequences since the implementation is practically the same * Clean up test program so it isn't using diff Also don't redirect the first nim compile to /dev/null so that we can check for any compilation errors I found the diff to be annoying to read (Seeing as the test script already performs diffing) * Tables are now supported * Add colours to test output It was getting difficult to tell apart test output from GDB output so I added colour to better tell them apart * Both old and new runtime are working Set exit code in python test script so that this could possibly be added to the CI. Only issue is that it can be flaky (GDB crashes randomly for some reason) * Remove old code that was commented out If I need it later I'll just use git * Remove branch that never runs * Remove the old test output [skip ci]
* closes #1072; add a test case (#21396)ringabout2023-02-191-0/+10
|
* Fix long link commands on macOS (v2) (#21382)Matt Haggard2023-02-171-2/+14
| | | Handle long link commands on macOS with a script, since ar does not support response files
* `std/xmltree` Add the type of the node when the assertion fails (#21383)Jake Leahy2023-02-171-22/+30
| | | | | Print the type of the node when the assertion fails This way the user actually knows what the type was instead of just knowing it failed
* add .replace() with callback to jsre (#21371)Qinsi (James) ZHU2023-02-161-0/+5
|
* Add support for NuttX RTOS. (#21372)Century Systems2023-02-1614-17/+52
| | | | | | | | | | | | | | | | | | | | | | * Add support for NuttX RTOS. Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp> * lib: pure: asyncdispatch: assign to result. Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp> * lib: std: typedthreads: add support for parameters to adjust Thread Stack Size. Like FreeRTOS/Zephyr, add support for following configurations. -d:nimThreadStackSize=xxxxx -d:nimThreadStackGuard=yyyy Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp> --------- Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
* add deprecated warnings for `{.deadcodeelim: on.}` (#21277)ringabout2023-02-161-1/+2
|
* fixes #21360; discarding empty seqs/arrays now raises errors (#21374)ringabout2023-02-163-9/+25
| | | | | * discarding empty seqs now raises errors * the same goes for sets
* Fix `closeHandle` bug, add `setFileSize`, make `resize` work on Windows (#21375)c-blake2023-02-153-47/+92
| | | | | | | | | | | | | | * Add general purpose `setFileSize` (unexported for now). Use to simplify `memfiles.open` as well as make robust (via hard allocation, not merely `ftruncate` address space allocation) on systems with `posix_fallocate`. As part of this, fix a bad `closeHandle` return check bug on Windows and add `MemFile.resize` for Windows now that setFileSize makes that easier. * Adapt existing test to exercise newly portable `MemFile.resize`. * Since Apple has never provided `posix_fallocate`, provide a fallback. This is presently written in terms of `ftruncate`, but it can be improved to use `F_PREALLOCATE` instead, as mentioned in a comment.
* remove legacy code; the first iteration now can build Nim with cpp backend ↵ringabout2023-02-151-5/+1
| | | | (#21373)
* Refines raises list in osproc (#21323)ringabout2023-02-143-22/+23
| | | | | | | | | | | | | | | | | | | | | | * Remove Exception from raises in closeImpl * Update osproc.nim * refine errors * add ValueError * cast raises * refactor raises lists * Update lib/pure/osproc.nim * Update lib/pure/osproc.nim --------- Co-authored-by: Antonis Geralis <43617260+planetis-m@users.noreply.github.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* `std/asyncjs` allow transforming proc types (#21356)Jake Leahy2023-02-142-1/+14
| | | | | * Add test case * Implement JS async transform for nnkProcTy
* This adds `parseutils.parseSize`, an inverse to `strutils.formatSize` (#21349)c-blake2023-02-143-1/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * This adds `parseutils.parseSize`, an inverse to `strutils.formatSize` which has existed since 2017. It is useful for parsing the compiler's own output logs (like SuccessX) or many other scenarios where "human readable" units have been chosen. The doc comment and tests explain accepted syntax in detail. Big units lead to small numbers, often with a fractional part, but we parse into an `int64` since that is what `formatSize` stringifies and this is an inverse over partial function slots. Although metric prefixes z & y for zettabyte & yottabyte are accepted, these will saturate the result at `int64.high` unless the qualified number is a small fraction. This should not be much of a problem until such sizes are common (at which point another overload with the parse result either `float64` or `int128` could be added). Tests avoids `test()` because of a weakly related static: test() failure as mentioned in https://github.com/nim-lang/Nim/pull/21325. This is a more elemental VM failure. As such, it needs its own failure exhibition issue that is a smaller test case. (I am working on that, but unless there is a burning need to `parseSize` at compile-time before run-time it need not hold up this PR.) * This worked with `int` but fails with `int64`. Try for green tests. * Lift 2-result matching into a `checkParseSize` template and format as a table of input & 2 expected outputs which seems nicer and to address https://github.com/nim-lang/Nim/pull/21349#pullrequestreview-1294407679 * Fix (probably) the i386 trouble by using `int64` consistently. * Improve documentation by mentioning saturation. * Improve documentation with `runnableExamples` and a little more detail in the main doc comment based on excellent code review by @juancarlospaco: https://github.com/nim-lang/Nim/pull/21349#pullrequestreview-1294564155 * Address some more @juancarlospaco code review concerns. * Remove a stray space. * Mention milli-bytes in docs to maybe help clarify why wild conventions are so prone to going case-insensitive-metric. * Add some parens.
* allow omitting stmts using `finally` as post expr blocks; make it consistent ↵ringabout2023-02-142-1/+12
| | | | | with `else`, `except` etc. (#21361) allow omitting stmts using `finally` as post expr blocks
* fixes comments about type bound operations (#21365)ringabout2023-02-141-1/+1
|
* Change the default stdlib location for Linux packaging (#21328)Gabriel Huber2023-02-122-12/+17
| | | | | * Correctly evaluate the Nim prefix on Posix * Document new packaging layout
* Adds an extra optional argument to vcc: `vctoolset` Fixes #21335 (#21336)Juan M Gómez2023-02-092-5/+17
|
* megatest now checks refc too (#21341)ringabout2023-02-095-3/+15
| | | | | * megatest now checks refc too * fixes refc
* add `nimib` to important packages (#20697)ringabout2023-02-091-0/+1
| | | | | r Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>