rust-lang/vscode-rust

Missing .rmeta for local dependency

Barugon opened this issue · 5 comments

Here are the steps to reproduce:

  1. Clone gdal
  2. Create a new Rust project next to the gdal folder
  3. Edit the new project's Cargo.toml file to include this dependency: gdal = {path = "../gdal"}
  4. Add an import for gdal in main.rs. Example: use gdal::*;

Here's the error that I see in VSCode:
Screenshot from 2022-04-11 17-05-49

If I look in the target/rls/debug/deps folder then, sure enough, the .rmeta (and .rlib) files are missing for gdal. The project does build normally and those files are present in the target/debug/deps folder.

Would you mind giving the https://marketplace.visualstudio.com/items?itemName=matklad.rust-analyzer extension a try?

Thanks, I'll give it a go.

See https://blog.rust-lang.org/2022/02/21/rust-analyzer-joins-rust-org.html for context. IIRC, RA has some problems with the gdal-sys types, but I haven't looked into those. They might be related to the build script.

Also, hello from GeoRust 😄.

Hmm... bummer that rust-analyzer seems to ignore my tab size setting.

rust-lang/rust-analyzer#1191, but you should enable format on save, make a rustfmt.toml and configure it there.

EDIT: well, I can see how that could be quite annoying.