summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* closes #20123; remove builds.sr.ht (#20131)ringabout2022-08-033-99/+0
|
* Revert "enable nimPreviewDotLikeOps" (#19919)ringabout2022-08-034-2/+3
| | | | | | | | | * Revert "enable nimPreviewDotLikeOps (#19598)" This reverts commit 6773ffa63d0b3ab8b8894e84ed417f4eaced9122. * add deprecated message Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* Fixed compilation of void closureiters with try stmt (#20138) [backport]Yuriy Glukhov2022-08-032-4/+15
|
* Edits to sections 'Open arrays' and 'varargs'. (#20140)random-bites2022-08-031-6/+6
|
* [Changelog] Add Wider Ascii Chars sets string formatting in strutils.nim ↵Sultan Al Isaiee2022-08-021-0/+1
| | | | | | | | | | | | | | | | | | | (#20137) * Add Wider Ascii Chars sets string formatting in strutils.nim Add Wider Ascii Chars sets for string formatting (#19994) (#20120): - Added `UppercaseLetters`, `LowercaseLetters` The set of UppercaseLetters and lowercase ASCII letters. - Added `PunctuationChars` The set of all ASCII punctuation characters. - Added `PrintableChars` The set of all printable ASCII characters (letters, digits, whitespace, and punctuation characters). * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* prevent cache thrashing (#20129)ringabout2022-08-021-1/+3
| | | | | | | | | | | | * prevent cache thrash Co-authored-by: Charles Blake <cb@cblake.net> * Update lib/pure/random.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Charles Blake <cb@cblake.net> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Fix "Add Wider Ascii Chars sets and func for string formatting" (#20120)Clay Sweetser2022-07-311-3/+3
|
* Add Wider Ascii Chars sets and func for string formatting (#19994)Sultan Al Isaiee2022-07-311-12/+25
| | | | | | | | | | | | | | | | | | | | | * Add more Ascii Chars sets - add UpperCaseLetters set - add LowerCaseLetters set - add Punctuations set - add PrintablesNoWhiteSpace set - add Printables set - add isPunctuationAscii func - add isPrintableAscii func * Omit isPunctuationAscii and isPrintableAscii procs * Apply suggestions for adding Wider Ascii Chars sets Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com> * Update strutils.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* [Doc] Fix some minor markup errors in manual (#20112)quantimnot2022-07-311-8/+9
| | | | | | | * Fix header level for noalias pragma section. * Fix code snippet outside of code block that raised an error with `rst2html`. * Fix broken 'Convertible relation' links that were raising warnings. Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* [ORC] replace threadpool with createThread in the runnableExamples (#20106)ringabout2022-07-311-9/+16
| | | replace threadpool with createThreads in the runnableExamples
* replace the broken link for ORC implementation with a working one (#20105)ringabout2022-07-311-1/+1
|
* Highlight Nim default in Markdown code in .nim (#20110)Andrey Makarov2022-07-314-13/+28
| | | Highlight Nim by default in Markdown code in .nim
* The internal link to koch.rst docs was broken (#20113)Sojin2022-07-311-1/+1
| | | | | Broken Link found for koch.rst docs The Current internal link was broken. Updated with a new link to the same path
* Warn when casting to a larger type (#20103)konsumlamm2022-07-282-8/+12
| | | | | * Warn when casting to a larger type * Revert change to error message to fix CI
* Fixed noinit pragma for closure variables (#20101)Yuriy Glukhov2022-07-282-2/+3
|
* fixes broken CI; bump macOS version to macos-11 (#20098)ringabout2022-07-273-4/+4
| | | | | | | * bump macOS image on Azure CI to macos-11 ##[warning]The macOS-10.15 environment is deprecated, consider switching to macos-11(macos-latest), macos-12 instead. For more details see https://github.com/actions/virtual-environments/issues/5583 * fix CI error
* fixes #20031; uint64 is an ordinal type since 1.0 (#20094)ringabout2022-07-272-1/+12
| | | | | * fixes #20031; uint64 is an ordinal type since 1.0 * Update compiler/semstmts.nim
* remove shallowCopy for ARC/ORC (#20070)ringabout2022-07-2610-30/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | * remove shallowCopy for ARC/ORC * use move * fix * more fixes * typo * Update lib/system.nim * follow * add nodestroy * move * copy string * add a changelog entry Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #20089; remove setPointer since strings/seqs are not pointers with ORC ↵ringabout2022-07-262-2/+22
| | | | | (#20090) fixes #20089; remove setPointer since strings/seqs are not pointers anymore
* clean up and clarify changelog [skip ci] (#20093)metagn2022-07-261-26/+27
|
* .forbids pragma: defining forbidden tags (#20050)Lancer112112022-07-2624-71/+405
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * .forbids pragma: defining illegal effects for proc types This patch intends to define the opposite of the .tags pragma: a way to define effects which are not allowed in a proc. * updated documentation and changelogs for the forbids pragma * renamed notTagEffects to forbiddenEffects * corrected issues of forbids pragma the forbids pragma didn't handle simple restrictions properly and it also had issues with subtyping * removed incorrect character from changelog * added test to cover the interaction of methods and the forbids pragma * covering the interaction of the tags and forbids pragmas * updated manual about the forbids pragma * removed useless statement * corrected the subtyping of proc types using the forbids pragma * updated manual for the forbids pragma * updated documentations for forbids pragma * updated nim docs * updated docs with rsttester.nim * regenerated documentation * updated rst docs * Update changelog.md Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> * updated changelog * corrected typo Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* Markdown code blocks part 2; migrate Nim Manual (#20080)Andrey Makarov2022-07-257-670/+881
| | | | | * Change headings underscored by `~~~` to `###` * Markdown code blocks part 2; migrate Nim Manual
* fix #20067, fix #18976 [backport] (#20069)metagn2022-07-222-1/+31
|
* Use `passc` and `passl` consistently with compiler checking (#20068)tersec2022-07-211-7/+7
|
* Correctly detect major version of GCC (#20059)kraptor2022-07-181-20/+6
| | | | | | | | | | | | | | | We were doing a very poor job detecting the major version of GCC by parsing the output of --version. This patches uses -dumpversion to make this parsing straightforward and it also fixes a bunch of compiling issues on different platforms with custom output for --version switches. For example, openSUSE first line of the output includes the revision number and the parsing that was being done did mix that number with the major version and breaks building the nim compiler (as it doesn't find the 3 dots for an X.Y.Z semver format, hence returning "false"). In this patch, we simply use -dumpversion (which has been at least from 1993, so we are safe :)
* replace shallowcopy with move in ARC/ORC (#20061)flywind2022-07-181-6/+6
|
* niminst: support DESTDIR and quote variables (#20051)Anna2022-07-181-42/+45
| | | | | * niminst: support DESTDIR (fix #9788) * niminst: quote variables
* Improve rand(bool) (#20045)Antonis Geralis2022-07-181-2/+4
| | | | | | | | | | | | | | | | | | | * Improve rand(bool) * Use sign test instead of mod 2 * Use mod 2 again, as it works for js * Use right shift as suggested by the authors of xoroshiro * Update random.nim * General case doesn't need any right shift it was correct to begin with * Update random.nim * add comment Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* epoll: correct mapping [backport] (#20058)Jacek Sieka2022-07-181-5/+14
| | | | | | | * epoll: correct mapping `epoll_data` is a union and `epoll_event` is packed on `amd64` * names
* Fixed typo in std/os doc (#20054)LetThereBeLemons2022-07-181-1/+1
| | | Fixed typo
* fix `pthread_mutex_t` size (#20055)Jacek Sieka2022-07-181-1/+1
|
* Fixed errors in Nim Backend integration docs. (#20046)Don-Duong Quach2022-07-171-2/+3
| | | | | | | | Fixed errors in Nim Backend integration. Section "Nim invocation example from C" NimMain needs a declaration and function declarations have external linkage by default. Also with the order of arguments to gcc with a static lib, maths.c needs to come before the static lib.
* defines the `gcRefc` symbol which allows writing specific code for refc (#20009)flywind2022-07-173-1/+9
| | | | | | | | | | | | | | | | | | * define gcRefc symbols * add comments * add a changelog item * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update changelog.md Co-authored-by: Yardanico <tiberiumk12@gmail.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Yardanico <tiberiumk12@gmail.com>
* Fix typo in line 456 (#20047)Peter Guld Leth2022-07-171-1/+1
|
* Display protocol name in exceptions raised by getProtoByName() (#19808)kraptor2022-07-161-1/+1
|
* Make imports/exports not be a dropdown in sidebar (#19907)Jake Leahy2022-07-163-9/+23
| | | | | | | | | * Don't make a section be a dropdown if it has no child links * - Cleaned up code - Updated tests * Document what the 'if' is checking
* testament: use full test name in skips [backport] (#19937)Jacek Sieka2022-07-161-7/+13
| | | testament: use full test name in skips
* 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
|