pmed / v8pp

Bind C++ functions and classes into V8 JavaScript engine
http://pmed.github.io/v8pp/
Other
890 stars 120 forks source link

Support for node.js 10.1 #71

Closed mkrivos closed 6 years ago

mkrivos commented 6 years ago

Hello, node.js 10.1 uses v8 version 6.6 and is not source compatible with current v8pp. Is there any plans to support this in near future?

Thanks.

pmed commented 6 years ago

Hi,

I am not sure about the near future, since I am currently not involved the project actively, but pull requests are welcome :-)

Probably I will try it with the newer V8 version after successful https://github.com/pmed/v8-nuget update.

mkrivos commented 6 years ago

Ok. I will try to see at the code.

pmed commented 6 years ago

Hi @mkrivos

I've updated v8::TryCatch ctor calls, the project tests are now passing with V8 version 6.7

mkrivos commented 6 years ago

Hi @pmed Error from node 10.2: /home/rsys/.cmake-js/node-x64/v10.2.0/include/node/node.h:53:10: fatal error: core.h: File not found

Seems that some files are lost ...

pmed commented 6 years ago

Well the error is in node.h file, that is definitely not a v8pp issue.

I've successfully built and run addons from v8pp/examples/ both with Node 10.1 and 10.2 versions.

mkrivos commented 6 years ago

It seems that it is BIG bug - https://github.com/nodejs/node/issues/20921

mkrivos commented 6 years ago

Is it my bug?

/usr/bin/c++ -DLITTLE_ENDIAN_MACHINE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_REENTRANT -Dastlibjs_EXPORTS -I/opt/rsys/platform/include -I../.. -I../. -I../../../common/asterix -I../../../common/rsys -I../../../common/astlib -I../node_modules/v8pp -I/home/rsys/.cmake-js/node-x64/v10.2.1/include/node -std=c++11 -g -Wall -pipe -Wno-parentheses -Werror=return-type -Wno-address -Wno-unused-local-typedefs -Wno-deprecated-declarations -fno-diagnostics-show-caret -fdiagnostics-color=auto -Werror=narrowing -Wno-unknown-pragmas -Wno-cpp -msse2 -ftree-vectorize -std=c++14 -fdiagnostics-color=auto -fopenmp -O3 -DNDEBUG -fPIC -std=gnu++14 -MD -MT CMakeFiles/astlibjs.dir/lib/astlib.cpp.o -MF CMakeFiles/astlibjs.dir/lib/astlib.cpp.o.d -o CMakeFiles/astlibjs.dir/lib/astlib.cpp.o -c ../lib/astlib.cpp In file included from ../lib/astlib.cpp:21: .././node_modules/v8pp/v8pp/object.hpp: In function ‘void v8pp::set_const(v8::Isolate, v8::Handle, const char, const T&)’: .././node_modules/v8pp/v8pp/object.hpp:70:11: error: ‘class v8::Object’ has no member named ‘ForceSet’ ../lib/astlib.cpp: In function ‘void InitAll(v8::Handle)’: ../lib/astlib.cpp:631:47: error: no matching function for call to ‘v8::Object::SetPrototype(v8::Local)’ In file included from ../lib/astlib.cpp:1: /home/rsys/.cmake-js/node-x64/v10.2.1/include/node/v8.h:3308:37: note: candidate: ‘v8::Maybe v8::Object::SetPrototype(v8::Local, v8::Local)’ /home/rsys/.cmake-js/node-x64/v10.2.1/include/node/v8.h:3308:37: note: candidate expects 2 arguments, 1 provided In file included from ../lib/astlib.cpp:17: .././node_modules/v8pp/v8pp/class.hpp: In instantiation of ‘v8::Handle v8pp::detail::object_registry::wrap_object(const pointer_type&, bool) [with bool use_shared_ptr = false; v8::Handle = v8::Local; v8pp::detail::object_registry::pointer_type = void]’: .././nodemodules/v8pp/v8pp/class.hpp:732:84: required from ‘static v8::Handle v8pp::class<T, use_shared_ptr>::import_external(v8::Isolate, const object_pointer_type&) [with T = AsterixRecordWrapper; bool use_sharedptr = false; v8::Handle = v8::Local; v8pp::class<T, use_shared_ptr>::object_pointer_type = AsterixRecordWrapper*]’ ../lib/astlib.cpp:265:48: required from here .././node_modules/v8pp/v8pp/class.hpp:279:25: error: no matching function for call to ‘v8::Function::NewInstance()’

mkrivos commented 6 years ago

Sorry, it's my bug.