-
Notifications
You must be signed in to change notification settings - Fork 1.7k
proc macro Deserialize
not expanded: Cannot create expander for libserde_derive: UnsupportedABI
#13589
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
Comments
Strange, do you have |
And what does |
I think we should try and make that error message more helpful by printing expected abi vs found one etc. |
Yes, that file exists. I don't have a
|
Looks like your project is compiled with a rustc installed from the arch linux package repos. This version is incompatible with a rustc from rustup. Does |
Arch has |
This is the issue: https://github.com/archlinux/svntogit-packages/blob/packages/rust/trunk/0001-bootstrap-Change-libexec-dir.patch Arch linux decided to move rust-analyzer-proc-macro-srv from libexec to lib, breaking rust-analyzer. @heftig why does arch linux change libexec to lib for rust-analyzer-proc-macro-srv? |
Arch doesn't have a |
Thank you very much everyone for your help. After removing the system rustc installation the issue is resolved. However, I had |
We build the path to that executable by appending |
Arch Linux never had |
I'd be in favour of us trying both |
@heftig I see. I guess we could move it to |
#13589 (comment)
I already had btw I was sure I had |
Is it also this way for your editor? (you can use |
Ah yes, that makes sense, I forgot that I only have the
Ya I did that and as expected |
internal: Add version info to unsupported proc macro abi error cc #13589 (comment)
Thanks to Akatsuki Rui (akiirui) for the bug report and patch. Fixes FS#76568 Upstream issue: rust-lang/rust-analyzer#13589 git-svn-id: file:///srv/repos/svn-community/svn@1347533 9fca08f4-af9d-4005-b8df-a31f2cc04f65
Thanks to Akatsuki Rui (akiirui) for the bug report and patch. Fixes FS#76568 Upstream issue: rust-lang/rust-analyzer#13589 git-svn-id: file:///srv/repos/svn-community/svn@1347533 9fca08f4-af9d-4005-b8df-a31f2cc04f65
Applied Akatsuki Rui (akiirui)'s patch to use /usr/lib to Arch's rust-analyzer package: |
Wouldn't this do it, then (untested)? It would be simple to add "bin" as well. The code should probably be deduplicated, though. diff --git c/crates/rust-analyzer/src/cli/load_cargo.rs i/crates/rust-analyzer/src/cli/load_cargo.rs
index 5dba545b8..c9faeaa6b 100644
--- c/crates/rust-analyzer/src/cli/load_cargo.rs
+++ i/crates/rust-analyzer/src/cli/load_cargo.rs
@@ -69,10 +69,13 @@ pub fn load_workspace(
if let Some(sysroot) = sysroot.as_ref() {
let standalone_server_name =
format!("rust-analyzer-proc-macro-srv{}", std::env::consts::EXE_SUFFIX);
- let server_path = sysroot.root().join("libexec").join(&standalone_server_name);
- if std::fs::metadata(&server_path).is_ok() {
- path = server_path;
- args = vec![];
+ for dir in ["libexec", "lib"] {
+ let server_path = sysroot.root().join(dir).join(&standalone_server_name);
+ if std::fs::metadata(&server_path).is_ok() {
+ path = server_path;
+ args = vec![];
+ break;
+ }
}
}
}
diff --git c/crates/rust-analyzer/src/reload.rs i/crates/rust-analyzer/src/reload.rs
index aa0510a4e..d7cf69c3a 100644
--- c/crates/rust-analyzer/src/reload.rs
+++ i/crates/rust-analyzer/src/reload.rs
@@ -327,21 +327,22 @@ impl GlobalState {
| ProjectWorkspace::Json { sysroot, .. } = ws
{
if let Some(sysroot) = sysroot.as_ref() {
- let server_path = sysroot
- .root()
- .join("libexec")
- .join(&standalone_server_name);
- if std::fs::metadata(&server_path).is_ok() {
- tracing::debug!(
- "Sysroot proc-macro server exists at {}",
- server_path.display()
- );
- sysroot_server = Some(server_path);
- } else {
- tracing::debug!(
- "Sysroot proc-macro server does not exist at {}",
- server_path.display()
- );
+ for dir in ["libexec", "lib"] {
+ let server_path =
+ sysroot.root().join(dir).join(&standalone_server_name);
+ if std::fs::metadata(&server_path).is_ok() {
+ tracing::debug!(
+ "Sysroot proc-macro server exists at {}",
+ server_path.display()
+ );
+ sysroot_server = Some(server_path);
+ break;
+ } else {
+ tracing::debug!(
+ "Sysroot proc-macro server does not exist at {}",
+ server_path.display()
+ );
+ }
}
}
}
|
…ib and libexec Thanks to @heftig for the new patch and Akatsuki Rui (akiirui) for their testing. Fixes FS#76568 Upstream issue: rust-lang/rust-analyzer#13589 git-svn-id: file:///srv/repos/svn-community/svn@1348996 9fca08f4-af9d-4005-b8df-a31f2cc04f65
…ib and libexec Thanks to @heftig for the new patch and Akatsuki Rui (akiirui) for their testing. Fixes FS#76568 Upstream issue: rust-lang/rust-analyzer#13589 git-svn-id: file:///srv/repos/svn-community/svn@1348996 9fca08f4-af9d-4005-b8df-a31f2cc04f65
Applied @heftig's patch to support both lib and libexec: |
rust-analyzer version: 0.3.1277-standalone
rustc version: 1.65.0 (897e37553 2022-11-02)
relevant settings: --
rustup show:
I'm getting the following error message with serde:
I've already cleaned and recompiled the project. Building and
cargo check
works fine.The text was updated successfully, but these errors were encountered: