Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc docgen (not documentation) #112

Open
1 task done
timotheecour opened this issue Apr 21, 2020 · 10 comments
Open
1 task done

misc docgen (not documentation) #112

timotheecour opened this issue Apr 21, 2020 · 10 comments
Labels

Comments

@timotheecour
Copy link
Owner

timotheecour commented Apr 21, 2020

  • top-level runnableExamples should work; right now they're avoided (in favor of code-block::nim) bc AFAIR they're not rendered properly
@timotheecour
Copy link
Owner Author

timotheecour commented Apr 22, 2020

  • --lib not honored for nim doc runnableExamples, eg:
nim doc --lib:lib $nim_prs_D/lib/system/setops.nim
/Users/timothee/.cache/nim/setops_d/runnableExamples/setops_examples.nim(1, 1) template/generic instantiation from here
/Users/timothee/.cache/nim/setops_d/runnableExamples/setops_examples1.nim(6, 1) template/generic instantiation from here
/Users/timothee/.cache/nim/setops_d/runnableExamples/setops_examples1.nim(8, 2) template/generic instantiation from here
/Users/timothee/git_clone/nim/Nim_prs/lib/system/setops.nim(102, 15) Error: ambiguous call; both setops.incl(x: var set[T], y: set[T]) [declared in /Users/timothee/git_clone/nim/Nim_prs/lib/system/setops.nim(11, 10)] and system.incl(x: var set[T], y: set[T]) [declared in /Users/timothee/git_clone/nim/Nim_devel/lib/system/setops.nim(11, 10)] match for: (set[char], set[char])
    if val: incl(s, y)
                ^

@timotheecour
Copy link
Owner Author

timotheecour commented Apr 26, 2020

  • we need: nim doc --target:js foo
    eg use case: print docs for js functions in files with when defined(js): ...

and then show the docs for specific targets

A: --backend:js

@timotheecour
Copy link
Owner Author

timotheecour commented Apr 26, 2020

  • nim doc lib/system/dollars.nim doesn't print any SuccessX unlike nim doc lib/pure/json.nim

unlike:

nim doc lib/pure/json.nim
Hint: 51042 LOC; 0.857 sec; 62.031MiB peakmem; Debug build; proj: /Users/timothee/.cache/nim/json_d/runnableExamples/json_examples.nim; out: /Users/timothee/.cache/nim/json_d/runnableExamples/json_examples [SuccessX]
Hint: operation successful: runnableExamples: /Users/timothee/.cache/nim/json_d/runnableExamples/json_examples.nim [Success]
Hint: 51314 LOC; 1.892 sec; 62.102MiB peakmem; Debug build; proj: /Users/timothee/git_clone/nim/Nim_devel/lib/pure/json.nim; out: /Users/timothee/git_clone/nim/Nim_devel/json.html [SuccessX]

Edited:
Now it has:

Hint: 22859 lines; 1.280s; 20.625MiB peakmem; Debug build; proj: D:\QQPCmgr\Desktop\Nim\lib\system\dollars.nim; out: D:\QQPCmgr\Desktop\Nim\lib\system\htmldocs\dollars.html [SuccessX]

@timotheecour
Copy link
Owner Author

imports not listed unless from same project

@timotheecour
Copy link
Owner Author

@timotheecour
Copy link
Owner Author

https://github.com/nim-lang/Nim/issues/14313#issuecomment-630187073 manual.rst => manual.nim

@timotheecour
Copy link
Owner Author

timotheecour commented May 25, 2020

TODO's from fix #6583, fix #14376, index+search now generated for all projects, many bug fixes with nim doc by timotheecour · Pull Request #14324 · nim-lang/Nim

@timotheecour
Copy link
Owner Author

instead of asking user to delete htmldocs contents in https://nim-lang.github.io/Nim/docgen.html, we can simply regenerate theindex more smartly to only track what is needed ; this will fix a bug w stale htmldocs contents

@timotheecour
Copy link
Owner Author

  • proc declarations should generate clickable links when possible for default values
    this would avoid having to specify it in doc comment eg: (default: defaultInitialSize).
    image

https://github.com/nim-lang/Nim/pull/16589/files

@timotheecour
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant