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

Switch from lazy_static to once_cell #623

Closed
jplatte opened this issue Dec 30, 2020 · 7 comments · Fixed by #817
Closed

Switch from lazy_static to once_cell #623

jplatte opened this issue Dec 30, 2020 · 7 comments · Fixed by #817

Comments

@jplatte
Copy link
Contributor

jplatte commented Dec 30, 2020

With tokio having switched from lazy_static to once_cell in 0.3, the dependencies on lazy_static are going way down in many of my projects. It would be nice to get rid of it completely in favor of once_cell. Would you be open to a PR?

@taiki-e
Copy link
Member

taiki-e commented Dec 30, 2020

I'm the one who was in favor of this in tokio and I'm in favor of doing this in crossbeam as well. As discussed in tokio-rs/tokio#3187, there are several benefits.

However, I'm not sure how this interacts with loom PR (#487).
cc @jonhoo: Do you think loom can provide API like once_cell's Lazy?

@jonhoo
Copy link
Contributor

jonhoo commented Dec 30, 2020

Hmm, I think loom probably could, though it doesn't have such an API today. I think you best bet would be asking over in the tokio Discord in the #loom channel :)

@taiki-e taiki-e added the S-blocked Status: Blocked on something else label Jan 2, 2021
@taiki-e
Copy link
Member

taiki-e commented Apr 23, 2022

Since lazy_static has increased the MSRV to 1.40, I will do this without waiting for support on the loom side.

@jonhoo
Copy link
Contributor

jonhoo commented Apr 23, 2022

May be valuable to open a bug on the loom side to track that this is a desired feature :)

@taiki-e
Copy link
Member

taiki-e commented May 1, 2022

filed tokio-rs/loom#263

bors bot added a commit that referenced this issue May 1, 2022
817: Replace lazy_static with once_cell r=taiki-e a=taiki-e

Closes #623

Co-authored-by: Taiki Endo <te316e89@gmail.com>
@bors bors bot closed this as completed in #817 May 1, 2022
@jplatte
Copy link
Contributor Author

jplatte commented Jun 15, 2022

Any chance we can get new releases of crossbeam-epoch and crossbeam-utils with this?

@taiki-e
Copy link
Member

taiki-e commented Jun 16, 2022

Published in crossbeam-epoch 0.9.9 and crossbeam-utils 0.8.9.

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

Successfully merging a pull request may close this issue.

3 participants