We tell people to write a Dart config script for FFIgen/JNIgen, and give them a bunch of examples. But if you write a config, and the API elements you expect don't appear in your bindings, it's unclear what to do next.
One debugging approach, under the new visitor API, is to write a custom visitor that just prints all the API elements. Then you can see if the problem is that you haven't set the correct entry points (headers etc), or your filters are misconfigured.
We should provide a util that does this, so users don't have to do it. Best API is probably an extension method on FfiGenerator/JniGenerator that dumps all the AST nodes (public AST nodes, as seen by a custom visitor). Eg:
Func(originalName, USR)
ObjCInterface(originalName, USR)
ObjCMethod(ObjCInterface(originalName, USR), methodSelector)
...
That output is not the most human readable format, but it's clear and greppable. Other suggestions welcome.
We tell people to write a Dart config script for FFIgen/JNIgen, and give them a bunch of examples. But if you write a config, and the API elements you expect don't appear in your bindings, it's unclear what to do next.
One debugging approach, under the new visitor API, is to write a custom visitor that just prints all the API elements. Then you can see if the problem is that you haven't set the correct entry points (headers etc), or your filters are misconfigured.
We should provide a util that does this, so users don't have to do it. Best API is probably an extension method on
FfiGenerator/JniGeneratorthat dumps all the AST nodes (public AST nodes, as seen by a custom visitor). Eg:That output is not the most human readable format, but it's clear and greppable. Other suggestions welcome.