Commit Graph

1666 Commits

Author SHA1 Message Date
n5m
d721f5ceca fix syntax in macros documentation (#16604) 2021-01-06 03:23:59 +01:00
Federico Ceratto
e67059a03a Add short description on GC (#16535) 2021-01-01 18:36:20 +01:00
flywind
4a479f4a6e update contributing.rst (#16530)
* update docs

* Apply suggestions from code review

* Update doc/contributing.rst
2021-01-01 18:33:35 +01:00
flywind
732419ae90 improve examples in manual (#16497)
* improve examples in manual

* Update doc/manual.rst

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update tests/cpp/ttemplatetype.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-12-29 13:44:48 +01:00
Alexander Ivanov
672dc5cd87 Nil type check implementation (#15287)
* Nil checking
* Enable current older not nil checking again, run new checking only under flag, skip our test
* Enable tests, work on try/except and bugs, fix notnil tests

* Enable strictNotNil tests (currently with lowercase category) and add some expected output
* Work on try/except/finally: still some things unclear and a lot of code can raise out of try
* Fix the notnil build by going back to the old version of a test which I shouldn't have changed

* Fix test : use action compile
* Work on mutation and aliasing: not finished
* Render var parititions graph, try to understand it, fix a nilcheck if bug
* Rebase, progress on working with partitions
* Improve time logic
* Fix some bugs, use graph indices instead of symbol in nil map
* Fix bugs, test simpler ident aliasing for now, support two mutation levels
* Support ContentMutation and ReAssignment: for now just detect possible re assignment for var parameters of calls
* Enable several simple passing tests
* Cleanup a bit, fix condition/branch infix-related bug
* Remove some files, address some comments by Araq
* Use internalError and no quit for now
* Separate tests with expected warnings and with expected ok, fix a bug with if with a single branch related to copyMap
* Fix new data structures, bugs: make tests pass, disable some for now
* Work on fixing errors with non-sym nodes, aliasing: tests fail
* Work on alias support: simple set-based logic, todo more tests and ref sets?
* Use ref sets: TODO can we think of handle seq-s similar to varpartitions' Araq ones
* Handle defers in one place, stop raising in reverse to make an async test compile with strictNotNil, add a commented out test
* Dot expressions: call/reassignment. Other refactorings and distinct, SeqOfDistinct support. Checkout an older varpartitions
* Work on field tracking
* Backup : trying to fix bugs when running some stdlib stuff for running an async test
* Start a section about strict not nil checking in experimental manual
* Fix experimental strict not nil manual section and move it to another file based on Araq feedback
* Fix unstructured flow and double warning problems, fix manual, cleanup
* Fix if/elif/else : take in account structure according to Araq feedback
* Refactor a bit
* Work on bracket expr support, re-enable tests, clarify in manual/tests/implementation static index support for now
* Work on compiling stdlib and compiler with strictNotNil
* Small fixes to the manual for strictNotNil
* Fix idgen for strict check nil rebase
* Enable some simple tests, remove old stuff, comment out code/print
* Copy the original varpartitions source instead of my changes
* Remove some files
2020-12-29 10:31:11 +01:00
Andrey Makarov
2bdc479622 RST: implement admonitions (#16438) 2020-12-27 11:16:12 +01:00
treeform
626c2bc658 Add docs for nnkHiddenStdConv (#16408)
Add it to devel branch this time. I hope this works.
2020-12-27 10:45:30 +01:00
flywind
b57df6d0b3 Don't use unittest.suite and unittest.test (#16464) 2020-12-27 10:15:57 +01:00
Code Hz
90dbb6f3fb removing out T from docs since it no longer working (#16378) [backport]
* remove `out T` from docs

see https://github.com/nim-lang/Nim/issues/16131

* remove `out T` in title
* remove entire paragraph
2020-12-18 10:40:43 +01:00
Maurizio Tomasi
3b963a8150 Add note about minimum Node.js version (#16370)
Fix the error message
2020-12-16 16:05:59 +00:00
Saem Ghani
9ef7c01820 Syntax (RST) fix Internals of the Compiler (#16341)
'Rebuilding the Compiler' and a few other sections required syntax fixes:
* new lines before and after lists to fix rendering
* use internal reference instead of Markdown style link
2020-12-15 14:57:11 +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
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
Andrey Makarov
6877e0c8a3 RST tables: fix latex col number; allow less than three of = (#16040) 2020-12-04 08:50:17 +01:00
ee7
629b22e3d5 styleCheck: Fix error for sugar and std/with (#16176)
With this commit, we no longer see an error if we pass
`--styleCheck:error` when compiling a file that contains `import sugar`
or `import std/with`.

The problem was that those modules (and only those modules) import
`std/private/underscored_calls`, which contained a styleCheck issue:
its spelling of `nnkArgList` didn't match the `nnkArglist` spelling in
`macros.nim`.

This commit fixes the issue by renaming `nnkArgList` to `nnkArglist`
repo-wide. The other way around would be a breaking change for code that
used `nnkArglist` and `--styleCheck:error`.

Fixes: #16174
2020-12-02 20:48:16 +01:00
ihlec
5c23ba7545 fixed article duplication typos (#16216) 2020-12-02 09:15:29 +01:00
Timothee Cour
13b1b19a83 remove all mentions of doc2, jsondoc2 (except 1 mentioning the alias) (#15683) 2020-11-26 11:54:18 -08:00
Miran
1ad7e4f30b fix #16047 (#16066) 2020-11-20 03:31:06 -08:00
Timothee Cour
44442520bc fix numbering in contributing.rst (#16042) 2020-11-18 19:41:01 -08:00
Timothee Cour
bf8421a2fc contributing docs: always mentioned referenced issues in PR body (#16038) 2020-11-18 23:29:32 +01:00
Timothee Cour
50d035b789 defer: improve manual, clarify difference wrt try/finally (#16010) 2020-11-17 08:40:17 +01:00
Juan Carlos
1b9f37c6dc https://github.com/nim-lang/Nim/pull/15968/files#r523468677 2020-11-14 19:57:06 -03:00
Juan Carlos
c56a6133bb Fix #15806 2020-11-14 15:45:13 -03:00
Juan Carlos
9ab1a86b5b Fix #15806 2020-11-14 15:43:31 -03:00
Juan Carlos
3cebae492e Fix #15806 2020-11-14 15:39:03 -03:00
Juan Carlos
d0dda9efab Fix #15806 2020-11-14 15:31:59 -03:00
Andreas Rumpf
1978b91202 [docs minor]add some tips to intern.rst (#15967)
* [docs minor]add some tips yo intern.rst

* minor
2020-11-14 13:00:06 +01:00
flywind
bfa387d384 minor 2020-11-14 18:51:05 +08:00
flywind
5af798c21b [docs minor]add some tips yo intern.rst 2020-11-14 18:47:17 +08:00
Timothee Cour
96930b9cae targets: use cpp instead of c++ everywhere (was by far the most common) (#15961) 2020-11-14 10:08:15 +01:00
flywind
4663319bf5 follow #8463 #14157 and document cstring literals modification is not allowed (#15878)
* follow #8463 #14157 and document cstring literals
* Update doc/manual.rst

Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-11-12 15:28:45 +01:00
narimiran
f02c7542fc nimdoc: items of ordered lists now have numbers instead of circles 2020-11-11 15:59:41 +01:00
narimiran
b831033db6 remove codeowners [ci skip] 2020-11-11 14:02:35 +01:00
Timothee Cour
c1664f93b0 new: nim -e:cmd to run a command directly; also fixes #15731 (#15687)
* new: `nim -i cmd`
* rename -i to -e (for eval); consistent with majority of other programing languages
* `nim e -e:cmd` now works; bugfix: `echo cmd | nim e -` now works
* honor --betterRun
* address comments
* --eval alias for -e (replaces undocumented --eval which was a noop)
* --eval now defaults to e (nimscript) instead of r
* address comment: remove -e, only keep --eval
* address comment
* fixup
* Update compiler/nimconf.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-11-09 16:07:22 +01:00
Aethylia
53eca459f1 Added [:T] syntax explanation to generics tutorial. (#15890)
* Added [:T] syntax explanation to generics tutorial.

* Update doc/tut2.rst

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

* Update doc/tut2.rst

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

* Made second generics example runnable and added test line.

* Update doc/tut2.rst

* Update doc/tut2.rst

* Update doc/tut2.rst

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-11-09 14:14:06 +01:00
n5m
3bff12b966 improve Testament docs (#15881)
* fix mentions of recursive test discovery

* document that {.fatal.} pragmas cannot be caught
2020-11-09 12:20:55 +01:00
n5m
3be404af04 include example of error-marked copy proc (#15886)
* include example of error-marked copy proc

* Update destructors.rst
2020-11-09 11:45:43 +01:00
flywind
5828620d47 uint and uint64 is Ordinal type since nim 1.0.0 (#15873) 2020-11-07 07:58:52 +00:00
Ivan Bobev
3c85aa9e53 Make {.requiresInit.} to work for distinct types (#15869)
Make `requiresInit` pragma to work for distinct types in addition to
objects. Tagging of distinct types with `requiresInit` pragma was
already supported, but its impact wasn't applied. Now its behavior when
applied on distinct types is as follows.

Given the following distinct type definitions:

  ```nim
  type
    DistinctObject {.requiresInit, borrow: `.`.} = distinct MyObject
    DistinctString {.requiresInit.} = distinct string
  ```

The following code blocks will fail to compile:

  ```nim
  var foo: DistinctFoo
  foo.x = "test"
  doAssert foo.x == "test"
  ```

  ```nim
  var s: DistinctString
  s = "test"
  doAssert s == "test"
  ```

But these ones will compile successfully:

  ```nim
  let foo = DistinctFoo(Foo(x: "test"))
  doAssert foo.x == "test"
  ```

  ```nim
  let s = "test"
  doAssert s == "test"
  ```
2020-11-06 18:56:09 +00:00
Andreas Rumpf
3aab6a409d micro improvements (#15849) 2020-11-05 14:56:44 +01:00
c-blake
f17555770e Clarify the sense in which Nim supports recursive iterators in the (#15834)
manual, the tutorial, and the `tbintree` test.
2020-11-04 16:56:22 +01:00
flywind
b0e26d8fbf remove iup from stdlib in contrast to #15828 (#15830)
* remove iup from stdlib

* Update changelog.md
2020-11-03 20:43:51 +01:00
Clyybber
1eb4a38a50 Typos 2020-10-31 17:47:09 +01:00
n5m
bcb30566fc improve public Testament docs (#15710)
* improve glob docs

* punctuation

* move spec descriptions above example

notably, change the description of timeout to reference seconds, not microseconds

* document nimout

* document sortoutput

* explain the action options
2020-10-31 17:45:14 +01:00
Yanis Zafirópulos
0cae8ef2ca Massive documentation fixes + copy editing (#15747) 2020-10-29 10:33:47 +01:00
Tim Smith
485d4ff802 Spelling and Grammer fixes (#15719)
Co-authored-by: Tim Smith <tim.smith.hdg@gmail.com>
Co-authored-by: Miran <narimiran@disroot.org>
2020-10-28 17:56:56 +01:00
Xavier Noria
25955440df Document implicit return values from procedures (#15738) 2020-10-27 07:27:02 +01:00
Yanis Zafirópulos
ae8eb1ec3d Copy editing (#15733)
* Minor fixes

* Minor fixes

* Minor fixes

* Minor fixes
2020-10-26 13:47:33 -04:00
Miran
d8a6b0b04e [backport: 1.4] Better linebreaks (#15658) 2020-10-22 12:16:19 +02:00
Gampol T
b2f51e2950 Fix #13609 (#15567)
* add documentation that discardable pragma cannot use on template

* Update doc/manual.rst

Co-authored-by: Euan <euantorano@users.noreply.github.com>

* Update doc/manual.rst

Co-authored-by: Euan <euantorano@users.noreply.github.com>

Co-authored-by: Euan <euantorano@users.noreply.github.com>
2020-10-21 23:40:45 -04:00