Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle cargo package renames #464

Closed
flodiebold opened this issue Jan 8, 2019 · 2 comments · Fixed by #466
Closed

Handle cargo package renames #464

flodiebold opened this issue Jan 8, 2019 · 2 comments · Fixed by #466

Comments

@flodiebold
Copy link
Member

We currently don't handle the case where a package is renamed in the Cargo.toml, e.g. in ra_analysis where ra_hir is imported as hir instead, so the name resolution fails there. I think this needs to be fixed in from_cargo_metadata in project_model.rs (the name of the PackageDependency should be the renamed name), but I'm not sure what's the correct way of getting this information from the cargo metadata.

@matklad
Copy link
Member

matklad commented Jan 8, 2019

This is fixed in https://github.com/rust-analyzer/rust-analyzer/tree/new-metadata and waits for oli-obk/cargo_metadata#59.

Guess I'll just merge that with the patch

@flodiebold
Copy link
Member Author

Ah, great :)

bors bot added a commit that referenced this issue Jan 8, 2019
466: switch to newer cargo-metadata r=matklad a=matklad

This handles renames

closes #464

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
bors bot added a commit that referenced this issue Jan 8, 2019
466: switch to newer cargo-metadata r=matklad a=matklad

This handles renames

closes #464

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
@bors bors bot closed this as completed in #466 Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants