Commit Graph

1955 Commits

Author SHA1 Message Date
metagn
2449c37137 better procvar ambiguity errors, clean up after #20457 (#20932)
* better procvar ambiguity errors, clean up after #20457

fixes #6359, fixes #13849

* only trigger on closedsymchoice again

* new approach

* add manual entry for ambiguous enums too

* add indent [skip ci]

* move to proc
2022-12-01 08:01:13 +01:00
ringabout
17ac8c31bf move smtp to nimble packages (#20953)
* move `smtp` to nimble packages

* fixes

* install smtp

* yes
2022-11-30 21:52:36 +01:00
ringabout
77a337a39a fixes documentation regression (#20960)
follow up https://github.com/nim-lang/Nim/pull/20371
2022-11-29 14:49:40 +08:00
ringabout
dc21ae9ea5 Correct descriptions for oids (#20926) 2022-11-26 11:29:45 -05:00
ringabout
4a3be7e29e add documentation and changelog for default object fields (#20845) 2022-11-15 08:42:01 +01:00
Andrey Makarov
3eef0491a8 fix a few "broken link" warnings (#20837) 2022-11-14 15:43:29 +08:00
ringabout
25cb19a8fe fixes documentation regression and a bit clean up (#20793)
* fixes documentation regression and a bit clean up

follow up https://github.com/nim-lang/Nim/pull/20371

* Apply suggestions from code review

* Apply suggestions from code review
2022-11-09 16:50:14 +01:00
Lee Matos
4b24d85907 Update testament docs demo, command output, and gotchas (#20756) 2022-11-05 11:10:19 +01:00
ringabout
0a1f204f0f removes channels_builtin when enabling nimPreviewSlimSystem (#20713) 2022-10-31 16:56:05 +08:00
Pietro Peterlongo
9c3faa449b add back discard as a way to do multiline comments, see #12352 (#20688) 2022-10-28 16:24:51 -04:00
Andreas Rumpf
76763f51aa implemented strictCaseObjects (#20608)
* implemented strictCaseObjects

* changelog update
2022-10-21 06:55:52 +02:00
ringabout
c0824b9b80 [std/os clean up] import and export osseps (#20580)
import and export osseps
2022-10-17 20:29:00 +02:00
ringabout
1e15f975b8 fixes #19162; enable strictEffects for v2 (#19380)
* enable stricteffects
* add gcsafe
* fix tests
* use func
* fixes pegs tests
* explicitly mark repr related procs with noSideEffect
* add nimLegacyEffects
* change URL
* fixes docopt
* add `raises: []` to repr
* fixes weave
* fixes nimyaml
* fixes glob
* fixes parsetoml
* Apply suggestions from code review
* Update testament/important_packages.nim
* add legacy:laxEffects
2022-10-15 14:07:40 +02:00
ringabout
5602183234 'lock levels' are deprecated, now a noop (#20539)
* 'lock levels' are deprecated, now a noop

* fixes tests
2022-10-11 09:17:09 +02:00
ringabout
0774c3aaaa update the maintained repo of ast-pattern-matching (#20537) 2022-10-10 15:48:51 -04:00
ringabout
d954e698b3 Automatic dereferencing is removed (#20531) 2022-10-10 15:02:23 +02:00
Andreas Rumpf
0d23419e68 DAA and 'out' parameters (#20506)
* DAA and 'out' parameters

* progress

* documented strictDefs and out parameters

* docs, tests and a bugfix

* fixes silly regression
2022-10-06 17:08:41 +02:00
ringabout
e323b91a32 correct grammar (ref #20199) and add check for grammar.txt (#20494)
* correct grammar; ref #20199

* add check for keeping grammar.txt up-to-date

* add nimTestGrammar
2022-10-06 16:36:32 +02: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
Andrey Makarov
6505bd347d Markdown indented code blocks (#20473)
* Implement Markdown indented code blocks

Additional indentation of 4 spaces makes a block an "indented code block"
(monospaced text without syntax highlighting).
Also `::` RST syntax for code blocks is disabled.

So instead of
```rst
see::

  Some code
```

the code block should be written as
```markdown
see:

    Some code
```

* Migrate RST literal blocks :: to Markdown's ones
2022-10-05 14:03:10 -04:00
ringabout
f89ba2c951 add default field support for object in ARC/ORC (#20480)
* fresh start

* add cpp target

* add result support

* add nimPreviewRangeDefault

* reduce

* use orc

* refactor common parts

* add tuple support

* add testcase for tuple

* cleanup; fixes nimsuggest tests

* there is something wrong with cpp

* remove

* add support for seqs

* fixes style

* addd initial distinct support

* remove links

* typo

* fixes tuple defaults

* add rangedefault

* add cpp support

* fixes one more bugs

* add more hasDefaults

* fixes ordinal types

* add testcase for #16744

* add testcase for #3608

* fixes docgen

* small fix

* recursive

* fixes

* cleanup and remove tuple support

* fixes nimsuggest

* fixes generics procs

* refactor

* increases timeout

* refactor hasDefault

* zero default; disable i386

* add tuples back

* fixes bugs

* fixes tuple

* add more tests

* fix one more bug regarding tuples

* more tests and cleanup

* remove messy distinct types which must be initialized by original types

* add tests

* fixes zero default

* fixes grammar

* fixes tests

* fixes tests

* fixes tests

* fixes comments

* fixes and add testcase

* undo default values for results

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
2022-10-04 12:45:10 +02:00
ringabout
a8cc5d1379 Unicode Operators are no longer experimental (#20444)
* Unicode Operators are no longer experimental

* fixes tests

* Update doc/manual.md

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-09-28 22:37:26 +02:00
metagn
919a889ba8 moderate system cleanup & refactor (#20355)
* system refactor, move out 600 lines

* compilation, slice, backwardsindex, misc_num moved out of system
* some procs/types moved into arithmetics, basic_types
* system no longer depends on syncio
* some procs moved around to fit with their surroundings

* make exceptions an import, old ops to misc_num

* move instantiationInfo back

* move back nim version, fix windows echo

* include compilation

* better docs for imported modules, fix unsigned ops

also remove ze, ze64, toU8, toU16, toU32 with nimPreviewSlimSystem

* fix terminal

* workaround IC test & weird csize bug, changelog

* move NimMajor etc back to compilation, rebase for CI

* try ic fix

* form single `indices`, slim out TaintedString, try fix IC

* fix CI, update changelog, addQuitProc

* fix CI

* try fix CI

* actually fix CI finally hopefully

* Update lib/system/compilation.nim

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

* update kochdocs

* hopefully fix csize uses for slimsystem

* fix tquit

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
2022-09-28 15:28:45 -04:00
ringabout
95614089ac remove deprecated and broken nimweb tools (#20442)
* remove deprecated and broken nimweb tools

* readme
2022-09-28 12:14:35 +02:00
ringabout
b213913dcb add a changelog and update the document for ORC (#20415)
* add a changelog and update the document for ORC

* hone

* back

* Apply suggestions from code review

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Update doc/mm.md

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Update doc/mm.md

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-09-26 19:32:08 +02:00
Andrey Makarov
ae3dd759c4 Extract markdown/rst doc into separate file (#20404)
* Extract Markdown & Rst doc into separate file

This documentation should be extracted into separate file
as it's user's documentation, which can be used as a separate
utility for compiling `.md/.rst` files.

* Restructure: move markup info into markdown_rst.md

+Markdown link migration
2022-09-22 12:05:53 +02:00
Judd
4133698f2d Update manual.md (#20394)
* Update manual.md

update outdated information on `ObservableStores`.

* Update manual.md

add `base` pragma to fix the warning.

* Update doc/manual.md

accept.

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Update manual.md

update example code.

* Update manual.md

1. more updates to help keeping readers on track.
1. fix typos.

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-09-21 15:00:55 -04:00
Andrey Makarov
c4ba4f06f8 Markdown link migration part 2 (#20371) 2022-09-19 18:24:40 -04:00
Judd
758598dd3e more minor updates to manual.md (#20360)
* fix typos in manual.md

1. remove redundant `(`
1. 'System module' -> 'system module'.

* Update manual.md

"However" is not easy to understand. Suggest changing to the word into "In this version" to make the comparison explicite.
2022-09-15 22:38:06 +02:00
metagn
a73ae3e066 minor improvements to follow up recent PRs (#20342)
put mOpenArrayToSeq in compile-time evaluation whitelist
(it was mNone before which was whitelisted), homogenize
"ordinal type expected" errors, put overloadable enums
in non-experimental manual
2022-09-14 18:30:15 +02:00
Andrey Makarov
2140d05f34 nimgrep: add --inContext and --notinContext options (#19528)
* nimgrep: add `--matchContext` and `--noMatchContext` options

* Rename options for uniformity

* Revise option names, add `--parentPath` options

* Revert --bin deprecation

* Copy-paste an original test from quantimnot

The origin was:
96544656d5/tnimgrep.nim

* Change ! to n

* Attempt to fix test

* Fix test on Windows

* Change --contentsFile -> --inFile, add more tests

* Bump

* Change --parentPath to --dirpath
2022-09-14 18:28:01 +02:00
random-bites
9b9f24f01b Replace word 'param(s)' with 'parameter(s)'. (#20331)
Replace word 'params(s)' with 'parameter(s)'.
2022-09-11 16:52:56 -04:00
Andrey Makarov
088487f652 Implement Markdown definition lists (+ migration) (#20333)
Implements definition lists Markdown extension adopted in a few
implementations including:
* [Pandoc](
  https://pandoc.org/MANUAL.html#definition-lists)
* [kramdown](
  https://kramdown.gettalong.org/quickref.html#definition-lists)
* [PHP extra Markdown](
  https://michelf.ca/projects/php-markdown/extra/#def-list)

Also affected files have been migrated.
RST definition lists are turned off for Markdown: this solves the
problem of broken formatting mentioned in
https://github.com/nim-lang/Nim/pull/20292.
2022-09-11 13:52:43 -04:00
Andrey Makarov
f6ee066ee2 Markdown links migration part 1 (#20319)
Markdown link migration part 1

Also the warning is improved a bit.

Local links (targeting inside its document) which had had a full anchor
were turned into concise form.
The very fact that they existed may be due to the bug in
reference to subsections fixed https://github.com/nim-lang/Nim/pull/20279,
now they are working well (both in RST syntax and
new Pandoc Markdown syntax implemented in
https://github.com/nim-lang/Nim/pull/20304)
2022-09-09 10:45:54 -04:00
Judd
89e6540fd3 update manual (#20325)
1. remove two redundant `.`;
1. add information on format string for `importc` just as `exportc`
2022-09-09 15:02:15 +02:00
Judd
918ae16919 Update manual.md (#20321)
* Update manual.md

add explanation for $#.

* Update manual.md

add explanation.
2022-09-08 17:33:29 +02:00
metagn
5ebd1248df overloadable enums no longer experimental (#20298)
depends on #20126
2022-09-05 23:38:38 +02:00
Andrey Makarov
cde6b2aab8 Implement Pandoc Markdown concise link extension (#20304)
* Implement Pandoc Markdown concise link extension

This implements https://github.com/nim-lang/Nim/issues/20127.
Besides reference to headings we also support doing references
to Nim symbols inside Nim modules.

Markdown:
```
Some heading
------------

Ref. [Some heading].
```

Nim:
```
proc someFunction*() ...

... ## Ref. [someFunction]
```

This is substitution for RST syntax like `` `target`_ ``.
All 3 syntax variants of extension from Pandoc Markdown are supported:
`[target]`, `[target][]`, `[description][target]`.

This PR also fixes clashes in existing files, particularly
conflicts with RST footnote feature, which does not work with
this PR (but there is a plan to adopt a popular [Markdown footnote
extension](https://pandoc.org/MANUAL.html#footnotes) to make footnotes work).

Also the PR fixes a bug that Markdown links did not work when `[...]`
section had a line break.

The implementation is straightforward since link resolution did not
change w.r.t. RST implementation, it's almost only about new syntax
addition. The only essential difference is a possibility to add a custom
link description: form `[description][target]` which does not have an
RST equivalent.

* fix nim 1.0 gotcha
2022-09-04 14:52:21 -04:00
metagn
86f7f4ffa5 remove deprecated type pragma syntax, fix bugs that required it (#20199)
* remove deprecated pragma syntax from 0.20.0

closes #4651, closes #16653 with a cheap fix for now due to
how early `tfFinal` is set

* remove type pragma between name and generics

* undo removal, try removing bind expression (0.8.14)

* fix test, unremove bind expr

* remove again

* Update changelog.md

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

* dependencies @ HEAD & weave test dependencies

* try fix package ci

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2022-09-03 09:52:13 +02:00
metagn
a95b6391fd support cstring in case (#20130)
* implement case for cstring

for now just converts to string on C backend

* custom implementation for cstring

* remove leftover

* revert even more

* add nil + fix packages weird variant literal bug

* update docs
2022-09-01 18:10:00 +02:00
quantimnot
6289b002b6 [Testament] Extend and document message testing aids (#19996)
* [Testament] Extend and document message testing aids

* Enable inline msgs when not reject action.
Eliminates the pain of changing the line and column numbers in `nimout`
or `output` while making changes to the test.
* Enable using inline msgs and nimout together.
Allows ease of inline msgs for the test as well as testing msgs from
other modules.
* Add path separator and test filename variable interpolation in
msgs.
Eases handling path separators in the msgs.
* Add some documentation.

* Fixed lots of broken tests

* Fixed more broken tests

* Support multiple inline messages per a line

* Fix a broken test

* Revert variable substitution in `output`

* Remove uneeded params

* Update doc/testament.md

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Update testament/specs.nim

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Update testament/specs.nim

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Fix indentation

Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-09-01 17:52:13 +02:00
Judd
2b56b38235 minor updates on manual (#20258)
* minor updates on manual

1. statement -> keyword:

1. re-phase on the explanation of `import except`: maybe the newer version does not export some of the identifiers;

1. "The original module name is then not accessible" is moved up to the previous paragraph, since it is coupled with 
   the previous paragraph, but not the current one.

1. re-phase on the explanation of _Disabling certain messages_.

* Apply suggestions from code review

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

* Apply suggestions from code review

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Update manual.md

do not use "()".

* Update doc/manual.md

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-08-27 17:29:41 -04:00
Clay Sweetser
9ca6345122 Update manual.md (#20277) 2022-08-26 16:30:14 -04:00
ringabout
404e91ce48 provide better error messages for large set (#20207)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-08-25 00:49:52 +02:00
metagn
d143924ab2 remove unused sfProcvar, "procvar" mentions (#20204)
refs #12975. doesn't close it because wProcvar isn't removed
2022-08-24 21:38:37 +02:00
metagn
0014b9c48e top-down type inference, implements rfc 149 (#20091)
* micro implementation of rfc 149

refs https://github.com/nim-lang/RFCs/issues/149

* number/array/seq literals, more statements

* try fix number literal alias issue

* renew expectedType with if/case/try branch types

* fix (nerf) index type handling and float typed int

* use typeAllowed

* tweaks + const test (tested locally) [skip ci]

* fill out more of the checklist

* more literals, change @ order, type conversions

Not copying the full call tree before the typedesc call check
in `semIndirectOp` is also a small performance improvement.

* disable self-conversion warning

* revert type conversions (maybe separate op later)

* deal with CI for now (seems unrelated), try enums

* workaround CI different way

* proper fix

* again

* see sizes

* lol

* overload selection, simplify int literal -> float

* range, new @ solution, try use fitNode for nil

* use new magic

* try fix ranges, new magic, deal with #20193

* add documentation, support templates

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-08-24 07:11:41 +02:00
metagn
d1d141b135 new .redefine pragma for templates, warn on redefinition without it (#20211)
* test CI for template redefinitions

* adapt asyncmacro

* fix quote

* fix again

* try something else

* revert

* fix ioselectors_select, disable packages CI

* adapt more tests & simplify

* more

* more

* more

* rename to redefine, warn on implicit redefinition

* basic documentation [skip ci]

* Update compiler/lineinfos.nim

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

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2022-08-23 21:41:30 +02:00
ringabout
d8e5c5c5a6 fixes manual regression (#20259)
ref https://github.com/nim-lang/Nim/pull/20080
2022-08-23 19:17:00 +08:00
Amjad Ben Hedhili
70a8e0d65c Docs auto dark mode (#20188)
* Implement auto dark mode

* Rename class

* Fix borders cutout

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
2022-08-21 16:56:12 -04:00
Andrey Makarov
1c31de361d Markdown code blocks part 5 (#20236)
No logic was added, just a few more `*.md` files have been migrated.
2022-08-17 15:20:22 -04:00