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 when used with node v6.0.0 #74

Closed
mdouglass opened this issue Apr 26, 2016 · 10 comments
Closed

deprecation warnings when used with node v6.0.0 #74

mdouglass opened this issue Apr 26, 2016 · 10 comments

Comments

@mdouglass
Copy link

Using dtrace-provider with node 6.0.0 (just released) gives numerous warnings likely because of the changes made to address nodejs/node#6216.

(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.

==== JS stack trace =========================================

Security context: 0x12bc086c9fa9 <JS Object>#0#
    1: .node [module.js:568] [pc=0x7c84e3227e4] (this=0x312e42fe1821 <an Object with map 0x2c26b8b5e91>#1#,module=0x229a538fbe9 <a Module with map 0x2c26b8181b9>#2#,filename=0x229a538fbb1 <String[115]: /Users/mdouglass/kixeye/km/server/kmservices/node_modules/dtrace-provider/build/Release/DTraceProviderBindings.node>)
    2: load [module.js:456] [pc=0x7c84df393b2] (this=0x229a538fbe9 <a Module with map 0x2c26b8181b9>#2#,filename=0x229a538fbb1 <String[115]: /Users/mdouglass/kixeye/km/server/kmservices/node_modules/dtrace-provider/build/Release/DTraceProviderBindings.node>)
    3: tryModuleLoad(aka tryModuleLoad) [module.js:415] [pc=0x7c84df38edd] (this=0x12bc08604189 <undefined>,module=0x229a538fbe9 <a Module with map 0x2c26b8181b9>#2#,filename=0x229a538fbb1 <String[115]: /Users/mdouglass/kixeye/km/server/kmservices/node_modules/dtrace-provider/build/Release/DTraceProviderBindings.node>)
    4: _load [module.js:407] [pc=0x7c84df345e2] (this=0x312e42fe17d9 <JS Function Module (SharedFunctionInfo 0x312e42f28751)>#3#,request=0x229a538e2e9 <String[38]: ./build/Release/DTraceProviderBindings>,parent=0x229a538b641 <a Module with map 0x2c26b8181b9>#4#,isMain=0x12bc08604299 <false>)
2c26b8181b9>#4#,__filename=0x229a538b609 <String[92]: /Users/mdouglass/kixeye/km/server/kmservices/node_modules/dtrace-provider/dtrace-provider.js>,__dirname=0x229a538dc91 <String[73]: /Users/mdouglass/kixeye/km/server/kmservices/node_modules/dtrace-provider>)
    8: _compile [module.js:541] [pc=0x7c84df40b64] (this=0x229a538b641 <a Module with map 0x2c26b8181b9>#4#,content=0x229a538cce9 <Very long string[1202]>#7#,filename=0x229a538b609 <String[92]: /Users/mdouglass/kixeye/km/server/kmservices/node_modules/dtrace-provider/dtrace-provider.js>)
    9: /* anonymous */(aka /* anonymous */) [module.js:~548] [pc=0x7c84e05b824] (this=0x12bc08604189 <undefined>,module=0x229a538b641 <a Module with map 0x2c26b8181b9>#4#,filename=0x2s/mdouglass/kixeye/km/server/kmservices/lib/main.js:3] [pc=0x7c84e2accc6] (this=0x229a500de61 <an Object with map 0x1e30ece07b71>#21#,exports=0x229a500de61 <an Object with map 0x1e30ece07b71>#21#,require=0x229a500dc79 <JS Function require (SharedFunctionInfo 0x312e42f59d01)>#22#,module=0x229a500dbe9 <a Module with map 0x2c26b8181b9>#20#,__filename=0x229a500de11 <String[56]: /Users/mdouglass/kixeye/km/server/kmservices/lib/main.js>,__dirname=0x229a500dde9 <String[48]: /Users/mdouglass/kixeye/km/server/kmservices/lib>)
   45: _compile [module.js:541] [pc=0x7c84df40b64] (this=0x229a500dbe9 <a Module with map 0x2c26b8181b9>#20#,content=0x229a500f111 <Very long string[4605]>#23#,filename=0x229a500de11 <String[56]: /Users/mdouglass/kixeye/km/server/kmservices/lib/main.js>)
   46: loader(aka loader) [/Users/mdouglass/kixeye/km/server/kmservices/node_modules/babel-register/lib/node.js:126] [pc=0x7c84e1a00ff] (this=0x12bc08604189 <undefined>,m=0x229a500dbe9 <a Module with map 0x2c26b8181b9>#20#,filename=0x229a500de1
==== C stack trace ===============================

 1: v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute)
 2: node::DTraceProvider::Initialize(v8::Local<v8::Object>)
 3: node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&)
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&))
 5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>)
 6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*)
 7: 0x7c84de0961b
 8: 0x7c84e3227e4
(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.
@mdouglass
Copy link
Author

Given the use of nan in this project, I think this is likely related: nodejs/nan#558

@mdouglass mdouglass reopened this Apr 26, 2016
@jbcpollak
Copy link

jbcpollak commented May 1, 2016

I ran into this too, here is the NodeJS issue about it: nodejs/node#6277

@simonexmachina
Copy link

It'd be good to get a patch version that provides a fix for this. It looks like nan has a fix for this since 2.3.2

@lukywong
Copy link

lukywong commented May 6, 2016

I got the same issue

@catamphetamine
Copy link

I'm having this too.
I guess this is the reason:


  "dependencies": {
    "nan": "^2.0.8"
  },

You should make it 2.3.2

@lukywong
Copy link

+1 please fix it

@ianvonholt
Copy link

I'm getting the same output with the current version of this package.

@sheepsteak
Copy link

There's nothing that needs to be fixed. Having the nan dependency at "^2.0.8" will get you "2.3.3" anyway.

I got the newer version of nan by uninstalling all top-level packages that had it in their dependencies somewhere and then reinstalling them. I just did npm ls nan to find out what these were. My project is using a shrinkwrap and my dependencies needed updating anyway so it wasn't too bad.

There might be a quicker way (npm update nan?). But I find that the simplest method is the best when it comes to npm and shrinkwrapping 😖

@davepacheco
Copy link
Collaborator

I've confirmed what @sheepsteak reports, that with a fresh install of v6.0.0 on OS X 10.9.5, I don't see any build or run-time warnings using this. I tested by just doing "npm install dtrace-provider" (which picked up nan 2.3.3) and then running basic.test.js. It seems likely that people were using older installs, but if someone can confirm that they see this with an up-to-date nan, please reopen with more information. Thanks!

@davepacheco
Copy link
Collaborator

I went ahead and explicitly bumped the nan dependency under commit ea042a3, published as version 0.7.0. I tested by doing a fresh build and test suite run on:

  • SmartOS: Node 0.10.47, 0.12.16, v4.6.0, both 32-bit and 64-bit for each (platform joyent_20160721T174127Z)
  • OS X: Node 0.10.45, v0.12.2, v4.6.0, v6.8.0, 64-bit only (platform OS X 10.11.6)

As I mentioned, I think the only cases this improves are cases where a higher-level dependency pulls in a nan before 2.3 that still satisfies dtrace-provider. In the vast majority of cases, installs of version 0.6.0 would work already because they'd pick up nan 2.3 or later anyway.

Sorry for the delay on this. It was surprisingly non-trivial to test on multiple versions and platforms.

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

8 participants