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 lazy_static with std::sync::LazyLock #133

Open
wants to merge 1 commit into
base: canon
Choose a base branch
from

Conversation

just1602
Copy link

Hello,

This PR replace lazy_static with std::sync::LazyLock. It has been done on top of #132, so #132 needs to be merged first.

Fixes #108

Also, for a reason I didn't investigate, tests are flaky.

  • Amended the changelog in release.nix (see release.nix for instructions)

@just1602
Copy link
Author

Meh, sorry I'm very new to nixos, and I installed rust stable using rustup on my machine and I was running cargo build and cargo test to make sure everything was working, but I just ran nix-build and realize that the package use pkgs.rustc which is not rust 1.80.x, but 1.77.2 so this won't work unless people are building it with rust 1.80.x :/

@SuperSandro2000
Copy link
Member

rust 1.80.0 is available on unstable as of right now.

@just1602
Copy link
Author

I'll use OnceLock instead of LazyLock even if I prefer the later syntax, unless you tell me that it won't affect stable user and it's gonna work with unstable as of right now.

@just1602
Copy link
Author

@nyarly do you think this can be merged without impacting nixos-stable or we can merge this since rust 1.80 is only in unstable and when a new nixos stable version will be release, it's gonna have rust >= 1.80?

@nyarly
Copy link
Collaborator

nyarly commented Aug 16, 2024

We do backport to stable, so we may want to hold off on merging until 1.80 is available there. Very much appreciate the PR though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate from lazy_static to OnceLock
3 participants