Skip to content
This repository was archived by the owner on Dec 9, 2018. It is now read-only.
This repository was archived by the owner on Dec 9, 2018. It is now read-only.

Upgrade NAN for Node 4.0.0 #180

Description

@brianmcd
No description provided.

Activity

  1. brianmcd commented on Sep 9, 2015

    @brianmcd
    OwnerAuthor

    @kkoopa - is this something you can help with? If not, is there an upgrade guide floating around, or should I work my way through the NAN changelog?

  2. kkoopa commented on Sep 9, 2015

    @kkoopa
    Collaborator

    Is it still going to be maintained? Would it not be better to write something on the javascript level that uses the existing code for versions less than 0.12, and the revised vm module of Node for everything later.

    Upgrading to NAN 2 wouldn't be hard, I can do it in ten minutes, but is it worth it?

  3. mgol commented on Sep 9, 2015

    @mgol

    The problem is there's no way to write in package.json "install this module only in Node<4.0.0". You can declare it as an optional dependency but it will then try to get compiled in newer Nodes & fail; everything should work afterwards but the installation shouldn't have to try to compile things that are not needed, burning CPU cycles & printing confusing error-not-error messages.

  4. kkoopa commented on Sep 9, 2015

    @kkoopa
    Collaborator

    Ah, I had not thought about that, but it is easily avoidable. Hide everything behind an ifdef and make it compile nothing.

  5. ChALkeR commented on Sep 10, 2015

    @ChALkeR

    Adding to the list: nodejs/node#2798.

  6. mgol commented on Sep 10, 2015

    @mgol

    FWIW, @rvagg has a PR in progress: #181.

  7. brianmcd commented on Sep 11, 2015

    @brianmcd
    OwnerAuthor

    That's a cool thought, @kkoopa. My current plan is to test/merge #181 to get builds working ASAP, then look into doing the JS implementation for Node 4 and up.

  8. kkoopa commented on Sep 11, 2015

    @kkoopa
    Collaborator

    It might make sense to use the built-in vm module already from 0.12 up, since @domenic based the rewrite on Contextify. I would think many bugs that were in Contextify have been fixed in the vm module in that process. Essentially, the C++ code of Contextify is only necessary for Node 0.10 and older.

  9. thelinuxlich commented on Sep 18, 2015

    @thelinuxlich

    +1

  10. soenkekluth commented on Sep 18, 2015

    @soenkekluth

    +1 actually one of our projects completely won't work on node 4.x just because of this...

  11. rvagg commented on Sep 19, 2015

    @rvagg
    Contributor

    sorry, I'm blocked on one failure in #181 and don't have time to figure it out right now, happy for someone else to take my code if they can work it out

  12. KingScooty commented on Sep 21, 2015

    @KingScooty

    +1 It's affects a lot of packages i need since upgrading to node 4.x. It appears Browser Sync and a few of its plugins require it.

  13. raiskila commented on Sep 21, 2015

    @raiskila

    +1 Breaks lots of things

  14. base698 commented on Sep 22, 2015

    @base698

    Using node 4.1.0

    $ npm install contextify

    contextify@0.1.14 install /Users/workspaces/soundselect/node_modules/contextify
    node-gyp rebuild

    CXX(target) Release/obj.target/contextify/src/contextify.o
    In file included from ../src/contextify.cc:3:
    ../node_modules/nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal'
    NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
    ^
    ../node_modules/nan/nan.h:256:25: note: previous definition is here
    NAN_INLINE v8::Local _NanEnsureLocal(v8::Handle val) {
    ^
    ../node_modules/nan/nan.h:661:13: error: no member named 'smalloc' in namespace 'node'
    , node::smalloc::FreeCallback callback
    ~~~~~~^
    ../node_modules/nan/nan.h:672:12: error: no matching function for call to 'New'
    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
    ^~~~~~~~~~~~~~~~~
    /Users/justinthomas/.node-gyp/4.1.0/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from
    'uint32_t' (aka 'unsigned int') to 'enum encoding' for 3rd argument
    NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,

  15. rvagg commented on Sep 22, 2015

    @rvagg
    Contributor

    If you're desperate then you can npm i 'contextify@rvagg/contextify#nan2' but see #181 for the context (har har) on that. It should be fine on 0.12+ but the fact that there's a weird hold-up on 0.10 suggests that all may not be quite right.

  16. 28 remaining items

  17. debuos512 commented on Nov 5, 2015

    @debuos512

    +1

  18. why520crazy commented on Nov 5, 2015

    @why520crazy

    +111111111111111111111111111111111111111

  19. sattaman commented on Nov 6, 2015

    @sattaman

    +1

  20. SylvainCorlay commented on Nov 8, 2015

    @SylvainCorlay

    +1

  21. kerawits commented on Nov 9, 2015

    @kerawits

    +1

  22. afcastano commented on Nov 9, 2015

    @afcastano

    +1

  23. DKnodel commented on Nov 9, 2015

    @DKnodel

    +1

  24. josephhealy commented on Nov 10, 2015

    @josephhealy

    +1

  25. pyelin commented on Nov 12, 2015

    @pyelin

    +1

  26. poshaughnessy commented on Nov 12, 2015

    @poshaughnessy

    This fixed it for me for now - thanks @sirbrillig: sirbrillig/jsdom@b30bc08

  27. brianmcd commented on Nov 12, 2015

    @brianmcd
    OwnerAuthor

    Needs a few more +1s

  28. brianmcd commented on Nov 12, 2015

    @brianmcd
    OwnerAuthor

    (Fixed in 0.1.15)

  29. mikemaccana commented on Nov 12, 2015

    @mikemaccana

    +thanks

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions