Closed
Description
Right now the logic for reading metadata for a crate is to read it the first time the crate's dylib or rlib file is found. On the second file that's found, the metadata isn't read at all because metadata reading is one of the known slow portions of the compiler.
This implies that if an rlib file is regenerated, but the dylib isn't, then the two are out of sync and rustc will read the old metadata from the dylib and link to the rlib, resulting in linker errors.
I don't want to slow down rustc by reading metadata from all rlibs and dylibs, but this situation is far less than optimal. Perhaps this is a job for a rustpkg-like tool?