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

Deprecation warnings while building #123

Closed
3 tasks done
simonepri opened this issue Mar 30, 2018 · 5 comments
Closed
3 tasks done

Deprecation warnings while building #123

simonepri opened this issue Mar 30, 2018 · 5 comments

Comments

@simonepri
Copy link
Contributor

simonepri commented Mar 30, 2018

Before creating an issue, please be sure to:

  • Checkout to the latest version, including submodules
  • Try to find an isolated way to reproduce the behavior
  • Fill in all the blanks in the most specific way you can

Steps to reproduce

  1. npm i argon2

Expected behaviour

Installs without warnings

Actual behaviour

> argon2@0.17.3 install ~/phc-argon2/node_modules/argon2
> node-gyp rebuild

  CC(target) Release/obj.target/libargon2/argon2/src/opt.o
  CC(target) Release/obj.target/libargon2/argon2/src/argon2.o
  CC(target) Release/obj.target/libargon2/argon2/src/core.o
  CC(target) Release/obj.target/libargon2/argon2/src/blake2/blake2b.o
  CC(target) Release/obj.target/libargon2/argon2/src/thread.o
  CC(target) Release/obj.target/libargon2/argon2/src/encoding.o
  LIBTOOL-STATIC Release/argon2.a
  CXX(target) Release/obj.target/argon2/src/argon2_node.o
../src/argon2_node.cpp:121:10: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations]
    Nan::MakeCallback(GetFromPersistent(THIS_OBJ).As<v8::Object>(),
         ^
../../nan/nan.h:929:3: note: 'MakeCallback' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/argon2_node.cpp:131:10: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations]
    Nan::MakeCallback(GetFromPersistent(THIS_OBJ).As<v8::Object>(),
         ^
../../nan/nan.h:929:3: note: 'MakeCallback' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
2 warnings generated.
  SOLINK_MODULE(target) Release/argon2.node

Environment

Operating system: MacOS

Node version: v8.9.4

Compiler version: clang-900.0.38

Refs

nodejs/nan#284

@ranisalt
Copy link
Owner

ranisalt commented Apr 2, 2018

Good, never looked further into that. I think node-gyp or GCC is silencing those warnings for me.

It would be great if you find how to replace MakeCallback cleanly.

@Dragon1206
Copy link

Dragon1206 commented Apr 4, 2018

Hi,
i got a similar warning but the problem is in production environment its not completing the build. My project is deployed in AWS. Below is the error that i got.

#npm install -f
npm WARN using --force I sure hope you know what you are doing.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

argon2@0.17.3 install /home/...../node_modules/argon2
node-gyp rebuild

make: Entering directory '/home/...../argon2/build' [i have modified the actual path]
CC(target) Release/obj.target/libargon2/argon2/src/opt.o
CC(target) Release/obj.target/libargon2/argon2/src/argon2.o
CC(target) Release/obj.target/libargon2/argon2/src/core.o
CC(target) Release/obj.target/libargon2/argon2/src/blake2/blake2b.o
CC(target) Release/obj.target/libargon2/argon2/src/thread.o
CC(target) Release/obj.target/libargon2/argon2/src/encoding.o
AR(target) Release/obj.target/argon2.a
COPY Release/argon2.a
CXX(target) Release/obj.target/argon2/src/argon2_node.o

../src/argon2_node.cpp: In member function ‘virtual void NodeArgon2::HashWorker::HandleOKCallback()’:
../src/argon2_node.cpp:122:63: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)’ is deprecated [-Wdeprecated-declarations]
GetFromPersistent(RESOLVE).Asv8::Function(), 1, argv);
^
In file included from ../src/argon2_node.h:5:0,
from ../src/argon2_node.cpp:8:
../../nan/nan.h:929:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^
../src/argon2_node.cpp: In member function ‘virtual voi[]d NodeArgon2::HashWorker::HandleErrorCallback()’:
../src/argon2_node.cpp:132:66: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value
)’ is deprecated [-Wdeprecated-declarations]
GetFromPersistent(REJECT).Asv8::Function(), 1, argv);
^
In file included from ../src/argon2_node.h:5:0,
from ../src/argon2_node.cpp:8:
../../nan/nan.h:929:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^
SOLINK_MODULE(target) Release/obj.target/argon2.node
COPY Release/argon2.node
make: Leaving directory '/home/...../argon2/build'

@ranisalt
Copy link
Owner

ranisalt commented Apr 4, 2018

Deprecation warnings are not errors, and the build should be fine. However, it should be fixed before upgrading to the next major version of nan

@Dragon1206
Copy link

Dragon1206 commented Apr 4, 2018

Oh shoot!!! yep its not an error. But i face a peculiar problem specifically in production (in AWS). In local its working fine even with the warnings, but in production its not behaving the same. The build is not getting completed and its getting stalled. May be AWS doesn't allow building node packages in specific circumstances.

@ranisalt
Copy link
Owner

v0.18.0 solves this warning

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

No branches or pull requests

3 participants