-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Tests failing with multiple matching crates for serde
#4015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
First of all, sorry for the breakage. I'll also paste the Rust CI logs (albeit for a diferent case):
As I understand it, this is because we have 2 version of serde:
which is pulled for the compiletest compiler invocation (wrapped in a I don't have a clear idea how to approach this, so to think out loud: Obviously we can't drop the I don't think we can ever let local deps coalesce to the ones used in the compiler, because they may be semver-incompatible and compiler would like to have its own thread-locals and such. Could we somehow "blacklist" sysroot crates on a lib-searching level if a I hope solving this would also enable using FWIW RLS and Clippy work correctly with Rust patch on crates that pull serde dependency (tested in the RLS). Worst case, I can revert the patch but would really like to see a path forward with this. EDIT: It seems we can disambiguate these by using explicit |
Indeed, with the original invocation of
I get the following error:
but if I add the disambiguating
this correctly compiles. |
compiletest: Disambiguate extern crate deps shared with the compiler Fixes #4015. changelog: Handle deps shared with the compiler in the internal compiletest suite Attempts to fix the multiple matching crates error using the `--extern dep=path` disambiguation. This only includes `serde` at the moment because it's the only problematic dep right now (is inside Rust sysroot and pulled via `extern crate` in the test suite). I'm not exactly sure this is the right approach (FWIW it fixes the issue locally), please do tell if this should be done differently.
Improve compile_test and dogfood tests * Hopefully this finally resolves the "multiple matching crates" error, e.g. #4015 * This handle some convenient CARGO env like CARGO_TARGET_DIR and CARGO_BUILD_TARGET changelog: none
Improve compile_test and dogfood tests * Hopefully this finally resolves the "multiple matching crates" error, e.g. #4015 * This handle some convenient CARGO env like CARGO_TARGET_DIR and CARGO_BUILD_TARGET changelog: none
Improve compile_test and dogfood tests * Hopefully this finally resolves the "multiple matching crates" error, e.g. #4015 * This handle some convenient CARGO env like CARGO_TARGET_DIR and CARGO_BUILD_TARGET changelog: none
rust-lang/rust#60053 broke the Clippy tests. Specifically
tests/ui/serde.rs
fails with:I'm not really sure how fix this. Maybe somewhere in compiletest-rs? The error still happens with a clean Rust master installation. Can we somehow ignore the sysroot serde?
cc Manishearth/compiletest-rs#114, rust-lang/rust#24853
The text was updated successfully, but these errors were encountered: