serde-xml-rs
serde-xml-rs copied to clipboard
serde_xml_rs::Usage fails
failures:
---- README.md - serde_xml_rs::Usage (line 11) stdout ----
error[E0464]: multiple matching crates for `serde_xml_rs`
--> README.md:15:1
|
5 | extern crate serde_xml_rs;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: candidates:
crate `serde_xml_rs`: /home/brain/rpmbuild/BUILD/serde-xml-rs-0.3.1/target/release/deps/libserde_xml_rs-1dc5f0da41faad4e.rlib
crate `serde_xml_rs`: /home/brain/rpmbuild/BUILD/serde-xml-rs-0.3.1/target/release/deps/libserde_xml_rs-454cd59720adc4d4.rlib
error[E0463]: can't find crate for `serde_xml_rs`
--> README.md:15:1
|
5 | extern crate serde_xml_rs;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
thread 'README.md - serde_xml_rs::Usage (line 11)' panicked at 'couldn't compile the test', src/librustdoc/test.rs:351:13
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
failures:
README.md - serde_xml_rs::Usage (line 11)
I cannot reproduce this on my machine or in CI with the current state of master. However, I have encountered this problem during CI builds when a new version of Rust is released. The first workaround was to clear the build cache. The automated workaround was to add a before_cache clause in the CI script (https://github.com/RReverser/serde-xml-rs/blob/master/.travis.yml#L7-L9).
BTW, in future reports, please include the specific command that was run to produce the error. I assume you ran cargo test, but I can't be certain.
Sorry for not including commands...
It was basically cargo build --release && cargo test --release
@cuviper, what could cause that rust builds another rlib file when running cargo test?
what could cause that rust builds another rlib file when running
cargo test?
Wild guess, it may be that some dev-dependencies enable more features on the regular dependencies, causing serde_xml_rs to rebuild to pick that up.
I think I have narrowed this down to docmatic doing something weird when creating the tests from the README.