ProbablyClem / utoipauto

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

Build fails on windows #10

Closed DenuxPlays closed 8 months ago

DenuxPlays commented 9 months ago

The following line works on Linux without any Problems but when compiled I get a few errors. The line:

#[utoipauto(paths = "./backend/src")]

More context can be found here: https://github.com/financrr/backend/blob/d883222278ea5217f0854c6a1b86ff900b71383b/backend/src/main.rs#L48

The error: image

When I add a trailing , I get the error that the crate could not parse the file.

DenuxPlays commented 9 months ago

Specifying a full path to a file works though.

DenuxPlays commented 9 months ago

Okay. I give up. It simply does not work on windows. This fucking annoying....

DenuxPlays commented 9 months ago

Things I tried:

#[utoipauto(paths = "./backend/src")]
#[utoipauto(paths = ".\\backend\\src")]
#[utoipauto(paths = ".\\/backend\\/src")]
#[utoipauto(paths = "backend/src")]
#[utoipauto(paths = "/backend/src")]
#[utoipauto(paths = "./backend/src/")]
#[utoipauto(paths = "backend/src")]

I don't know what to do... There is no alternative: wsl2 to slow when compiling, docker compiles everytime everything Please make this work. I'm frustrated. I don't fucking know where the stupd ass compiler takes the fucking error unknown start of token: \ when only using /.

ProbablyClem commented 8 months ago

Hey, Weird issue, I've never had issues on windows (but I rarely use it). I'll look into it

DenuxPlays commented 8 months ago

Hey, Weird issue, I've never had issues on windows (but I rarely use it). I'll look into it

Yes. After thinking about it (and take a good amount of sleep lol) I guess that he tries to replace the / with \ because Windows doesn't uses / in their file system. But that just a guess

DenuxPlays commented 8 months ago

Had you anytime to take a look at this?

ProbablyClem commented 8 months ago

Nope sorry

Le lun. 22 janv. 2024, 19:33, Timon Klinkert @.***> a écrit :

Had you anytime to take a look at this?

— Reply to this email directly, view it on GitHub https://github.com/ProbablyClem/utoipauto/issues/10#issuecomment-1904578100, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5KJ6WIFI6V4H36DRJ2I4LYP2WHLAVCNFSM6AAAAABCEDKN6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBUGU3TQMJQGA . You are receiving this because you were assigned.Message ID: @.***>

ProbablyClem commented 8 months ago

Hey, It's fixed on 0.1.6. It was obviously a dump backslash error. Thanks for your feedback

DenuxPlays commented 8 months ago

Hey, It's fixed on 0.1.6.

It was obviously a dump backslash error.

Thanks for your feedback

Thank you Gonna test that a little bit later But really really thank you 🙏

DenuxPlays commented 8 months ago

Thank you Works fine now :)