zesterer / chumsky

Write expressive, high-performance parsers with ease.
https://crates.io/crates/chumsky
MIT License
3.63k stars 155 forks source link

Slow build times #696

Closed KrosFire closed 1 week ago

KrosFire commented 3 weeks ago

Hi, I have trouble with building my project ever since I've moved to 1.0.0-alpha.7. I have a lot of statements and expressions in my language, so I have two recursions. Initially All statements and expressions where in separate functions in separate files. I think that the issue is with the generic lifetime ('static won't do for me). I've tried to move these functions into a struct with a single lifetime and to consolidate all the parsers to just 3 functions, but it still doesn't work.

rust-analyze and rustc take almost all of my CPU and it takes forever for any results. This setup worked perfectly in older 0.9 version. When I run cargo build -Z time-passes the process gets stalled after misc_checking_1.

I don't know if it's something you can help me with, or is it just my skill issue XD

zesterer commented 3 weeks ago

Have you checked out this section of the guide?

KrosFire commented 1 week ago

Okay, I boxed everything and changed every or to choice and it build in reasonable time (clean build with deps 30s).

Thank you. <3