ProbablyClem / utoipauto

Rust Macros to automate the addition of Paths/Schemas to Utoipa crate, simulating Reflection during the compilation phase
Apache License 2.0
129 stars 11 forks source link

(Rust-Analyzer) Issue with rust macro utoipauto. Panic on simple structure #46

Open CR7273868 opened 3 weeks ago

CR7273868 commented 3 weeks ago
#[utoipauto]
#[derive(utoipa::OpenApi)]
#[openapi()] // try to emulate () to get it to work
pub struct ApiDoc;

Error message I seem to be getting is: proc-macro panicked: unsupported proc macro punctuation character '['rust-analyzermacro-error

Although, there are no visible syntax errors (there are none to be fair). Any clue what the issue is here?

My cargo dependecies: axum = { version = "0.7.5" } axum_thiserror = "0.1.0" axum-extra = { version = "0.9.4", features = ["typed-header"] } axum-macros = "0.4.2" utoipa = "^5" utoipa-swagger-ui = { version = "8", features = ["axum", "debug-embed"] } utoipauto = "0.2.0"

DenuxPlays commented 3 weeks ago

Can you show the output what you get when you do cargo build?

DenuxPlays commented 2 weeks ago

No further information was given

NewtTheWolf commented 6 days ago

Heyy i have the same error

Cargo Build gives no Error Cargo Check gives no Error Cargo Clippy gives no Error

is jst an IDE (in my case VSCode error)

grafik

DenuxPlays commented 6 days ago

Maybe a rust-analyzer error. Not sure if we can do anything about it but I will take a look

DenuxPlays commented 6 days ago

Maybe related to: https://github.com/ProbablyClem/utoipauto/issues/36

NewtTheWolf commented 6 days ago

ye, with disabling diagnostics as said in https://github.com/ProbablyClem/utoipauto/issues/36#issuecomment-2467504582 i dont have an error anymore