Skip to content

Proc macro server crashed #12527

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

Closed
lythesia opened this issue Jun 14, 2022 · 4 comments
Closed

Proc macro server crashed #12527

lythesia opened this issue Jun 14, 2022 · 4 comments

Comments

@lythesia
Copy link

Just use serde's derive macro and leads to

RA output:

memory allocation of 140607273619940 bytes failed
[ERROR rust_analyzer::reload] proc macro server crashed: server exited
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: Broken pipe (os error 32)
...

rust-analyzer 0.0.0 (366bd72 2022-06-12) (which is auto-installed by vscode extension)
rustc 1.49.0-nightly (ffa2e7ae8 2020-10-24)

I think it's not dup with #12495 because I was using quite old rustc version

@lnicola
Copy link
Member

lnicola commented Jun 14, 2022

We only support one range of nightlies per release cycle, those that match what ends up in stable. Can you upgrade to a different one?

@lythesia
Copy link
Author

Thanks for responding!
I'm working with rust-sgx-sdk which requires specific (old) version of rust toolchain
So may I downgrade rust-analyzer to make it work with proc macro again?

@lythesia
Copy link
Author

I downgraded RA to v0.3.1083, and it seems to work well now.
Thanks again and close it.

@lnicola
Copy link
Member

lnicola commented Jun 14, 2022

To expand, the interface between the compiler (or RA) and proc macros changes every now and then. We support stable 1.48 and stable 1.49, but some 1.49 nightlies will be compatible with 1.48, and some with 1.49 (and maybe some with neither, when there are multiple changes during a release cycle). But we can't test every nightly, and we'll use the 1.49 ABI even for those 1.49 nightlies that are still using the 1.48 ABI.

I'm working with rust-sgx-sdk which requires specific (old) version of rust toolchain

I think they've upgraded to newer nightlies, but unfortunately it still doesn't work on stable. Of course, that doesn't mean it's easy for you to upgrade.

I downgraded RA to v0.3.1083, and it seems to work well now.

See #12525 (comment).

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

No branches or pull requests

2 participants