Skip to content

Unresolved import when using the same crate as a regular and build dep #8982

@azdavis

Description

@azdavis

When a crate B depends on a crate A as both a regular and build dependency, and then tries to reference crate A in its build.rs, rust-analyzer says there is an unresolved import. But, cargo is fine.

Here's a sample workspace that should reproduce the bug: hmm.zip

cargo build in the workspace root reports no errors but rust-analyzer does report an error:
err

  • rust-analyzer version: 3022a2c 2021-05-24 stable
  • client: vscode

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions