FS#76568 - [rust-analyzer] Cannot create expander for libserde_derive: UnsupportedABI
Attached to Project:
Community Packages
Opened by Akatsuki Rui (akiirui) - Monday, 14 November 2022, 17:35 GMT
Last edited by Daniel M. Capella (polyzen) - Tuesday, 15 November 2022, 21:09 GMT
Opened by Akatsuki Rui (akiirui) - Monday, 14 November 2022, 17:35 GMT
Last edited by Daniel M. Capella (polyzen) - Tuesday, 15 November 2022, 21:09 GMT
|
Details
Description:
Cannot create expander for libserde_derive: UnsupportedABI This issue is casued by https://github.com/archlinux/svntogit-packages/commit/381888bfbe5b50c030a2904680b9c03cb39706f6 The package rust has a patch to change path `libexec` to `lib` for Arch Linux, but it breaks some features of rust-analyzer . Additional info: * package version(s) - rust: 1.65.0-1 - rust-analzyer 20221114-1 * link to upstream bug report, if any - https://github.com/rust-lang/rust-analyzer/issues/13589 Steps to reproduce: 1. install rust and rust-analyzer 2. cargo new bug 3. cd bug 4. cargo add serde --features derive 5. use code to open this project (with extension: rust-analzyer) 6. edit main.rs and see problems outputs ``` use serde::Deserialize; #[derive(Deserialize)] enum Name {} fn main() { println!("Hello, world!"); } ``` Here have a patch, follow changes of the package rust. Or waiting for upstream fix this issue, or revert changes of the package rust. |
This task depends upon
Closed by Daniel M. Capella (polyzen)
Tuesday, 15 November 2022, 21:09 GMT
Reason for closing: Fixed
Additional comments about closing: 20221114-3 https://github.com/archlinux/svntogit-co mmunity/commit/e60584b2baa36a297d4f6ebd4 2bafcecf90462ae
Tuesday, 15 November 2022, 21:09 GMT
Reason for closing: Fixed
Additional comments about closing: 20221114-3 https://github.com/archlinux/svntogit-co mmunity/commit/e60584b2baa36a297d4f6ebd4 2bafcecf90462ae
This needs to be fixed by changing the code to check both lib and libexec paths for the proc-macro-srv executable.
BTW, the rust-analyzer package also ships a proc-macro-srv, but this one is in /usr/bin/ and also gets ignored.
And I have tested your patch (at https://github.com/rust-lang/rust-analyzer/issues/13589#issuecomment-1314571988)
It's works fine with extra/rust and community/rustup. maybe polyzen can apply this patch for rust-analzyer until upstream fix this.
---
And I think `community/rust-analyzer` can remove `rust-analyzer-proc-macro-srv` from the package, because it is a part of rust (rustup toolchains are also contains it).