Timothee Cour
695154970d
deprecate existsDir; use dirExists instead ( #14884 )
2020-07-03 23:04:23 +02:00
Timothee Cour
dc5a40f3f3
{.deprecated: [existsFile: fileExists].} ( #14735 )
...
* {.deprecated: [existsFile: fileExists].}
* s/existsFile/fileExists/ except under deps
* workaround pending #14819
* fix test
2020-07-02 16:19:13 +02:00
Timothee Cour
bb62feff72
fix #14691 docgen works again for methods ( #14701 )
...
* fix #14691 docgen methods
* fixup
2020-06-18 08:47:16 +02:00
Timothee Cour
7cdf470269
refs #14545 fix snippet errors: avoid showing confusing errors when they are expected ( #14569 )
2020-06-05 19:04:39 -07:00
Timothee Cour
4ba34522f6
[cleanup] docgen: remove docOutdir now that outDir is always set ( #14554 )
2020-06-03 19:20:41 -07:00
Timothee Cour
3cf88c2b49
walkDirRecFilter, update doc CI filter, compiler/index.nim for docs + various other fixes ( #14501 )
...
* update doc CI filter to include the files mostly likely to require doc rebuild
* remove code duplication in ./config/nimdoc.cfg; show link to compiler docs, various fixes
* walkDirRecFilter, factor nativeToUnixPath workaround
* glob for getRst2html
* docslocal: 40s to build all docs
* revert code dedup in github actions which did not work alas...
* fixups
2020-06-01 19:21:41 +02:00
Timothee Cour
e646c16e06
hotfix doc comments for procs without body ( #14494 )
2020-05-29 05:30:36 -07:00
Timothee Cour
e013ebc91a
fix #8871 runnableExamples now preserves source code comments, litterals, and all formatting; other bug fix ( #14439 )
...
* fix #8871 runnableExamples now preserves source code comments, litterals, and all formatting
* remove orig deadcode from getAllRunnableExamplesImpl
* fix expected examples
* add test to close https://github.com/nim-lang/Nim/issues/14473
* correctly handle regular comments before 1st token inside runnableExamples
* add test to answer https://github.com/nim-lang/Nim/pull/14439#discussion_r431829199
* update tests
2020-05-28 20:46:06 +02:00
Kaushal Modi
e62ccaa4dc
Propagate the outDir to rstgen to fix hrefs for modules in subdirs ( #14479 )
2020-05-28 00:13:24 -07:00
Timothee Cour
55758920f4
docgen: fix #14448 show @@ as .. in href text ( #14451 )
2020-05-25 18:16:00 -07:00
Timothee Cour
f96555bd10
fix #9227 procs can now have multiple interleaved doc comments + runnableExamples and be docgen'd correctly ( #14441 )
...
* fix #9227 proc doc comments after 1st runnableExamples are not ignored anymore
2020-05-25 15:44:23 +02:00
Timothee Cour
58282547f6
fix #6583 , fix #14376 , index+search now generated for all projects, many bug fixes with nim doc ( #14324 )
...
* refs #6583 fix nim doc output
* changelog
* change default for outDir when unspecified
* cleanups
* --project implies --index
2020-05-25 13:25:40 +02:00
Clyybber
6969a468ce
Remove #PRTEMP leftover comment
2020-05-20 13:04:52 +02:00
Timothee Cour
3d20f14193
fix #10731 ; runnableExamples "-b:cpp --run:off": code works ( #14384 )
...
* runnableExamples "-b:cpp -r:off": code
2020-05-20 09:45:34 +02:00
Timothee Cour
5beed56d0a
fix #14174 do not collapse pragma inside runnableExamples ( #14385 )
2020-05-18 11:03:34 +02:00
Timothee Cour
c777f2fb60
fix some issues with --backend ( #14363 )
...
* fix some issues with --backend
* fix https://github.com/timotheecour/Nim/issues/175 ; improve upon #14306
2020-05-16 13:09:18 +02:00
Kaushal Modi
86669ef5b4
Make --backend:cpp|js work for :test: code-blocks as well ( #14306 )
...
Continues 9502e39b63
Ref:
- 9502e39b63 (commitcomment-39087584)
- https://github.com/nim-lang/Nim/pull/14278
Fixes https://github.com/nim-lang/Nim/issues/13129 .
2020-05-11 20:45:35 +02:00
Timothee Cour
9502e39b63
nim doc --backend:js, nim doc --doccmd:-d:foo, nim r --backend:js, --doccmd:skip + other improvements (#14278 )
...
* `nim doc --backend:js|cpp...`
`nim doc --doccmd:'-d:foo --threads:on'`
`nim r --backend:cpp...` (implies --run --usenimcache)
* --usenimcache works with all targets
* --docCmd:skip now skips compiling snippets; 50X speedup for doc/manual.rst
2020-05-11 12:01:18 +02:00
Andreas Rumpf
cf3e0008b9
fixes #13986 [backport:1.2] ( #14173 )
2020-04-30 19:32:03 +02:00
Timothee Cour
af9c852701
fix nim doc subdir/foo which was generating broken css; + other fixes ( #13647 )
...
* docgen: minor refactoring via docOutDir
* fix css for `nim doc subdir/foo` without --outdir nor -o
* tcompilesetting.nim: keep `git status` clean
* re-enable pkg nimgame2 that got fixed upstream
2020-03-17 13:44:37 +01:00
Timothee Cour
9fa070b1dc
fix hintSuccess: out was wrong for nim doc without -o flag ( #13569 )
2020-03-04 10:26:56 +01:00
genotrance
f8175688a3
Fix docgen snippet numbering ( #13507 )
2020-03-03 20:52:16 +01:00
PMunch
05e9473f80
Add signatures object to jsondoc for routine types ( #13530 )
...
jsondoc is meant to be read by computers, but yet the signatures of
procedures where simply a string of the whole thing. This adds a
signature object that unpacks this information into an object so it's
easier to analyse the documented signatures.
2020-03-02 17:52:42 +01:00
Timothee Cour
7ec7731f82
fix #13150 nim doc --project now works reliably ( #13223 )
...
* fix #13150 `nim doc --project` works with duplicate names and with imports below main project file
* add to help; fixup after #13212 isRelativeTo got merged
* fix test tests/compilerapi/tcompilerapi.nim
* remove nimblePkg field; compute on the fly instead
* kochdocs: compiler docs now under compiler/
* --docRoot now has smart default: best among @pkg, @path
2020-02-06 11:17:00 +01:00
Timothee Cour
9657a83698
removed unused import
2020-01-28 23:36:24 +00:00
Timothee Cour
5676912209
refactor htmldocs; gitignore it
2020-01-28 23:36:24 +00:00
Clyybber
451c47634c
Fix docs for subdirs too ( #13180 )
...
* Fix doc subdirs
* Extract to helper proc, and fix on windows
2020-01-17 16:49:37 +01:00
Timothee Cour
1b54be7779
fixes #12998 nim doc regression ( #13117 )
2020-01-16 14:19:58 +01:00
Timothee Cour
d88b52c0bc
successX now correctly shows html output for nim doc, nim jsondoc; fix #13121 ( #13116 )
...
* successX now correctly shows html output for nim doc
* fixes #13121
* fixup hintSuccessX to be less weird
2020-01-15 15:18:37 +01:00
Timothee Cour
49d1822c8f
fixes #13100 nim doc now treats export localSymbol correctly ( #13123 ) [backport]
...
* fix #13100 nim doc now treats `export localSymbol` correctly
* use owner instead
2020-01-13 22:05:38 +01:00
BinHong Lee
2cfa8d8385
Allow -o option for buildIndex ( #13037 ) [backport]
...
Addressing #12771
This is also included in the docgen documentation [here](https://nim-lang.org/docs/docgen.html ) but its not respected as reported in the issue.
2020-01-05 19:24:29 +01:00
Clyybber
7e747d11c6
Cosmetic compiler cleanup ( #12718 )
...
* Cleanup compiler code base
* Unify add calls
* Unify len invocations
* Unify range operators
* Fix oversight
* Remove {.procvar.} pragma
* initCandidate -> newCandidate where reasonable
* Unify safeLen calls
2019-11-28 17:13:04 +01:00
Nindaleth
34dbc5699e
fix several typos in documentation and comments ( #12553 )
2019-10-30 09:08:45 +01:00
Clyybber
ed1d41c51e
Small ast.nim cleanup ( #12156 )
...
* Remove sonsLen
* Use Indexable
2019-09-09 11:54:15 +02:00
Araq
7023241aaf
fixes #11819
2019-08-16 14:37:52 +02:00
Andreas Rumpf
0d5bd7e8b5
removed unused imports [refactoring]
2019-08-08 17:03:19 +02:00
Timothee Cour
8c93c692b9
run runnableExamples in the module scope ( #11732 ) [feature]
2019-07-22 16:22:57 +02:00
Araq
07d465ca42
[refactoring] remove unused imports in the compiler and in some stdlib modules
2019-07-18 00:36:03 +02:00
Miran
d6b0e46ee4
[bugfix] correct 'source' for documentation ( #11540 )
2019-06-20 21:03:48 +02:00
LemonBoy
7d217a71d3
Render deprecated pragmas ( #8886 )
...
* Render deprecated pragmas
* fix the expected html
* clean up the documentation regarding deprecations
* fix typo
* fix system.nim
* fix random
2019-06-03 10:15:20 +02:00
Araq
bcccc7dec8
docgen.nim: avoid compiler warning
2019-05-28 16:31:57 +02:00
Kaushal Modi
2f610d621f
Use the correct HTML file reference in "nim doc" generated idx files ( #11326 )
...
* Use the correct HTML file reference in "nim doc" generated idx files
Now "nim doc --out:foo.html --index:on bar.nim" generates "foo.html"
and the generated "bar.idx" contains references to "foo.html".
Fixes https://github.com/nim-lang/Nim/issues/11325 .
* Refactor the nim doc tester to extend it for more tests
* Reference the HTML files relative to the outDir, not project dir
* Add test for issues #11312 and #11325
- https://github.com/nim-lang/Nim/issues/11312
- https://github.com/nim-lang/Nim/issues/11325
2019-05-25 20:20:25 +02:00
Araq
1a8ef6b491
fixes #11312
2019-05-24 10:34:36 +02:00
Clyybber
cc28eef38e
Replace countup(x, y) with x .. y
2019-05-07 12:37:28 +02:00
Clyybber
f18b3af9d4
Replace countup(x, y-1) with x ..< y
2019-05-07 12:32:05 +02:00
nc-x
20e3a39d6c
Fix nim doc ignoring doc comments with implicit returns and implicit conversions ( #11173 )
2019-05-04 22:35:00 +02:00
Arne Döring
abb05ab645
fewer ropes ( #11037 )
2019-04-19 09:05:31 +02:00
Andreas Rumpf
bf592c4e94
more destructor based changes ( #10885 )
...
* mark user defined destructors with sfOverriden to simplify the logic
* refactoring in preparation to merge liftings and generic instantiations for destructors
* ast: introduce nkHiddenTryStmt for destructor generation in order to be able to optimize better the code later on
* renamed 'patterns' switch to 'trmacros' as it was totally misleading before
* destructors: introduce tfCheckedForDestructor flag in preparation of strict =destroy checking
* test for invalid/too late destructor introductions
* liftdestructors: make code robust for nimsuggest
* --newruntime works for hello world again
* newruntime: code generation for closures
2019-03-23 00:12:05 +01:00
Miran
54151ce398
docgen: add links for var, let and const (refs #10487 ) ( #10868 )
...
* docgen: add links for var, let and const (refs #10487 )
* change the expected html
2019-03-20 11:23:38 +01:00
genotrance
16fcbee1bc
Fix nightlies :test: snippet issue ( #10862 )
2019-03-19 08:17:35 +01:00