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

fix #16973 ; nim doc now shows correct, canonical import name in title #16999

Merged
merged 6 commits into from
Mar 23, 2021

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Feb 10, 2021

fix #16973

refs #16970 (comment)

It should be obvious, since it's linked as std/sha1 and the other std/ modules don't include this note either. But I can put the note back, if you prefer, though a better solution IMO would be to make nim doc generate std/sha1 as heading.

try it out locally with: ./koch --nim:bin/nim --localdocs:/tmp/d01 docs --doccmd:skip (takes < 30 seconds)

it all seems to work.

examples

image

image

image

future work

@timotheecour timotheecour changed the title nim doc now shows correct import name in title (with --docroot) nim doc now shows correct, canonical import name in title (with --docroot) Feb 10, 2021
@konsumlamm
Copy link
Contributor

This fixes #16973.

@timotheecour timotheecour marked this pull request as ready for review February 13, 2021 08:46
@timotheecour timotheecour changed the title nim doc now shows correct, canonical import name in title (with --docroot) fix #16973 ; nim doc now shows correct, canonical import name in title (with --docroot) Feb 13, 2021
@timotheecour timotheecour marked this pull request as draft February 13, 2021 08:55
@Araq
Copy link
Member

Araq commented Feb 15, 2021

Still a draft?

@timotheecour
Copy link
Member Author

yes, there's 1 remaining problem which has to do with theindex links; I have a fix in the pipeline...

@timotheecour timotheecour changed the title fix #16973 ; nim doc now shows correct, canonical import name in title (with --docroot) fix #16973 ; nim doc now shows correct, canonical import name in title Mar 23, 2021
@timotheecour timotheecour marked this pull request as ready for review March 23, 2021 04:34
@timotheecour
Copy link
Member Author

timotheecour commented Mar 23, 2021

@Araq this is ready now (and I have a PR that depends on this to fix nim-lang/RFCs#352)

@Araq Araq merged commit 64e6670 into nim-lang:devel Mar 23, 2021
@timotheecour timotheecour deleted the pr_nim_doc_modulename branch March 23, 2021 09:04
@timotheecour timotheecour added the TODO: followup needed remove tag once fixed or tracked elsewhere label Mar 23, 2021
@konsumlamm
Copy link
Contributor

The modules in packages/docutils still don't show a qualified name, is that intentional? If not, what should the prefix be? std/ or packages/docutils/? Or something else?

@timotheecour
Copy link
Member Author

timotheecour commented Mar 24, 2021

for reference:

the module title shows as highlite instead of packages/docutils/docutils even though import highlite doesn't work and user needs import packages/docutils/docutils

the problem is that docutils is a nimble package, because of lib/packages/docutils/docutils.nimble

IMO the fix here is to stop pretending it's a nimble package and remove lib/packages/docutils/docutils.nimble

Alternatively, we can make it a proper nimble package that would be nimble-installed by koch, but note that the package structure is incorrect, as it'd (currently) put every top-level file in scope, eg: import highlight whereas we should require import pkg/docutils/highlight or import docutils/highlight

note that the layout of some modules in nim repo should be improved to avoid scope pollution

=> #17544

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

Successfully merging this pull request may close these issues.

[docgen] Add prefix to module names for generated documentation
4 participants