How to troubleshoot dependencies conflict?


#1

I have added human-panic = "0.4.0" to my Cargo.toml file and got cargo error:

error: failed to select a version for `tempdir` (required by `native-tls`):
all possible versions conflict with previously selected versions of `tempdir`
  version 0.3.7 in use by tempdir v0.3.7
  possible versions to select: 0.3.5

What is the process, tools and ways to dig deeper in Rust build ecosystem?


#2

Does running cargo update or deleting Cargo.lock help? native-tls requires 0.3.anything, and human-panic 0.3.7-or-later, so they should work together.

For inspecting dependencies there’s cargo-tree, but in case of a conflict it might tell you exactly the same thing. cargo tree -d is nice for finding redundant dependencies.


#3

Thanks. Upgrading to 1.26 compiler resolved the problem somehow…