Skip to content
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

The RA crashed into the 'proc-macro-srv-cli' #14991

Closed
zerodegress opened this issue Jun 6, 2023 · 9 comments
Closed

The RA crashed into the 'proc-macro-srv-cli' #14991

zerodegress opened this issue Jun 6, 2023 · 9 comments
Labels
Broken Window Bugs / technical debt to be addressed immediately C-bug Category: bug

Comments

@zerodegress
Copy link

rust-analyzer version: rust-analyzer version: 0.3.1541-standalone (2f1b7ce 2023-06-04)

rustc version: rustc 1.72.0-nightly (e6d4725c7 2023-06-05)

thread 'main' panicked at 'proc-macro-srv-cli requires the `sysroot-abi` feature to be enabled', crates\proc-macro-srv-cli\src/main.rs:23:5
stack backtrace:
   0: begin_panic_handler
             at /rustc/e6d4725c76f3b526c74454bc51afdf6daf133506/library\std\src/panicking.rs:593:5
   1: panic_fmt
             at /rustc/e6d4725c76f3b526c74454bc51afdf6daf133506/library\core\src/panicking.rs:67:14
   2: rust_analyzer_proc_macro_srv::main

looks like that.
i am using the crate bevy, and when i use some macros there comes the crash:
image
looks like it is saying 'the pipe is closing',but i dont know how it means.
i tried to restart the RA event the computer but not working.

@zerodegress zerodegress added the C-bug Category: bug label Jun 6, 2023
@lnicola
Copy link
Member

lnicola commented Jun 6, 2023

Can't reproduce in 0.3.1541. Do you have any settings like rust-analyzer.server.path?

@Veykril
Copy link
Member

Veykril commented Jun 6, 2023

That's using yesterdays rust nightly proc macro server, I wonder did something go wrong with the subtree sync?

@lnicola
Copy link
Member

lnicola commented Jun 6, 2023

Oh, right, I had the previous nightly. Oof.

@lnicola lnicola added the Broken Window Bugs / technical debt to be addressed immediately label Jun 6, 2023
@Veykril
Copy link
Member

Veykril commented Jun 6, 2023

-in-rust-tree = [
    "proc-macro-srv/sysroot-abi",
    "ide/in-rust-tree",
    "syntax/in-rust-tree",
]
+sysroot-abi = ["proc-macro-srv-cli/sysroot-abi"]
+in-rust-tree = ["sysroot-abi", "ide/in-rust-tree", "syntax/in-rust-tree"]

This is the only diff part that seems relevant, but this should work fine no? Only difference is the intermediate feature flag but to my knowledge that will pass through properly right?

@Veykril
Copy link
Member

Veykril commented Jun 6, 2023

@zerodegress you can get around this by downgrading your toolchain to a version from before yesterday for now

@lnicola
Copy link
Member

lnicola commented Jun 6, 2023

https://github.com/rust-lang/rust/blob/master/src/bootstrap/tool.rs#L707-L718

I think the proc macro server gets built with proc-macro-srv/sysroot-abi, but without sysroot-abi? But the panic is in proc-macro-srv-cli.

@Veykril
Copy link
Member

Veykril commented Jun 6, 2023

Ah, that explains it. proc-macro-srv-cli was previously a dependency of proc-macro-srv https://github.com/rust-lang/rust-analyzer/pull/14432/files#diff-90bc501a1b3268c21aa349b968f706e31ac022ddb76b05eb675ca44066eb1ecb

So no subtree problems, we just need to update the build step

@zerodegress
Copy link
Author

@zerodegress you can get around this by downgrading your toolchain to a version from before yesterday for now

Thanks, it realy works.
hope this be fixed soon.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 8, 2023
…Veykril

Fix rust-analyzer proc macro server

The feature now exists on `proc-macro-srv-cli`, and without it the proc macro server will bail rigth out.

CC rust-lang/rust-analyzer#14991
@lnicola
Copy link
Member

lnicola commented Jun 9, 2023

Fixed in the 2023-06-08 nightly toolchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Broken Window Bugs / technical debt to be addressed immediately C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants