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

nim doc ignores doc comment #10687

Closed
GULPF opened this issue Feb 15, 2019 · 2 comments · Fixed by #11173
Closed

nim doc ignores doc comment #10687

GULPF opened this issue Feb 15, 2019 · 2 comments · Fixed by #11173
Labels
Documentation Generation Related to documentation generation (but not content). Severe

Comments

@GULPF
Copy link
Member

GULPF commented Feb 15, 2019

nim doc doesn't find the doc comment for this proc:

proc foo*(x: int8): int =
  ## Doc comment
  x

It appears to be caused by a combination of the implicit int8->int conversion and the implicit return value, as changing either of these makes the issue disappear.

This causes some doc comments to disappear in the stdlib docs, here for example: https://nim-lang.github.io/Nim/times.html#nanoseconds%2CDuration

@GULPF GULPF added the Documentation Generation Related to documentation generation (but not content). label Feb 15, 2019
@Araq Araq added the Severe label Feb 17, 2019
@narimiran
Copy link
Member

narimiran commented Feb 21, 2019

Maybe it is related, so I'm posting it here:

From options.nim:

type
  Option*[T] = object
    ## An optional type that stores its value and state separately in a boolean.
    when T is SomePointer:
      val: T
    else:
      val: T
      has: bool

Doc produced:

Option[T] = object
  when T is SomePointer:
    val
  else:
      val
      has

  

(yes, with some empty lines at the bottom, and wrong indentation of else branch)

See here

@nc-x
Copy link
Contributor

nc-x commented May 4, 2019

@narimiran
There is an issue open for that -> #9899

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Generation Related to documentation generation (but not content). Severe
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants