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
Expose docComment in @typeInfo data #2573
Comments
One thing that was mentioned in IRC is that this would allow storing comptime metadata in comments and changing program behavior based on it. I think we can all agree that comments changing program behavior is exceptionally un-zen. Something like #1099 would allow a more obvious path for whatever that kind of thing is trying to accomplish, but the possibility would still be there if this feature existed. |
Doccomments are not normal comments. Converting text from doccomments to CLI |
If It would be nicer to have it in TypeInfo rather than the hack for generation of things like OpenAPI object specifications if documentation hooks are never implemented. Edit: added "rather than the hack" |
How much memory will the compiler eat with this feature? |
One interesting use-case for this would be auto-generation of OpenAPI documentation without need for a separate build-step. We can currently generate schema from type introspection, but we cannot access comments so you can't see what the fields are supposed to mean. |
Originally posted by @daurnimator in #2539 (comment)
The text was updated successfully, but these errors were encountered: