rls icon indicating copy to clipboard operation
rls copied to clipboard

ERROR rls::build::cargo_plan] Modified file XXX didn't correspond to any buildable unit!

Open byte-sourcerer opened this issue 4 years ago • 1 comments

I encountered this error when implement a rust extension:

[2021-04-22T02:35:55Z ERROR rls::build::cargo_plan] Modified file /Volumes/Macintosh HD/Users/XXX/Downloads/hello_cargo/src/main.rs didn't correspond to any buildable unit!

The error comes from here.

The error occurs because the path of modified file is /Volumes/Macintosh HD/Users/XXX/Downloads/hello_cargo/src/main.rs but the the src_dir (see here) is something like /XXX/Downloads/hello_cargo/src/, so they don't have the same prefix. But actually, /Volumes/Macintosh HD is just a symlink to /.

Possible solution: canonicalize the path of the modified file first, and then compare the path with the src_dir. Maybe someone can fix it ? (I'm not familiar with the codebase, otherwise I can make a pull request)

byte-sourcerer avatar Apr 22 '21 02:04 byte-sourcerer

I'm also experiencing this issue, it would be great if someone with more Rust knowledge could take a look at it.

williamleuschner avatar Jun 22 '21 05:06 williamleuschner