-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add support for generating class synopses from stubs #7310
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
Conversation
494b2c9
to
aa9a484
Compare
aa9a484
to
34a5cb0
Compare
Class synopsis generation works (aside from indentation), so the PR can be reviewed. I'd like to add support for replacement of class synopses in a follow-up PR, since it also needs quite some code changes. |
@cmb69 I'd appreciate your insights, if you have some capacity :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this nice improvement! Looks quite good to me. Am I right, that we don't support class constants in the stubs yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't reviewed in detail, but looks like a reasonable addition.
Yes, constants are not yet supported because we weren't able to define their value in the vast majority of the cases, thus we omitted them so far. For updating class synopsis pages though, I have a slightly unconventional idea: we could retrieve the required information about class constants via reflection. Furthermore, since the stub integration of enums will add partial support for (class) constants anyway, I'd like to build on this capability so that global as well as class constants can be defined and generated via stubs, so that at least extensions can take advantage of a constant generation feature. |
Not sure if that makes sense at this point. There is already docgen which is able to generate manual pages via reflection; for now it might suffice to run that manually and do some copy&paste, if the need arises. |
Nice! I forgot about docgen. Then I'll leave constants out of scope for now. |
No description provided.