-
Notifications
You must be signed in to change notification settings - Fork 21
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
Edition and MSRV for this crate? #16
Comments
If the edition is not specified, cargo assumes it to be 2015 for backwards compatibility reasons. There were some versions of cargo that would feature gate the edition mechanism, where
I use anyhow in my mimas project, I'm really a fan of it, and is especially way better than what came before it. Thiserror I'm less sure about, but that's probably mainly because I haven't encountered use cases for it yet. Ogg definitely isn't because it has so few errors. Also, Ogg currently doesn't have any significant dependencies and I don't want to introduce something as heavy as those two crates even if thiserror would be worth it in isolation. E.g., currently MSRV is up to me to decide instead of me having to follow what my dependencies dictate. My mimas project already has hundreds of dependencies and more aggressive MSRV rules. As for the MSRV, yes 1.12.0 is the current MSRV if async is disabled. Since a few days, it's even tested on CI. I'm open to increasing it eventually, e.g. for #5 I'm eyeing the const if/match/loop stabilization that happened in 1.46.0, but for now it's a bit too recent. Maybe in February or something, close to the 1.50.0 release? Note that it would be a breaking change and increase the MSRV of lewton too, and I've kept the MSRV of lewton traditionally always quite old. Maybe one can instead just refactor the async feature to use async/await? 1.39.0 is old enough to depend immediately on it, but currently the async library ecosystem has multiple standards for the same thing and I don't want to lock in the ogg crate into one of them. A pure dependency-free async/await refactor might be helpful though. |
Thanks for the detailed explanation. So for now, it seems that I should go with Edition 2015 / 1.12.0 . I didn't know that edition defaults to 2015 when unspecified. But the problem is that, when I compile the project on my default toolchain (1.47.0), it gives me a lot of deprecation warning for the
so I have no idea what to do. Sorry for beginner-ish question, but how can I properly develop in 1.12.0? I think it'd be very good if the MSRV is 1.39.0, but I'm not confident in refactoring it to "dependency-free" one, since I've not really understood the async/await yet. Does "dependency-free" refers to completely removing the dependencies for As for error handling library, can't we provide it as a separate feature, so that we can obtain backtraces via those library when debugging, while using plain |
I recommend doing You can fix the Cargo.lock errors by removing the file and then letting 1.12.0 re-create it.
Yes :). |
Thanks for your advice. This is an opinion of newbie, but isn't it a common practice to place |
@TonalidadeHidrica yes some projects do that but if the number of developers is very small there is less of a benefit in it because it's just a single person. Also, just because some version is the MSRV for build doesn't automatically mean that tests have to work on it as well. E.g. serde builds on the MSRV, but tests don't work, so mainly it's the CI which test for the MSRV while devs contribute using whatever compiler they like. In general, newer compiler versions are faster (thanks to improvements in compiler speed) so for local development it's better to use newer rustcs :). That being said, the try deprecation warnings are annoying. I'll try to find a way to fix them. |
Thanks, I understood. As for the deprecation warning, we can allow entire deprecation by |
When do you think is a good time to bump the MSRV up to, for example, 1.39.0? |
@TonalidadeHidrica the question is, which feature of that release will we depend on unconditionally? Conditionally, it might make sense to specify that if you enable the async feature, 1.39.0 is the MSRV. But is there any feature that improves ogg that is worth the MSRV bump? Maybe if async is disabled, an older version can be used as MSRV? Not sure which version would be helpful here... 1.27.0 adds dyn syntax for example... yeah let's increase it to 1.27.0 for now. |
What I want is language features, rather than library features. Modern versions enable us to write code more concisely, and I prefer them. Of course you may not like some of them, and it's not a good reason enough to lock out some users. But isn't 1.12.0 "too" old? (Of course I can go with those new features, just for convenience.) |
Thank you for your effort for the upgrade. Now that my question is resolved, I'm closing this issue. |
@est31 Hi, long time no see. Since the project Edition was upgraded to 2021, could you update the mention of MSRV in the README (and maybe add |
@TonalidadeHidrica good point about rust-version, README should already have been changed by de418cf |
@est31 Oh thanks, I didn't realize. |
That one wasn't specified, and I still can't specify it because it depends on the MSRV policies of too many crates. |
What is the (intended) minimum supported version and the Rust edition for this crate? The
README
specifies the MSRV when async is enabled, but it is not specified when otherwise. As for the edition, theCargo.toml
does not include the information, but it seems that you are usingtry!
macro, which is deprecated in Rust 2018. Do you still want to stick to Rust 2015 to obtain backtrace for the errors? In order to upgrade to Rust 2018, all we have to do I think is just renametry
macro to another one and define it by ourselves, or use modern error handling library likethiserror
oranyhow
. I want you hear your policy before contributing.The text was updated successfully, but these errors were encountered: