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 #12601

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

Conversation

OussamaSaoudi
Copy link
Contributor

Which issue does this PR close?

Closes #11687

Rationale for this change

As mentioned in the issue, LazyLock is more ergonomic compared to OnceLock.

What changes are included in this PR?

In this PR, I change every occurrence of OnceLock to LazyLock

Are these changes tested?

No additional tests are needed. The existing code compiles, and tests pass.

Are there any user-facing changes?

None, this is an implementation detail.

@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) functions labels Sep 24, 2024
@OussamaSaoudi OussamaSaoudi changed the title Replace OnceLock to LazyLock, update MSRV to 1.80 Replace OnceLock with LazyLock, update MSRV to 1.80 Sep 24, 2024
@OussamaSaoudi OussamaSaoudi changed the title Replace OnceLock with LazyLock, update MSRV to 1.80 [WIP] Replace OnceLock with LazyLock, update MSRV to 1.80 Sep 24, 2024
@github-actions github-actions bot added substrait proto Related to proto crate labels Sep 24, 2024
@OussamaSaoudi OussamaSaoudi changed the title [WIP] Replace OnceLock with LazyLock, update MSRV to 1.80 Replace OnceLock with LazyLock, update MSRV to 1.80 Sep 24, 2024
@OussamaSaoudi OussamaSaoudi marked this pull request as ready for review September 24, 2024 07:11
@lewiszlw
Copy link
Member

DataFusion's Minimum Required Stable Rust Version (MSRV) policy is to support stable 4 latest Rust versions OR the stable minor Rust version as of 4 months, whichever is lower.
For example, given the releases 1.78.0, 1.79.0, 1.80.0, 1.80.1 and 1.81.0 DataFusion will support 1.78.0, which is 3 minor versions prior to the most minor recent 1.81.
If a hotfix is released for the minimum supported Rust version (MSRV), the MSRV will be the minor version with all hotfixes, even if it surpasses the four-month window.

Unfortunately, we can't bump msrv now according to the policy. We might mark this pr blocked and wait 1.84 released.

@alamb alamb marked this pull request as draft September 26, 2024 20:35
@alamb
Copy link
Contributor

alamb commented Sep 26, 2024

Sorry for misleading you @OussamaSaoudi -- it will be great when 1.80 is released

@OussamaSaoudi
Copy link
Contributor Author

np @alamb :)

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

Successfully merging this pull request may close these issues.

Replace OnceLock with LazyLock
3 participants