Closed zzorba closed 1 week ago
User error, we have to add these to our turbo-modules command as additional packages.
Actually, it looks like if you specify the package names with - instead of _, it produces invalid c++ code:
Looks like a normalize step was missed here to turn them into _ names that match the .hpp files. If you specify matrix-sdk-ffi
it produces this, instead of the expected matrix_sdk_ffi.hpp
#include "rn-diode.h"
#include "generated/diode.hpp"
#include "generated/matrix-sdk-ffi.hpp"
#include "generated/matrix-sdk-ui.hpp"
#include "generated/matrix-sdk-crypto.hpp"
#include "generated/matrix-sdk-base.hpp"
#include "generated/matrix-sdk.hpp"
I added #71 in response to this issue, making it easier to generate these files with the correct inputs.
We got a problem where a uniffi symbol from the MatrixSdkFFI (a dependency of Diode) was getting an undefined error at runtime.
Looking at the generated rn-diode.cpp file (which does registrations) is only registering the top level module:
Here is the generated file as is:
But in the cpp folder, there are lots of other hpp/cpp pairs that each have their own static
registerModule
method that is not being called (as far as I can tell).We tried manually editing rn-diode.cpp to include the matrix_sdk_ffi.hpp and call
NativeMatrixSdkFfi::registerModule
, and it seemed to resolve Wes's issue.