question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix deprecation warnings from the Nan library

See original GitHub issue

The 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:closed
  • Created 5 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
DavidVujiccommented, Jul 4, 2019

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.

1reaction
jbienkowski311commented, Jul 3, 2019

I will take a look and get back to you 😉

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found