Bug 271179 - lang/rust: proc macro `...` not expanded: Cannot create expander for ...: unsupported ABI
Summary: lang/rust: proc macro `...` not expanded: Cannot create expander for ...: uns...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: FreeBSD Rust Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-01 18:45 UTC by Vladyslav Movchan
Modified: 2023-05-02 11:48 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (rust)


Attachments
Add `rust-analyzer-proc-macro-srv` back to the package. (1.20 KB, patch)
2023-05-01 18:45 UTC, Vladyslav Movchan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladyslav Movchan 2023-05-01 18:45:00 UTC
Created attachment 241912 [details]
Add `rust-analyzer-proc-macro-srv` back to the package.

After update from `rust-1.68.2` to `rust-1.69.0` `/usr/local/libexec/rust-analyzer-proc-macro-srv` is no longer included into the rust package.
And without this binary `devel/rust-analyzer` is unable to expand macros with the following error:
proc macro `Serialize` not expanded: Cannot create expander for /usr/home/.../target/debug/deps/libserde_derive-89f20f88a3863e70.so: unsupported ABI `rustc 1.69.0 (84c898d65 2023-04-16) (built from a source tarball)`


Rust-analyzer relies on the proc macro server provided by rustc (`rust-analyzer-proc-macro-srv`). And to make proc macro expansion work again, rust package has to contain this binary.

Attached patch fixes this issue for me. The only file added to the package is `rust-analyzer-proc-macro-srv`.
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-05-02 11:48:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=69b415675665f2e45b03aaa275f8dd466a9520cc

commit 69b415675665f2e45b03aaa275f8dd466a9520cc
Author:     Vladyslav Movchan <vladislav.movchan@gmail.com>
AuthorDate: 2023-05-02 11:45:46 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2023-05-02 11:45:46 +0000

    lang/rust: Add rust-analyzer-proc-macro-srv back to the package

    This binary is required for proc macro expansion in rust-analyzer

    PR:             271179

 lang/rust/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2023-05-02 11:48:57 UTC
Thanks!