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

Missing .rmeta for local dependency #949

Open
Barugon opened this issue Apr 12, 2022 · 5 comments
Open

Missing .rmeta for local dependency #949

Barugon opened this issue Apr 12, 2022 · 5 comments

Comments

@Barugon
Copy link

Barugon commented Apr 12, 2022

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.

@lnicola
Copy link
Member

lnicola commented Apr 12, 2022

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

image

@Barugon
Copy link
Author

Barugon commented Apr 12, 2022

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

Thanks, I'll give it a go.

@lnicola
Copy link
Member

lnicola commented Apr 12, 2022

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 😄.

@Barugon
Copy link
Author

Barugon commented Apr 12, 2022

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

@lnicola
Copy link
Member

lnicola commented Apr 12, 2022

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.

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