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

Make once_cell optional to meet reasonable MSRV #128

Closed
TheBlueMatt opened this issue Sep 22, 2022 · 9 comments
Closed

Make once_cell optional to meet reasonable MSRV #128

TheBlueMatt opened this issue Sep 22, 2022 · 9 comments

Comments

@TheBlueMatt
Copy link

once_cell switched to "no MSRV at all" in matklad/once_cell#201, which makes it rather annoying to use aHash in any project that supports anything other than "latest rustc", which makes it annoying to use hashbrown in anything other than "latest rustc". Given the relatively little use of once_cell in ahash, it should be rather trivial to simply remove it entirely, which would be much appreciated.

@notgull
Copy link

notgull commented Sep 22, 2022

I was under the impression that once_cell's MSRV was bumped to 1.56.0, rather than being abandoned entirely?

@TheBlueMatt
Copy link
Author

I don't believe so, no, that's just the current effective MSRV, quoting the linked issue:

We support workflows which target up-to-date, supported versions of Rust compiler, but we also give somewhat generous grace period, as keeping perfectly up-to-date is hard.

We explicitly do not support workflows which depend on using the old compiler. Making sure that the latest once_cell can be compiled with rustc packaged with debian stable is a non-goal.

@matklad
Copy link

matklad commented Sep 22, 2022

There's a big range of possibilities between "debian stable" and "latest stable". once_cell is using "about a year old MSRV". This is very comfortable for folks who try to generally keep up to date. That is not enough for various LTSes, which are typically more-than-a-year long.

@TheBlueMatt
Copy link
Author

TheBlueMatt commented Sep 22, 2022

Yep, its totally a reasonable decision...maintainers get to decide what they want to support. Doesn't mean downstream projects shouldn't/can't decide to switch if they want to support more :). In this case we're switching, and it'd be easiest for us if ahash also switches, otherwise we'll swap ahash for a different hasher in our (nostd) hashtables...hence this issue/question.

@striezel
Copy link
Contributor

That is not enough for more-than-a-year LTSes.

Anything below a year is not really worth calling it LTS, is it? After all, the L in LTS stands for "Long", and something like six months is not really long.

Don't get me wrong here: Code maintainers / owners always get to decide what they support and for how long they are willing to support it. But everything below a year does not really deserve to be called LTS, in my opinion.

@matklad
Copy link

matklad commented Sep 26, 2022

Thanks, my wording was ambiguous, clarified.

@tkaitchuck
Copy link
Owner

Some features like: #136 do impose version requirements. (For example that feature won't wore before 1.54) I don't know a way to do conditional compilation based on the Rust version number. So removing onceCell may not be the only obstacle.

I am using use once_cell::race::OnceBox which is a very small amount of code. Rather than try to find a way around it, it might be better to break that out into its own crate.

@TheBlueMatt
Copy link
Author

TheBlueMatt commented Oct 25, 2022

At least for my use-case (no-std hashmaps by directly depending on hashbrown, which disables ahash default-features), I'm not worried about the std feature. Ideally, of course, that too would have a strong MSRV guarantee, but providing a strong MSRV guarantee for some feature subset is still a good step forward.

@tkaitchuck
Copy link
Owner

A PR is open to add MSRV: #181

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

No branches or pull requests

5 participants