have compile/link time error for modules and cells declaration mismatch
ethanrublee opened this issue · 3 comments
ethanrublee commented
cell.cpp
ECTO_CELL(my_ecto_module, my_ecto_module::Hello,"Hello", "Prints a string input to standard output.");
module.cpp
ECTO_DEFINE_MODULE(my_ecto_module){}
CMakeLists.txt
ectomodule(my_ecto_module
module.cpp
cell.cpp
)
We should have some way of enforcing that they all match at compile time... Its a weird error to track down at runtime, if you aren't too familiar with all of the concepts.
Could possibly do it by checking for a #define ecto_MODULE MODULE_NAME
and also have some link error that will occur...
ethanrublee commented
Have a sketch of this going... error message has something like module_must_be_named_whatshouldinameyou
in the error.
Added a few compile tests for this.
ethanrublee commented
Depends on the module_ectomodule_EXPORTS define.
ethanrublee commented
Works for me.