Skip to content

Spurious macro errors during development #327

@faassen

Description

@faassen

During development in VS Code with Rust analyzer, even if the build succeeds, I still get a lot of spurious errors in my editor:

"The #[php_module] macro must be called last to ensure functions and classes are registered.

Impls must be declared before you declare your startup function and module function

These go away once I restart Rust analyzer, but appear again as soon as I make any edits. This makes for an uncomfortable development experience, especially given that the build options ext-php-rs requires also seem to make cargo recompile a lot more than usual.

Does anyone else see these errors? Is there a way to fix this? I assume something is going wrong with the order in which macros are executed, and that somehow the #[php_module] macro is executed too early under some conditions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions