Skip to content

v0.3.1766 breaks intellisense & "go to definition" for generated tonic types #16109

Closed
@mikeparisstuff

Description

@mikeparisstuff

After updating to v0.3.1766 "go to definition" and intellisense breaks for tonic generated types. Reverting to version v0.3.1756 fixes the issue. I suspect it has something to do with the handling of include! macros as the tonic code-gen creates modules like this:

pub mod protos {
    pub mod accounts {
        pub mod service {
            pub mod v1 {
                include!("protos.accounts.service.v1.rs");
            }
        }
    }
}

The "go to definition" works for

aiproto::protos::aimodels::v1

but not for

aiproto::protos::aimodels::v1::Account which lives behind the include!.

RA does not report any other errors and running cargo build continues to build successfully. Let me know if you need more details.

rust-analyzer version: v0.3.1766

rustc version: rustc 1.74.1 (also tried with rustc 1.70.*)

relevant settings: Its specific to the v0.3.1766 version as rolling back to v0.3.1756 fixes the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macromacro expansionBroken WindowBugs / technical debt to be addressed immediatelyC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions