-
Notifications
You must be signed in to change notification settings - Fork 235
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
Use the Cargo.toml version of the check-cfg squelching #577
base: main
Are you sure you want to change the base?
Conversation
It doesn't make older version of cargo complain. https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html#check-cfg-in-lintsrust-table Fixes alexcrichton#576
Thanks! Mind adding the MSRV you're interested in to |
My own MSRV is probably much more recent than what other people might be relying on, but 1.80 is really too recent. It would be great to figure out the real practical MSRV and decide what the real supported version should be. |
I've got no preference myself, I mostly figure that if you don't want this to regress again it'd be good to test in CI. No guarantee has been given up to now, but now's better late than never! Basically I think this should be tested in CI. As to exactly what version is tested, iunno what was the practical MSRV before so I'm fine if you just want to fill in what you're interested in. If someone else is so interested they can send a PR to reduce it further. |
This is actually more tricky than in looks: only versions of cargo >= 1.73.0 and < 1.80.0 complain about rustc-check-cfg output from build.rs. Versions older than cargo 1.73.0 still build curl-sys just fine... I'm not super convinced it's worth testing a version between 1.73.0 and 1.80 just for check-cfg now it's there in a way supported by these versions. |
The practical MSRV looks like it is 1.63.0, FWIW (from socket2 and cc). |
Could you merge this and do a release? |
Can you add a CI entry for the MSRV you're interested in? |
See #577 (comment) |
I still don't really understand the consequences of that comment? Why would that mean that more tests can't be added to CI? Is the crate as-is broken on only that range of rustc versions? Does your desired MSRV not fall in that range? |
Yes.
Yes, but that's kind of incidental. And once this is fixed, there isn't really a reason it would break (except if the MSRV bump abruptly, but that would be better served with a test with 1.63, which doesn't anything for this issue (it works). |
Can you add testing for your MSRV then? At the very least something needs to be added here if you'd like a guarantee it doesn't regress. If other older verisons are broken then others can send PRs to fix those if they're interested. |
How would you expect it to regress? Someone explicitly reverting the change? |
I think it's a good idea to have CI regardless of if it's likely to break or not. It serves as a good documentation reminder for future contributors and additionally doubles-up about being extra-sure that mistakes aren't made. |
I've merged and published #581 and I've double-checked it works for 1.63. If you're interested I think it'd be reasonable to add to CI here (perhaps as a second entry since as you were saying it behaves differently than 73-80). |
It doesn't make older version of cargo complain.
https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html#check-cfg-in-lintsrust-table
Fixes #576