Debugging Toql
Toql generates a lot of code. Mostly from the Toql derive, but also from various macros, such as query!.
To debug Toql generated code, follow these steps:
- If you have a lot of modules move the affected
modat the end of the mod list. (So generated code will appear in the terminal last). - Run
cargowith the logger enabled and a single job:RUST_LOG=DEBUG cargo check --jobs=1 - Copy all the logged code from the derived struct and paste it into the source file.
- Remove the log headers by regex replacing
\[2.*with an empty string. There should be 13 occurences. - Copy your derived struct.
- Comment out your derived struct.
- On the copied struct remove all references to Toql.
- Format your document and debug!
Support
If you have issues with Toql you can post them on GitHub.