Proc macro not expand: crate has not been built

I've been using helix for a while and it's been great.

But I meet this almost every #[derive()], and I couldn't find a clue on internet🥺

proc macro some_derive not expanded: crate has not (yet) been built

Are you using Rust Analyzer with Helix?

I run into this before just in RA startup on neovim. And after all preparations RA needs are done, this error is gone. So it might indicate something haven't been prepared I guess.

Yes! (I thought I replied from email, but it's not showing

Rust Analyzer can only expand procedural macros after cargo has built the macros. Running cargo check forces them to be built (which RA does at startup).

So either RA can't find the proc macro objects in the target folder or they aren't being built for some reason.

1 Like

yes, some fades away waiting for RA's preparation. Yet some stay. It says I should build that crate, but I know only cargo build

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.