Open greenrobot-team opened 2 years ago
Figure out why property UIDs after newly added one are re-set (or is this just happening for tests?).
This (vs. all UIDs or none changing) is caused by
generator.Options
in test-all.go
) andChanges are expected then.
Edit: also tested generator manually with initial model file and everything works as expected.
Edit: Never mind, it's building now.
@greenrobot On macOS the Cmake build fails with
Undefined symbols for architecture x86_64:
"NewEntityName::_OBX_MetaInfo::fromFlatBuffer(void const*, unsigned long, NewEntityName&)", referenced from:
obx::Box<NewEntityName>::get(unsigned long long, NewEntityName&) in step-2.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [TestCpp] Error 1
make[3]: *** [CMakeFiles/TestCpp.dir/all] Error 2
make[2]: *** [CMakeFiles/TestCpp.dir/rule] Error 2
make[1]: *** [TestCpp] Error 2
Does that ring a bell? The signature of the generated code (fromFlatBuffer
) and the call from the C library (in ::get
) do not appear to have changed between C lib version 14 and 15. There also doesn't appear to be a differentiation for macOS that I can see.
Edit: the generated method has this signature:
void NewEntityName::_OBX_MetaInfo::fromFlatBuffer(const void* data, size_t, NewEntityName& outObject) {
Using
flex
annotation (or another name?) on a byte array property (only this FlatBuffers type?) in the FlatBuffers schema:Should generate a model file where the property type is
13
(which isFlex
):Notes
std::vector<uint8_t>
is returned for C++; there does not appear to be an official Go implementation.~ Not relevant, do not add flex properties to generated binding code, only to model JSON.Tasks
@greenrobot