-
Notifications
You must be signed in to change notification settings - Fork 67
Closed
Description
IntelliSense with rust-analyzer is broken in a workspace. The bindings in target/bindings are generated, but when expanding the macro recursively they aren't.
Steps To Reproduce
- Create workspace with one library crate. Minimal example: cargo-component-rust-analyzer-workspace.
- Open repo in VSCode.
- Confirm bindings are generated in target/bindings/foo/bindings.rs automatically by rust-analyzer.
- Confirm no IntelliSense when cursor is placed over
api::Guesttrait in foo/src/lib.rs#L6. - Confirm running command "rust analyzer: Expand macro recursively at caret" gives empty
bindingswhen cursor is placed overcargo_component_bindings::generate!()macro in foo/src/lib.rs#L1.
Versions
- VSCode
1.84.2 - rust-analyzer extension
v0.3.1740 cargo-componentpackage0.4.1
Additional Information
The same issue occurs to me sometimes in a non-workspace library crate, but I can't reproduce it reliably. It seems like some random combination of restarting rust-analyzer, deleting the target directory, and changing Cargo.toml can fix it, and also break it again.
Continued from #139 (comment)
peterhuene, jeffparsons and tomasol
Metadata
Metadata
Assignees
Labels
No labels