-
Notifications
You must be signed in to change notification settings - Fork 56
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
Bump dependencies, follow rustfmt and clippy #60
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #60 +/- ##
==========================================
- Coverage 71.39% 70.91% -0.48%
==========================================
Files 19 20 +1
Lines 1930 2022 +92
==========================================
+ Hits 1378 1434 +56
- Misses 552 588 +36 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I generally agree with the modifications, but I'd like to discuss the MSRV policy before commiting to this.
Cargo.toml
Outdated
@@ -2,7 +2,7 @@ | |||
name = "phonenumber" | |||
version = "0.3.3+8.13.9" | |||
edition = "2021" | |||
rust-version = "1.58.0" | |||
rust-version = "1.65" # because of regex 1.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to remain on 1.62? I don't necessarily know why we mandate regex = ~1.7
, but I suppose there are a lot of other dependencies that will require 1.62+...
Reason I'd like to remain compatible with 1.62 is that Sailfish OS will have that as a compiler for the next few months.
If you don't feel like figuring it out, I can try to free up some time to traverse the dependency tree.
As a general remark: there is little reason to bump dependencies (like either
) in Cargo.toml
on feature level, if we don't require that feature level. The Cargo.toml
should indicate the minimum required version of a crate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, then you have an opposite look at Cargo.toml of what I do, I tend to keep dependencies at the latest possible version (given a MSRV) to get all the new bugfixes, performance improvements and features. For now I've downgraded them all to the lowest possible version given the MSRV of 1.62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to keep dependencies at the latest possible version (given a MSRV) to get all the new bugfixes, performance improvements and features.
That is generally the idea, but specifying regex = "1"
means that by default, the latest in the 1-series will be used. There's no direct need to depend on 1.7 if we don't use 1.7 features.
Friendly ping? Would be nice to get this released to avoid duplicate dependencies. |
@djc Is that a ping for me? I thought I processed all feedback and the ball is back at the maintainers now |
No it's to me, and I indeed forgot about this. Working on it! |
I took the liberty to push the dependency bumps on your branch here, in the way that I meant them. This version broadens the compatibility, without breaking any backwards compatibility:
As far as I can see, all dependencies are hereby up-to-date. The only part that required Rust 1.62 was the I'm having a look at the test-dependencies now, such that we can have MSRV tests in CI too. |
I recommend testing MSRV in CI with |
Yes, looks like that's the way to go. I'm splitting this PR in two, one for the deps (#65) and one upcoming for the Lazy |
FWIW, unless you put in the work to have CI jobs for each semver-incompatible branch (or have CI testing (Also, while I consider myself fairly conservative on MSRV issues, I think 1.6x is a pretty reasonable target at this point, especially for low x.) |
I just tested, and apparently since the
I would still consider 1.61 at this point, since that's what SailfishOS will soon be on (if not 1.72). More out of personal "greed" or interest than anything else, for which I'm sorry. |
Main reason for this PR is to bump
strum
to 0.25 so we can get rid of the syn 1.x dependency and move to syn 2.xWhile working on it and running tests,
cargo fmt
andcargo clippy
had several remarks, so I followed those as wellMost notably
lazy_static!
has been replaced withonce_cell
as preferred by clippy