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

[WONTFIX] [regression] nim doc foo/bar.nim should generate by default in htmldocs instead of foo/bar.html (makes it hard to gitignore otherwise) #8873

Closed
1 task
timotheecour opened this issue Sep 4, 2018 · 0 comments
Labels
Documentation Content Related to documentation content (not generation). Regression

Comments

@timotheecour
Copy link
Member

timotheecour commented Sep 4, 2018

note: it's a semi-regression since previous behavior was already bad (but differently bad):

a few days ago:
nim doc foo/bar.nim
generated bar.html
now it generates foo/bar.html

neither is good:

  • bar.html could clash with existing modules (even regardless of [TODO] Nim now allows modules with same name in a package #8614 being merged, there could be other cases where 2 nimble projects are rooted under a same git repo; there are other cases)
    also it's bad to put stuff at top-level

  • foo/bar.htmlputs generated files alongside non-generated sources

proposal

  • nim doc foo/bar.nim shall generate under htmldocs/foo/bar.html, as done for nim doc --project foo/bar.nim [1]
  • nim doc /abs/pathto/foo/bar.nim shall generate under htmldocs/abs/pathto/foo/bar.nim
  • reuse more code between code path for nim doc and nim doc --project instead of duplicating logic to avoid further regressions

rationale

it's painful to gitignore the files generated by nim doc (I often need this command to run runnableExamples), as they're now scattered alongside source code and I don't wanna use a global *.html rule in gitignore as it may cover source (non auto generated) html files.
if it's in htmldocs it's trivial to gitignore it

alternatives

put it in nimcache/htmldocs; that way we don't even need a rule in gitignore (assuming that rule for nimcache is already in the nimble package)

links

[1] nim doc --project foo/bar.nim generates indeed under htmldocs/, but it generates a full path nested under there, eg: htmldocs/Users/bob/pathto/foo/bar.html, which is another regression, see #8874

@andreaferretti andreaferretti added Documentation Content Related to documentation content (not generation). Regression labels Sep 5, 2018
@timotheecour timotheecour changed the title [regression] nim doc foo/bar.nim should generate by default in htmldocs instead of foo/bar.html (makes it hard to gitignore otherwise) [WONTFIX] [regression] nim doc foo/bar.nim should generate by default in htmldocs instead of foo/bar.html (makes it hard to gitignore otherwise) Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Content Related to documentation content (not generation). Regression
Projects
None yet
Development

No branches or pull requests

2 participants