Suggestions tracking down not-found crate?


#1

I’m encountering the error below, which claims that serde_derive is not found in a crate that I’m depending on (which I also wrote). That crate builds just fine on its own, and does not use any features. Any ideas what might be going wrong, or how to debug this? I’m not even sure how to reproduce the build that is failing.

$ cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling vector3d v0.1.1
error[E0463]: can't find crate for `serde_derive`
  --> /home/droundy/.cargo/registry/src/github.com-1ecc6299db9ec823/vector3d-0.1.1/src/lib.rs:16:14
   |
16 | #[macro_use] extern crate serde_derive;
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to previous error

#2

I’d start with cargo build --verbose to see whether serde_derive is passed as an argument to rustc.


#3

Thank you for the advice, @cuviper, sadly (happily?) I wasn’t able to reproduce it as I failed to reproduce the failure this morning. It must have had to do with which computer (with a shared home directory) I was logged into, which was different yesterday from previously. It now works on both computers, but I habitually logged into the “normal” one first, and am unsure what fixed the issue. It may be that a cargo clean would have done it.