Fix deprecation warnings from the Nan library
See original GitHub issueThe code in node-zk.cpp causes warnings when installing zookeeper. This should be fixed, before deprecation warnings become errors.
Output from the command npm install zookeeper
../src/node-zk.cpp:547:14: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(thisObj, "emit", 3, argv);
^
../../nan/nan.h:1001:3: note: 'MakeCallback' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
^
../../nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/node-zk.cpp:622:9: warning: 'Call' is deprecated [-Wdeprecated-declarations]
CALLBACK_EPILOG();
^
../src/node-zk.cpp:564:19: note: expanded from macro 'CALLBACK_EPILOG'
callback->Call(sizeof(argv)/sizeof(argv[0]), argv); \
^
../../nan/nan.h:1673:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/node-zk.cpp:651:9: warning: 'Call' is deprecated [-Wdeprecated-declarations]
CALLBACK_EPILOG();
^
../src/node-zk.cpp:564:19: note: expanded from macro 'CALLBACK_EPILOG'
callback->Call(sizeof(argv)/sizeof(argv[0]), argv); \
^
../../nan/nan.h:1673:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/node-zk.cpp:693:9: warning: 'Call' is deprecated [-Wdeprecated-declarations]
CALLBACK_EPILOG();
^
../src/node-zk.cpp:564:19: note: expanded from macro 'CALLBACK_EPILOG'
callback->Call(sizeof(argv)/sizeof(argv[0]), argv); \
^
../../nan/nan.h:1673:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/node-zk.cpp:724:9: warning: 'Call' is deprecated [-Wdeprecated-declarations]
CALLBACK_EPILOG();
^
../src/node-zk.cpp:564:19: note: expanded from macro 'CALLBACK_EPILOG'
callback->Call(sizeof(argv)/sizeof(argv[0]), argv); \
^
../../nan/nan.h:1673:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/node-zk.cpp:748:9: warning: 'Call' is deprecated [-Wdeprecated-declarations]
WATCHER_CALLBACK_EPILOG();
^
../src/node-zk.cpp:568:19: note: expanded from macro 'WATCHER_CALLBACK_EPILOG'
callback->Call(sizeof(argv)/sizeof(argv[0]), argv); \
^
../../nan/nan.h:1673:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/node-zk.cpp:789:9: warning: 'Call' is deprecated [-Wdeprecated-declarations]
CALLBACK_EPILOG();
^
../src/node-zk.cpp:564:19: note: expanded from macro 'CALLBACK_EPILOG'
callback->Call(sizeof(argv)/sizeof(argv[0]), argv); \
^
../../nan/nan.h:1673:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/node-zk.cpp:826:9: warning: 'Call' is deprecated [-Wdeprecated-declarations]
CALLBACK_EPILOG();
^
../src/node-zk.cpp:564:19: note: expanded from macro 'CALLBACK_EPILOG'
callback->Call(sizeof(argv)/sizeof(argv[0]), argv); \
^
../../nan/nan.h:1673:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/node-zk.cpp:949:9: warning: 'Call' is deprecated [-Wdeprecated-declarations]
CALLBACK_EPILOG();
^
../src/node-zk.cpp:564:19: note: expanded from macro 'CALLBACK_EPILOG'
callback->Call(sizeof(argv)/sizeof(argv[0]), argv); \
^
../../nan/nan.h:1673:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
9 warnings generated.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
deprecation warnings when used with node v6.0.0 · Issue #634
Using sqlite with node 6.0.0 (just released) gives numerous warnings likely because of the changes made to address nodejs/node#6216.
Read more >How to ignore deprecation warnings in Python - YouTube
PYTHON : How to ignore deprecation warnings in Python [ Gift : Animated Search Engine : https://www.hows.tech/p/recommended.html ] PYTHON ...
Read more >python warnings (beginner - intermediate) anthony explains ...
today I talk about the warnings module and the argument you *absolutely* need whenever you raise a warning (as well as how to...
Read more >Fix Flask 2.0 Warnings in Flask-Login, Flask-WTF ... - YouTube
We'll go over 3 pull requests I created in each library to fix a few deprecation warnings.Hit the subscribe button to receive more...
Read more >How to disable Python warnings? - Stack Overflow
Look at the Temporarily Suppressing Warnings section of the Python docs: If you are using code that you know will raise a warning,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you @jbienkowski311 for feedback and suggestions!
I will fix according to your suggestions, and am also planning to write some sort of tests to make sure the functionality is the same as before.
When ready, I will make a Pull Request and would appreciate if you could have a last look at the changes (I can ping you in a comment). I will also ask for feedback from fellow contributors to this project.
I will take a look and get back to you 😉