intellij-rust
intellij-rust copied to clipboard
Macro expansion does not work for proto-generated files with `Prost`
Environment
- IntelliJ Rust plugin version: 0.4.164.4409-212
- Rust toolchain version: 1.58.0-nightly (8b09ba6a5 2021-11-09) x86_64-apple-darwin
- IDE name and version: CLion 2021.2.3 (CL-212.5457.51)
- Operating system: macOS 11.4
- Macro expansion engine: new
- Name resolution engine: new
- Additional experimental features: org.rust.cargo.features.settings.gutter, org.rust.cargo.evaluate.build.scripts, org.rust.macros.proc
Problem description
With the latest version of rust plugin, I cannot expand proc macros in the protobuf files generated via Prost
Steps to reproduce
- Clone the prost repo at https://github.com/tokio-rs/prost
- Checkout to commit
780d80fb261ebb5f6dc485fddae99b6b48a40aa6 - Open the project with Clion which has the latest rust plugin.
- Cargo build the project, this step will generated
.rsfiles out of protobuf definitions. - Randomly look at a protobuf generated struct. (I hold my
cmdbutton and clickproto3::presence::Ain line https://github.com/tokio-rs/prost/blob/780d80fb261ebb5f6dc485fddae99b6b48a40aa6/tests/src/lib.rs#L618-L618) - Try to expand the macro
protst::Message, and see the error.

Any update for this problem?
Works well on my idea today with the newest version.