summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* Make `random.rand` work with `Ordinal` (#20043)Amjad Ben Hedhili2022-07-162-6/+10
| | | | | | | * Make `random.rand` work with `Ordinal` * Add changelog entry * It's fine to cast to char
* make AsyncSocket.getPeerAddr work ; fix #15022 (#20038)David Krause2022-07-161-0/+2
| | | Signed-off-by: David Krause <enthus1ast@users.noreply.github.com>
* Use module actual file instead of PSym.info (#19956)Ivan Yonchovski2022-07-152-12/+25
| | | After this you can do goto module from module import
* Implement type command (#19944)Ivan Yonchovski2022-07-154-3/+47
| | | | | | | | | | | * Implement type command - this will be mapped to textDocument/typeDefinition in LSP protocol. It will be very useful for `nim` in particular because typically most of the time the type is inferred. * Update nimsuggest/nimsuggest.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Improve Markdown code blocks & start moving docs to Markdown style (#19954)Andrey Makarov2022-07-1547-126/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add additional parameters parsing (other implementations will just ignore them). E.g. if in RST we have: .. code:: nim :test: "nim c $1" ... then in Markdown that will be: ```nim test="nim c $1" ... ``` - implement Markdown interpretation of additional indentation which is less than 4 spaces (>=4 spaces is a code block but it's not implemented yet). RST interpretes it as quoted block, for Markdown it's just normal paragraphs. - add separate `md2html` and `md2tex` commands. This is to separate Markdown behavior in cases when it diverges w.r.t. RST significantly — most conspicously like in the case of additional indentation above, and also currently the contradicting inline rule of Markdown is also turned on only in `md2html` and `md2tex`. **Rationale:** mixing Markdown and RST arbitrarily is a way to nowhere, we need to provide a way to fix the particular behavior. Note that still all commands have **both** Markdown and RST features **enabled**. In this PR `*.nim` files can be processed only in Markdown mode, while `md2html` is for `*.md` files and `rst2html` for `*.rst` files. - rename `*.rst` files to `.*md` as our current default behavior is already Markdown-ish - convert code blocks in `docgen.rst` to Markdown style as an example. Other code blocks will be converted in the follow-up PRs - fix indentation inside Markdown code blocks — additional indentation is preserved there - allow more than 3 backticks open/close blocks (tildas \~ are still not allowed to avoid conflict with RST adornment headings) see also https://github.com/nim-lang/RFCs/issues/355 - better error messages - (other) fix a bug that admonitions cannot be used in sandbox mode; fix annoying warning on line 2711
* fix #20002 (#20004)metagn2022-07-152-1/+9
| | | | | | While this fix seems innocent, this unlocks the hidden behavior of method calls not being able to call gensym'ed routines inside templates.
* [Orc] fixes "streams.readDataStr segafaults" when accepting a string ↵flywind2022-07-152-0/+15
| | | | | literal (#20019) [backport] fixes streams.readDataStr accept a string literal
* Change `styleCheck` to ignore foreign packages (#19822)quantimnot2022-07-1416-108/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change `styleCheck` to ignore foreign packages * Symbols from foreign packages are now ignored. * Fixed `styleCheck` violations in `compiler` package. * Added symbol ownership to custom annotation pragmas. * Minor refactors to cleanup style check callsites. * Minor internal documentation of reasons why a symbol isn't checked. Style violations were fixed in the compiler after thet were exposed by the changes. The compiler wouldn't compile otherwise. Symbol ownership for custom pragma annotations is needed for checking the annotation's style. A NPE was raised otherwise. Fixes #10201 See also nim-lang/RFCs#456 * Fix a misunderstanding about excluding field style checks I had refactored the callsites of `styleCheckUse` to apply the DRY principle, but I misunderstood the field access handling in a template as a general case. This corrects it. * Fix some `styleCheck` violations in `compiler/evalffi` The violations were exposed in CI when the compiler was built with libffi. * Removed some uneeded transitionary code * Add changelog entry Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* fixes #20015; document `shallowCopy` does a deep copy with ARC/ORC (#20025)flywind2022-07-141-0/+2
|
* Add sink and lent annotations to the critbits module (#20021)silent-observer2022-07-141-8/+8
| | | | | | | | | * Add sink and lent to critbits * Remove lent for pairs I guess lent doesn't work well inside tuples * Remove lent from template in critbits Apparently this also doesn't work, because some checks failed
* use pull_request_target (#20020)flywind2022-07-131-1/+1
|
* fix #20012 (#20013)Daniel Clarke2022-07-132-1/+16
| | | | | | | * replace gcc asm with __asm__ and add a test * update test case to specify gcc or clang and not cpp Co-authored-by: daniel <danielclarke@wearepopgun.com>
* Add #19406 changes to changelog (#20011)metagn2022-07-121-2/+6
|
* fix #18735; genDepend broken for duplicate module names in separate folders ↵flywind2022-07-122-8/+52
| | | | (#19988)
* allow dots in defined() (#20010)metagn2022-07-123-3/+33
| | | | | | | * allow dots in defined() refs https://github.com/nim-lang/RFCs/issues/181 * mention accents in older versions
* try to optimize hot spots for orc-booting compiler (#20001)flywind2022-07-121-5/+13
| | | | | | | | | | | | | | | * optimize hot spots fro orc-booting compiler * remove GC_ref * minor * remove comments * Revert "minor" This reverts commit 4965a190a2d6457044faa1442795e55bdad57602. * emulate cursor
* fix github script failure (#20006)flywind2022-07-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * yaml * pub * redo * let's comment * now action * newly * code name * build * ready * remove submodule * build * modify name * fix * rephrase * trigger when PR is merged * fix CI failure
* tracking the memory usage of orc-booting compiler for each commit (#19941)flywind2022-07-112-0/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * yaml * pub * redo * let's comment * now action * newly * code name * build * ready * remove submodule * build * modify name * fix * rephrase * trigger when PR is merged
* Fix nested finally handling in closureiters [backport] (#19933)Tanguy2022-07-112-6/+100
| | | | | | | | | | | | | | | * Fix nested finally handling in closureiters * Fix CI * review comment * third time the charm * Update compiler/closureiters.nim Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* Fixes Compilation error with --app:lib (#19965)Juan M Gómez2022-07-101-1/+1
| | | | Fixes Compilation error with --app:lib when a module tries to pull os.paramStr on posix by throwing a runtime exception instead. More details here: #19964
* remove `when declared(cache)`; cache is always there (#19991)flywind2022-07-101-9/+6
|
* update section regarding `std/assertions` in changelog (#19992)flywind2022-07-091-1/+1
| | | Update changelog.md
* removed caching logic; saves 400MB for an ORC booting compiler (#19989)Andreas Rumpf2022-07-091-8/+1
|
* sysrand: fix syscall signature [backport] (#19982)Jacek Sieka2022-07-071-4/+3
| | | | | sysrand: fix syscall signature `syscall` is a `C` varags function
* cache rope when threads are enabled (#19981)flywind2022-07-071-6/+5
| | | | | * cache rope * add threadvar
* default threads on (#19368)flywind2022-07-0610-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Fixes return values of execCmd on macos (#19963)Daniel Clarke2022-07-052-1/+14
| | | | | | | * Fixes return values of execCmd on macos * update tests to use existing structure Co-authored-by: daniel <danielclarke@wearepopgun.com>
* rename gc to mm (#19971)flywind2022-07-051-1/+1
|
* Fixing `nimRawSetJmp` for vcc and clangcl on Windows (#19959)rockcavera2022-07-042-24/+33
| | | | | | | | | | | | | * fix vcc rawsetjmp * changing `_longjmp()` to `longjmp()` and `_setjmp()` to `setjmp()` * fix * fix setjmp to clangcl on Windows * fix genTrySetjmp() to clangcl on Windows
* closes #15897; add testcase (#19961)flywind2022-07-021-0/+11
|
* Allow recursive closure iterators (#19939)Tanguy2022-06-303-5/+16
|
* jsffi add missing braces (#19948)Juan Carlos2022-06-301-10/+10
| | | js codegen add missing whitespaces and braces
* Enable nim-lang to build correctly on illumos-based systems (#19952)Sam Zaydel2022-06-301-1/+1
|
* once C++, always C++ [backport] (#19938)Jacek Sieka2022-06-301-10/+16
| | | | | | | | | | | * once C++, always C++ When using `{.compile: "file.cc".}` in a nim module, even when compiling with `nim c` the C++ compiler should be used - once any C++ file has been compiled, the C++ linker also needs to be used. * more strict C++ check * simplify code
* dec inLoop after exiting the while scope in computeLiveRanges [backport] ↵flywind2022-06-292-1/+46
| | | | | | | (#19918) * dec inLoop after exiting the while scope in computeLiveRanges * add testcase
* closes #11042; add testcase (#19935)flywind2022-06-281-0/+55
| | | close #11042; add testcase
* Fix jsre (#19917)Juan Carlos2022-06-281-3/+5
| | | | | * Fixes for jsre to make it more safe at runtime on some edge cases * https://github.com/nim-lang/Nim/pull/19917#issuecomment-1162692893
* ref #19830; multiple definition of in Nim generated static libraries (#19934)flywind2022-06-271-18/+18
| | | | | * ref #19830; multiple definition of in Nim generated static libraries * fix compile errors
* Fix distinct requiresInit test and manual (#19901)Khaled Hammouda2022-06-222-7/+10
| | | fix distinct test and manual
* [vm]fixes #15974 #12551 #19464 #16020 #16780 #16613 #14553 #19909 #18641 ↵flywind2022-06-224-14/+263
| | | | | | | | | | | | | | | (#19902) [backport] * revert #12217 since the root problem seems to have been fixed; fix #15974;fix #12551; fix #19464 * fix #16020; fix #16780 * fix tests and #16613 * fix #14553 * fix #19909; skip skipRegisterAddr * fix #18641
* [Tiny] correct comment opcDeref => opcLdDeref (#19908)flywind2022-06-211-1/+1
| | | correct comment opcDeref => opcLdDeref
* fix typo in nre.nim (#19915)flintforge2022-06-211-2/+1
| | | | | Update nre.nim typo in proc replace description
* Fix nimRawSetjmp for VCC [backport: 1.2] (#19899)Tanguy2022-06-201-1/+1
|
* Recommend gcc 5.x or newer (#19910)tersec2022-06-201-2/+2
|
* Fixes #19900 (#19906)Jake Leahy2022-06-195-6/+6
| | | Fixed tocRoot placement
* [vm] refactor `stdlib.marshal.load` (#19905)flywind2022-06-191-17/+1
| | | refactor stdlib.marshal.load
* document nimTestsNimdocFixup for rsttester (#19894)flywind2022-06-161-1/+6
|
* Better range error messages (#19867)Tanguy2022-06-152-3/+6
| | | | | | | * Better range error messages * Revert to old behavior for arrays * Small corrections
* Keep the doc sidebar on the screen while scrolling (#19851)JJ2022-06-159-1671/+1462
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [docgen] Group sidebar sections into <details> (open by default) * [docgen] Consistent indentation in generated HTML (this is a boon for working on docgen's html/css output) * [docgen] Move Source/Edit buttons inside main div This makes styling the documentation significantly easier. * [docgen] Somewhat consistent CSS formatting * [docgen] Keep the sidebar onscreen while scrolling * [docgen] Tweak CSS for the sticky sidebar * [docgen] search type=text ==> type=search * [docgen] Update expected doc output * [docgen] Fix Group by Type sidebar placement bug * [docgen] Curse you, whitespace (fix tests) * [docgen] Fix rst2html tests Co-authored-by: sandytypical <43030857+xflywind@users.noreply.github.com>
* Fixes #19883 so genscript works with vcc (#19893)Don-Duong Quach2022-06-151-2/+8
|