-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Doc attribution: make user_doc
to work with predefined consts.
#14001
Comments
take |
Hi @ding-young are you still planning to work on this issue? |
@comphead Yes, I've taken a brief look at |
@comphead if the doc_section is a string, user_doc macro syntax will change for all functions? Before #[user_doc(
doc_section(label = "String Functions"),
description = "...",
syntax_example = "...",
...
)] After #[user_doc(
doc_section = "String Functions",
description = "...",
syntax_example = "...",
...
)] |
I think we can make the parser to try both, #[user_doc(
doc_section(include=true, label = "String Functions", description: None),
description = "...",
syntax_example = "...",
...
)] (2) if it fails look for single string like #[user_doc(
doc_section = "String Functions",
description = "...",
syntax_example = "...",
...
)] Thereby we can keep original syntax. |
I think folks lets keep it just
where I understand that we slightly overcomplicate the doc section so it looks like a complex object but in fact it is just a string but if we want to improve it we can do it later |
Agree, thanks @comphead @ding-young |
Currently the
doc_section
attribute must match fully the predefined DocSection consts, for exampleIn case of
doc_section
attribute contains any mismatches such function will be silently ignored.Example
In the example the
description
doesn't match causing the function documentation to be ignoredI believe we can make doc macros more smart like:
scalar_doc_sections.doc_sections()
datafusion/macros/src/user_doc.rs
when constructing the builder use the const instead of buildingDocSection
manuallyOriginally posted by @comphead in #13919 (comment)
The text was updated successfully, but these errors were encountered: