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

Constructors don't have docstrings in generated documentation. #1993

Closed
SeanTAllen opened this issue Jun 29, 2017 · 6 comments
Closed

Constructors don't have docstrings in generated documentation. #1993

SeanTAllen opened this issue Jun 29, 2017 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@SeanTAllen
Copy link
Member

Moved from ponylang/ponylang-website#97

The Timers.create page
https://stdlib.ponylang.org/time-Timers/#create

Doe not include the docstring that appears in the 0.14 release

Create a timer handler with the specified number of slop bits. No slop bits
means trying for nanosecond resolution. 10 slop bits is approximately
microsecond resolution, 20 slop bits is approximately millisecond
resolution.

The docstring for the constructor is getting "lost" in traits.c at line 387:

  // Ignore docstring.
  if(ast_id(doc) == TK_STRING)
  {
    ast_set_name(doc, "");
    ast_setid(doc, TK_NONE);
  }

where it gets set to TK_NONE. What's very odd about this is why trait related code is being run on constructors for actors like Timers.

Additionally, does it make sense to remove the docstring from a trait? It does it the trait is overridden but would this also remove the docstring when not overridden? I'm not sure, that requires more exploration.

@SeanTAllen
Copy link
Member Author

@Praetonus believes that the trait pass runs on every method whether there is a trait or not.

@SeanTAllen
Copy link
Member Author

@Praetonus looking at the code says that the trait pass shouldnt be running here so we have a bug that needs to be fixed.

@EpicEric
Copy link
Contributor

Is this still an issue? The docstring appears to have been correctly generated for the example.

@SeanTAllen
Copy link
Member Author

It might on longer be an issue. Might have been accidentally fixed.

@EpicEric
Copy link
Contributor

Closing on the assumption it was.

@mfelsche
Copy link
Contributor

This was fixed with: #2586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants