Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node 11.3 deprecated warnings #684

Closed
alanosman opened this issue Dec 6, 2018 · 3 comments
Closed

Node 11.3 deprecated warnings #684

alanosman opened this issue Dec 6, 2018 · 3 comments

Comments

@alanosman
Copy link

I was testing out node 11.3 on a WSL instance of Ubuntu 18 this morning with our code base. We have been running successfully with 10.13. We are interested in using the latest stable threading support in node 11, which is why we are experimenting. However, when I ran npm install bycrypt was complaining about deprecations and I was wondering if that is something to be concerned about and/or if that was on the radar of the bcrypt team?

Thanks.

> [email protected] install /mnt/d/elastc-app/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.2/bcrypt_lib-v3.0.2-node-v67-linux-x64-glibc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v67 ABI, glibc) (falling back to source compile
with node-gyp)
make: Entering directory '/mnt/d/elastc-app/node_modules/bcrypt/build'
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
../src/bcrypt.cc: In function ‘void encode_salt(char*, u_int8_t*, char, u_int16_t, u_int8_t)’:
../src/bcrypt.cc:114:1: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
 encode_salt(char *salt, u_int8_t *csalt, char minor, u_int16_t clen, u_int8_t logr)
 ^~~~~~~~~~~
In file included from /usr/include/stdio.h:862:0,
                 from ../src/bcrypt.cc:34:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output between 4 and 5 bytes into a destination of size 4
        __bos (__s), __fmt, __va_arg_pack ());
                                            ^
../src/bcrypt.cc: In function ‘void bcrypt(const char*, const char*, char*)’:
../src/bcrypt.cc:147:1: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
 bcrypt(const char *key, const char *salt, char *encrypted)
 ^~~~~~
In file included from /usr/include/stdio.h:862:0,
                 from ../src/bcrypt.cc:34:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output between 4 and 5 bytes into a destination of size 4
        __bos (__s), __fmt, __va_arg_pack ());
                                            ^
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
In file included from ../src/bcrypt_node.cc:1:0:
../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                              ^
In file included from /home/aosman/.node-gyp/11.3.0/include/node/v8.h:26:0,
                 from /home/aosman/.node-gyp/11.3.0/include/node/node.h:63,
                 from ../../nan/nan.h:52,
                 from ../src/bcrypt_node.cc:1:
/home/aosman/.node-gyp/11.3.0/include/node/v8.h:2538:31: note: declared here
                 Local<String> ToString(Isolate* isolate) const);
                               ^
/home/aosman/.node-gyp/11.3.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/bcrypt_node.cc: In function ‘char {anonymous}::ToCharVersion(v8::Local<v8::String>)’:
../src/bcrypt_node.cc:66:30: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
   String::Utf8Value value(str);
                              ^
In file included from /home/aosman/.node-gyp/11.3.0/include/node/v8.h:26:0,
                 from /home/aosman/.node-gyp/11.3.0/include/node/node.h:63,
                 from ../../nan/nan.h:52,
                 from ../src/bcrypt_node.cc:1:
/home/aosman/.node-gyp/11.3.0/include/node/v8.h:2992:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^
/home/aosman/.node-gyp/11.3.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::GenerateSalt(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/bcrypt_node.cc:121:60: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     const char minor_ver = ToCharVersion(info[0]->ToString());
                                                            ^
In file included from /home/aosman/.node-gyp/11.3.0/include/node/node.h:63:0,
                 from ../../nan/nan.h:52,
                 from ../src/bcrypt_node.cc:1:
/home/aosman/.node-gyp/11.3.0/include/node/v8.h:10248:15: note: declared here
 Local<String> Value::ToString() const {
               ^~~~~
../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::GenerateSaltSync(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/bcrypt_node.cc:150:60: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     const char minor_ver = ToCharVersion(info[0]->ToString());
                                                            ^
In file included from /home/aosman/.node-gyp/11.3.0/include/node/node.h:63:0,
                 from ../../nan/nan.h:52,
                 from ../src/bcrypt_node.cc:1:
/home/aosman/.node-gyp/11.3.0/include/node/v8.h:10248:15: note: declared here
 Local<String> Value::ToString() const {
               ^~~~~
../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Encrypt(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/bcrypt_node.cc:212:44: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     Nan::Utf8String data(info[0]->ToString());
                                            ^
In file included from /home/aosman/.node-gyp/11.3.0/include/node/node.h:63:0,
                 from ../../nan/nan.h:52,
                 from ../src/bcrypt_node.cc:1:
/home/aosman/.node-gyp/11.3.0/include/node/v8.h:10248:15: note: declared here
 Local<String> Value::ToString() const {
               ^~~~~
../src/bcrypt_node.cc:213:44: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     Nan::Utf8String salt(info[1]->ToString());
                                            ^
In file included from /home/aosman/.node-gyp/11.3.0/include/node/node.h:63:0,
                 from ../../nan/nan.h:52,
                 from ../src/bcrypt_node.cc:1:
/home/aosman/.node-gyp/11.3.0/include/node/v8.h:10248:15: note: declared here
 Local<String> Value::ToString() const {
               ^~~~~
../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::EncryptSync(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/bcrypt_node.cc:231:44: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     Nan::Utf8String data(info[0]->ToString());
                                            ^
In file included from /home/aosman/.node-gyp/11.3.0/include/node/node.h:63:0,
                 from ../../nan/nan.h:52,
                 from ../src/bcrypt_node.cc:1:
/home/aosman/.node-gyp/11.3.0/include/node/v8.h:10248:15: note: declared here
 Local<String> Value::ToString() const {
               ^~~~~
../src/bcrypt_node.cc:232:44: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     Nan::Utf8String salt(info[1]->ToString());
                                            ^
In file included from /home/aosman/.node-gyp/11.3.0/include/node/node.h:63:0,
                 from ../../nan/nan.h:52,
                 from ../src/bcrypt_node.cc:1:
/home/aosman/.node-gyp/11.3.0/include/node/v8.h:10248:15: note: declared here
 Local<String> Value::ToString() const {
               ^~~~~
../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Compare(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/bcrypt_node.cc:312:45: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     Nan::Utf8String input(info[0]->ToString());
                                             ^
In file included from /home/aosman/.node-gyp/11.3.0/include/node/node.h:63:0,
                 from ../../nan/nan.h:52,
                 from ../src/bcrypt_node.cc:1:
/home/aosman/.node-gyp/11.3.0/include/node/v8.h:10248:15: note: declared here
 Local<String> Value::ToString() const {
               ^~~~~
../src/bcrypt_node.cc:313:49: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     Nan::Utf8String encrypted(info[1]->ToString());
                                                 ^
In file included from /home/aosman/.node-gyp/11.3.0/include/node/node.h:63:0,
                 from ../../nan/nan.h:52,
                 from ../src/bcrypt_node.cc:1:
/home/aosman/.node-gyp/11.3.0/include/node/v8.h:10248:15: note: declared here
 Local<String> Value::ToString() const {
               ^~~~~
../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::CompareSync(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/bcrypt_node.cc:331:42: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     Nan::Utf8String pw(info[0]->ToString());
                                          ^
In file included from /home/aosman/.node-gyp/11.3.0/include/node/node.h:63:0,
                 from ../../nan/nan.h:52,
                 from ../src/bcrypt_node.cc:1:
/home/aosman/.node-gyp/11.3.0/include/node/v8.h:10248:15: note: declared here
 Local<String> Value::ToString() const {
               ^~~~~
../src/bcrypt_node.cc:332:44: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     Nan::Utf8String hash(info[1]->ToString());
                                            ^
In file included from /home/aosman/.node-gyp/11.3.0/include/node/node.h:63:0,
                 from ../../nan/nan.h:52,
                 from ../src/bcrypt_node.cc:1:
/home/aosman/.node-gyp/11.3.0/include/node/v8.h:10248:15: note: declared here
 Local<String> Value::ToString() const {
               ^~~~~
../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::GetRounds(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/bcrypt_node.cc:352:44: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     Nan::Utf8String hash(info[0]->ToString());
                                            ^
In file included from /home/aosman/.node-gyp/11.3.0/include/node/node.h:63:0,
                 from ../../nan/nan.h:52,
                 from ../src/bcrypt_node.cc:1:
/home/aosman/.node-gyp/11.3.0/include/node/v8.h:10248:15: note: declared here
 Local<String> Value::ToString() const {
               ^~~~~
  SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
  COPY Release/bcrypt_lib.node
  COPY /mnt/d/elastc-app/node_modules/bcrypt/lib/binding/bcrypt_lib.node
  TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/mnt/d/elastc-app/node_modules/bcrypt/build'

> [email protected] install /mnt/d/elastc-app/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/mnt/d/elastc-app/node_modules/websocket/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  COPY Release/validation.node
make: Leaving directory '/mnt/d/elastc-app/node_modules/websocket/build'

> [email protected] install /mnt/d/elastc-app/node_modules/node-sass
> node scripts/install.js

Cached binary found at /home/aosman/.npm/node-sass/4.10.0/linux-x64-67_binding.node

> [email protected] postinstall /mnt/d/elastc-app/node_modules/node-sass
> node scripts/build.js

Binary found at /mnt/d/elastc-app/node_modules/node-sass/vendor/linux-x64-67/binding.node
Testing binary
Binary is fine
@recrsn
Copy link
Collaborator

recrsn commented Dec 8, 2018

I'll address this in the next release, which is due in a few days.

@alanosman
Copy link
Author

@agathver that's awesome. thanks!

@mcollina
Copy link

Note that this module will not work on Node 12, as those APIs are being removed in V8.
We are removing bycrypt from CITGM until this is resolved: nodejs/citgm#654.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants