Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

kocsismate
Copy link
Member

No description provided.

@kocsismate kocsismate marked this pull request as draft July 26, 2021 22:36
@kocsismate kocsismate changed the title Add support for generating classynopses from stubs Add support for generating class synopses from stubs Jul 27, 2021
@kocsismate kocsismate marked this pull request as ready for review July 27, 2021 16:01
@kocsismate
Copy link
Member Author

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.

@kocsismate
Copy link
Member Author

@cmb69 I'd appreciate your insights, if you have some capacity :)

@kocsismate
Copy link
Member Author

Copy link
Member

@cmb69 cmb69 left a 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.

Copy link
Member

@nikic nikic left a 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.

@kocsismate
Copy link
Member Author

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.

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.

@kocsismate kocsismate closed this in ac17b36 Aug 2, 2021
@cmb69
Copy link
Member

cmb69 commented Aug 2, 2021

we could retrieve the required information about class constants via reflection.

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.

@kocsismate
Copy link
Member Author

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.

@kocsismate kocsismate deleted the stub-classynopsis branch August 2, 2021 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants