-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
refactor: use LazyLock
in the user_doc
macro
#13684
Conversation
datafusion/macros/src/lib.rs
Outdated
Some(#lock_name.get_or_init(|| { | ||
Documentation::builder(DocSection { include: #doc_section_include, label: #doc_section_lbl, description: #doc_section_description }, | ||
fn doc(&self) -> Option<&datafusion_doc::Documentation> { | ||
static DOCUMENTATION: std::sync::LazyLock<datafusion_doc::Documentation> = |
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.
thats interesting, I tried doing the same with OnceLock
, to move it inside the doc
method but it didn't work. Surprisingly it works with LazyLock
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.
Conflicting resolved. Thanks @comphead for the review. |
* refactor: use `LazyLock` in the `user_doc` macro * Fix cargo doc * Update datafusion/macros/src/lib.rs * Fix doc comment --------- Co-authored-by: Oleks V <[email protected]>
* refactor: use `LazyLock` in the `user_doc` macro * Fix cargo doc * Update datafusion/macros/src/lib.rs * Fix doc comment --------- Co-authored-by: Oleks V <[email protected]>
Which issue does this PR close?
Part of #11687
Rationale for this change
Replace
OnceLock
withLazyLock
.What changes are included in this PR?
Are these changes tested?
Yes.
Run
./dev/update_function_docs.sh
and verified that the documentation content didn't changed.Are there any user-facing changes?
No