4 ms·
It's a bunch of problems. Firstly, you can't even say, reasonably, that you only want >6 month old versions of libraries, at least not with cargo. Yes, you can
by est31 6y ago
It's a bunch of problems. Firstly, you can't even say, reasonably, that you only want >6 month old versions of libraries, at least not with cargo. Yes, you can express such a wish for your direct dependencies, by using = versions in Cargo.toml, but the transitive dependencies, aka the dependencies of your dependencies and so on, those you can't control. Putting Cargo.lock into git solves some of your problems, but this doesn't help you when you are adding a library. Then, for any novel transitive dependency, Cargo just takes the highest version that works.
The second problem is that even if 90% of your dependencies support older compilers, it doesn't matter, because the 10% that insist on newer compilers will still break. It can be a single dependency, and you usually have hundreds, with vastly different policies.
There are solutions to this problem, like MSRV aware cargo. They just need someone to implement them (as well as someone to compute MSRV numbers).
- jacobolus 6y agoWhat proportion of programmers/projects are (a) so risk averse/untrusting that they are unwilling to update their compiler to the latest version, but (b) want to depend on the latest version of hundreds of miscellaneous libraries?
- est31 6y agoAgain, that's how the default development workflow with rust, which uses cargo, works. Including the cargo that's packaged by debian.
- tene 6y agoI think you'll find that using an old Rust from Debian is not the default development workflow for most Rust users: https://blog.rust-lang.org/images/2020-12-rust-survey-2020/rust-versions.svg https://blog.rust-lang.org/images/2020-12-rust-survey-2020/r...
- StavrosK 6y agoHmm, what language lets you use new libraries with old compilers? The only ones I can think of are languages that have stopped being developed, because as soon one of your dependencies uses a new feature, you're done. I'm just not sure how what you're describing would work.