'getQueryJsonSql' is not GC-safe as it calls 'renderSQL'
The error message is quite understandable... The ra procedure is not gcsafe because it calls rs which itself is not gcsafe. renderSQL is not gcsafe because it calls ra which is not gcsafe.
To understand why a procedure might ot might not be gcsafe, you should add {.gcsafe.} to it and you will get more detailed information about it. If a procedure is forward declared, the compiler might not detect gcsafety correctly and the forward declaration should contain the gcsafe annotation if it is safe. Closures and function pointers should be marked gcsafe too if required.
Thank you. We did not have an issue with the error messages, though.
The issue is that are using parsesql quite a bit within our code and need to get threads running. This breaks because we can't get renderSQL gcsafe.
Any idea on how we could get rendersql (resp. parsesql) gcsafe?
We will fix the library, of course. As a workaround use:
{.cast(gcsafe).}:
let x = parseSql(...)