Skip to content
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

Replace OnceLock with LazyLock, update MSRV to 1.80 #11690

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Rafferty97
Copy link
Contributor

Which issue does this PR close?

Closes #11687.

What changes are included in this PR?

  • Updated MSRV to 1.80 where necessary, which will need review and may warrant holding off merging this for now
  • Replaces all uses of OnceLock with LazyLock
  • In many cases, the associated getter function for a lazy static was removed and call sites updated to access the static directly
  • In a few macros that made use of OnceLock, I fixed the doc comments so that tokens were properly expanded into the text

Are these changes tested?

I haven't checked that all the modified code is covered by tests, though the changes are pretty trivial. I will do so soon when time permits.

Are there any user-facing changes?

No, only implementation details have been changed.

@github-actions github-actions bot added logical-expr Logical plan and expressions physical-expr Physical Expressions core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Jul 28, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Rafferty97 🙏

The DataFusion MSRV policy is to support rust versions for at least 6 months -- https://github.com/apache/datafusion?tab=readme-ov-file#rust-version-compatibility-policy

Thus as you say in the description, we probably need to hold off on this update until January 2025 as 1.80 was released in July 2024:

https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1800-2024-07-25

@alamb alamb changed the title Replace OnceLock with LazyLock Replace OnceLock with LazyLock, update MSRV to 1.80 Jul 28, 2024
@Rafferty97
Copy link
Contributor Author

@alamb No worries! Would you like me to extract the doc comment improvements into a separate PR, with a new associated issue? I could also scan the codebase for other similar instances of "broken" doc comments created by macro_rules invocations?

@Rafferty97
Copy link
Contributor Author

I have extracted the doc comments work into its own issue and PR. Assuming that gets merged, I'll rebase to remove those changes from this PR (even though it won't be merged for some time).

@alamb
Copy link
Contributor

alamb commented Sep 18, 2024

We have updated MSRV to 1.78 -- I think we can do this task again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate logical-expr Logical plan and expressions physical-expr Physical Expressions sqllogictest SQL Logic Tests (.slt) substrait
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace OnceLock with LazyLock
2 participants