Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

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

Open
cjwcommuny opened this issue Apr 22, 2021 · 1 comment

Comments

@cjwcommuny
Copy link

cjwcommuny commented Apr 22, 2021

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)

@williamleuschner
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants