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

Adding a dependency to Cargo.toml require RLS + IDE restart #1240

Closed
@norru

Description

@norru

Adding a dependency to Cargo.toml doesn't trigger a rebuild. As a result, any reference to the added dependency results in a compilation error.

For

[dependencies]
...
notify = "*"
...

main.rs:

extern crate notify;

RLS log:

org.eclipse.corrosion.rls to LSP4E:{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"E0463","message":"can't find crate for `notify`\n\ncan't find crate","range":{"end":{"character":20,"line":38},"start":{"character":0,"line":38}},"severity":1,"source":"rustc"}],"uri":"file:///home/norru/Projects/ivt/parallax_testbed/src/main.rs"}}

Workaround: restarting the RLS (and the IDE) triggers a rebuild and the missing crate is linked correctly.

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