hi, rls does not work on my crate anymore (since updating to latest stable).
my crate is here : https://github.com/wagnerf42/rayon-adaptive
my editor tells me : "error compiling dependent crate"
using rls --cli I got a more precise error :
{"message":"found crate libc compiled by an incompatible version of rustc","code":{"code":"E0514","explanation":null},"level":"error","spans":[{"file_name":"/home/wagnerf/.cargo/registry/src/github.com-1ecc6299db9ec823/num_cpus-1.8.0/src/lib.rs","byte_start":1395,"byte_end":1413,"line_start":35,"line_end":35,"column_start":1,"column_end":19,"is_primary":true,"text":[{"text":"extern crate libc;","highlight_start":1,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"please recompile that crate using this compiler (rustc 1.30.1 (1433507eb 2018-11-07))","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"the following crate versions were found:ncrate libc compiled by rustc 1.27.0: /home/wagnerf/code/rayon-adaptive/target/rls/debug/deps/liblibc-c93597a61cac1c00.rmeta","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0514]: found crate libc compiled by an incompatible version of rustcn --> /home/wagnerf/.cargo/registry/src/github.com-1ecc6299db9ec823/num_cpus-1.8.0/src/lib.rs:35:1n |n35 | extern crate libc;n | ^^^^^^^^^^^^^^^^^^n |n = help: please recompile that crate using this compiler (rustc 1.30.1 (1433507eb 2018-11-07))n = note: the following crate versions were found:n crate libc compiled by rustc 1.27.0: /home/wagnerf/code/rayon-adaptive/target/rls/debug/deps/liblibc-c93597a61cac1c00.rmetann"}
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous errornn"}
{"message":"For more information about this error, try rustc --explain E0514.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try rustc --explain E0514.n"}
cargo clean did not fix it.
not sure what to do from here but if I can help in any way just tell me.
crate libc compiled by rustc 1.27.0
Conflict with an older rustc, so a cargo clean + rebuild should have fixed it. Maybe some old rustc is still running somewhere? Try to kill all rls & rust processes (or restart) then cargo clean and start rls.
hi, thanks for your answer it put me on the right track.
so, cargo clean did not help. also no processes running but I just realized rustc is installed twice
(once through rustup and once through my distro). removing the distro version fixed the issue.
sorry for the bother and thank you very much. things are running again.
That's great to hear! If I understand correctly, this works now so, I'll close this for now. Feel free to open this if it's still an issue.
Most helpful comment
Conflict with an older rustc, so a
cargo clean+ rebuild should have fixed it. Maybe some old rustc is still running somewhere? Try to kill all rls & rust processes (or restart) then cargo clean and start rls.