RobotWebTools / rclnodejs

Node.js version of ROS 2.0 client
https://docs.ros.org/en/humble/Concepts/Basic/About-Client-Libraries.html?highlight=rclnodejs#community-maintained
Apache License 2.0
316 stars 70 forks source link

Compilation warning on newer node versions: v8 has a new ArrayBuffer BackingStore API #735

Closed felixdivo closed 2 years ago

felixdivo commented 3 years ago

I get this output by node-gyp rebuild (invoked using scripts/build.sh) on Node version v14.10.1:

../src/rcl_bindings.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE rclnodejs::CreateArrayBufferFromAddress(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/rcl_bindings.cpp:1330:70: warning: ‘static v8::Local<v8::ArrayBuffer> v8::ArrayBuffer::New(v8::Isolate*, void*, size_t, v8::ArrayBufferCreationMode)’ is deprecated: Use the version that takes a BackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
 1330 |                            v8::ArrayBufferCreationMode::kInternalized);
      |                                                                      ^
In file included from /home/felix/.cache/node-gyp/14.10.1/include/node/node.h:67,
                 from ../node_modules/nan/nan.h:56,
                 from ../src/rcl_bindings.hpp:18,
                 from ../src/rcl_bindings.cpp:15:
/home/felix/.cache/node-gyp/14.10.1/include/node/v8.h:5169:29: note: declared here
 5169 |   static Local<ArrayBuffer> New(
      |                             ^~~
../src/rcl_bindings.cpp:1330:70: warning: ‘static v8::Local<v8::ArrayBuffer> v8::ArrayBuffer::New(v8::Isolate*, void*, size_t, v8::ArrayBufferCreationMode)’ is deprecated: Use the version that takes a BackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
 1330 |                            v8::ArrayBufferCreationMode::kInternalized);
      |                                                                      ^
In file included from /home/felix/.cache/node-gyp/14.10.1/include/node/node.h:67,
                 from ../node_modules/nan/nan.h:56,
                 from ../src/rcl_bindings.hpp:18,
                 from ../src/rcl_bindings.cpp:15:
/home/felix/.cache/node-gyp/14.10.1/include/node/v8.h:5169:29: note: declared here
 5169 |   static Local<ArrayBuffer> New(
      |                             ^~~```

I didn't include it in #734 as I don't really know any v8 internals.

minggangw commented 3 years ago

723 is supposed to solve the compiling error on Node.js >= 14

minggangw commented 3 years ago

@felixdivo thanks for your contributions recently, we have a small group of teams where developers could plan/discuss for the rclnodejs project, and if you are interested in and want to contact others closely, I'd like to invite you to join the teams, thanks!

wayneparrott commented 3 years ago

@felixdivo Join rclnodejs developers on Slack — Sign up here, from any device: https://join.slack.com/t/rclnodejsdev/shared_invite/zt-jjukoa3l-zZ5VeAeo~YD11vmUC2Mdnw

minggangw commented 3 years ago

Oops, sorry I mean slack, Teams is used in Intel...

felixdivo commented 3 years ago

723 is supposed to solve the compiling error on Node.js >= 14

Ah great, so we can just add "closes # 635" to that PR. Nice that it's already being tackled!

I've kinda used up my current free time with a few contributions the last days :P but when I'm feeling like doing some more in this project, I'm happy to join! Thanks! :)

minggangw commented 3 years ago

Never mind, none of us works on the project full-time, so welcome 🚀

minggangw commented 3 years ago

Hi @felixdivo I haven't seen you in the slack channel of rclnodejs, if you met any problem, please send me your email address and I will send the invitation again.

felixdivo commented 2 years ago

Hey @minggangw, sorry for not writing about this, but I retreated to other projects.