3 ms·
It catches the error, but doesn't solve the problem, because now you can't write the program you intended to write.
by wtetzner 11y ago
It catches the error, but doesn't solve the problem, because now you can't write the program you intended to write.
- pcwalton 11y agoSure you can. Just run cargo update [-p] to get both of your dependencies on the same version and then recompile. This won't work if the dependencies are truly depending on incompatible-at-the-API-level versions of the same library, of course. But there's no magic bullet solution to that—not handling versioning in the language/package manager doesn't make that problem any easier.
- wtetzner 11y agoAh, so we're on the same page :). I definitely wasn't claiming Go's (non-)solution was the way to go, just that importing multiple versions of the same library doesn't solve the problem either. I definitely agree with you that this (Rust/Cargo's) is the best solution I've seen so far.