Skip to content

Conversation

@rukai
Copy link

@rukai rukai commented Nov 1, 2025

https://doc.rust-lang.org/std/sync/struct.OnceLock.html was introduced in rust 1.70.0 which falls within this projects MSRV of 1.70.0 (according to the github actions config)
As such we can just replace the usage of OnceCell with OnceLock to remove the once_cell dependency.

There were some tests using once_cell::sync::Lazy in what appears to be an attempt to prevent race conditions in concurrently running tests.
However, this does not help as I still observed test failures locally and needed to set --test-threads 1. (In fact CI is setup to run --test-threads 1 anyway)
So I opted to just remove this usage entirely.

If the usage in tests was important, I am happy to do one of:

@tobz
Copy link
Member

tobz commented Nov 2, 2025

👋🏻

I like the idea to switch to serial_test to serialize the tests, since it's cumbersome to have to remember to use --test-threads 1.

@rukai
Copy link
Author

rukai commented Nov 2, 2025

I enabled serial_test for every test. It could probably be left off for some tests, but IMO better to keep it everywhere, otherwise its easy to forget when its truly needed, and its not like the test suite takes a long time to run.

#115 should fix the existing CI failures.

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.

2 participants