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

MSRV for ureq #543

Closed
algesten opened this issue Sep 26, 2022 · 7 comments · Fixed by #714
Closed

MSRV for ureq #543

algesten opened this issue Sep 26, 2022 · 7 comments · Fixed by #714

Comments

@algesten
Copy link
Owner

We haven't got an explicit MSRV, just "be conservative", but it probably is time to put one in place. once_cell has bumped their MSRV to 1.56 (and edition 2021), which is a pretty huge jump for us.

De-facto our MSRV is 1.53 because of our close dependency on rustls. Since once_cell is less central to ureq than rustls, I propose we try to get rid of the once_cell dependency (maybe go back to lazy_static?) and stay aligned with rustls.

I also propose we stay with edition 2018, for now.

@algesten
Copy link
Owner Author

Also, we need to feature gate (or get rid of?) the mbedtls example, since it doesn't compile on older rustc.

@jsha
Copy link
Collaborator

jsha commented Sep 26, 2022

I found these issues pretty enlightening:

matklad/once_cell#201
rust-lang/libs-team#72

In short, since once_cell intentionally chose a semver minor release, it is still possible for ureq to support Rust versions older than 1.56. It is just up to the end-user application to pin once_cell to 1.14.0 in Cargo.lock. Since we just say once_cell = "1", that will resolve just fine. Now, it's a little hard in general for the end-user to pick such versions, but we can document this - "To build with Rust older than X, you will probably need to edit your Cargo.lock. In particular you will need to set once_cell to 1.14.0. You may need to do the same with other crates."

@algesten
Copy link
Owner Author

@jsha yes. I have read (and am following these issues).

Generally I don't agree with the positions those threads have arrived. For "foundational crates" (for lack of a better term), like libc and once_cell, I would have hoped for a far more conservative MSRV than ~1 year back. Mainly it's selfish reasons – I'm so old that 1 year goes by very fast and I have funner things to do than keeping my dev env fresh and/or editing old Cargo.lock-files for software I've once written and want to compile again.

Ureq obviously doesn't have much usage compared to those crates, but I think we can lead by example and not subject our users to the pains of ~1 year MSRV unless we're forced to.

Getting rid of once_cell seems like a small price to pay… and maybe we can even reduce deps!

@jsha
Copy link
Collaborator

jsha commented Sep 26, 2022

I think we cannot actually get rid of once_cell. We depend on it transitively via ring.

I suspect our MSRV stance will mostly be dominated by that of our downstream dependendencies, and those decisions are being hashed out now. IMO we can afford to take a wait and see approach before committing to an MSRV policy ourselves.

@rmg-x
Copy link

rmg-x commented Mar 31, 2023

FYI, it looks like once_cell is going to be added to the standard library in the near future.

See rust-lang/rust#105587

@algesten
Copy link
Owner Author

Related to #712

@algesten
Copy link
Owner Author

Time to add a CI test for this. Clearly.

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 a pull request may close this issue.

3 participants