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

io.js v3 preparation #376

Closed
rvagg opened this issue Jun 30, 2015 · 41 comments
Closed

io.js v3 preparation #376

rvagg opened this issue Jun 30, 2015 · 41 comments
Milestone

Comments

@rvagg
Copy link
Member

rvagg commented Jun 30, 2015

So! We have V8 4.4 in io.js/next now and the next-nightlies are also coming out with both header-only tarballs and a node-gyp that is hacked to understand when it's running on a nightly, next-nightly, rc or release build and will then grab the headers tarball from the right location. i.e. npm install <compiled addon> should work properly on next-nightly builds and RC builds that I'm about to start pushing out for io.js v3. We need to get NAN rolled out to cope with this now that we have a target to work against.

From this build: https://iojs.org/download/next-nightly/v2.3.1-next-nightly201506308f6f4280c6/

$ npm i buffertools
npm http request GET https://registry.npmjs.org/buffertools
npm http 304 https://registry.npmjs.org/buffertools
npm WARN engine [email protected]: wanted: {"node":">=0.3.0"} (current: {"node":"2.3.1-next-nightly201506308f6f4280c6","npm":"2.11.3"})

> [email protected] install /tmp/node_modules/buffertools
> node-gyp rebuild

gyp http GET https://iojs.org/download/next-nightly/v2.3.1-next-nightly201506308f6f4280c6/iojs-v2.3.1-next-nightly201506308f6f4280c6-headers.tar.gz
gyp http 200 https://iojs.org/download/next-nightly/v2.3.1-next-nightly201506308f6f4280c6/iojs-v2.3.1-next-nightly201506308f6f4280c6-headers.tar.gz
gyp http GET https://iojs.org/download/next-nightly/v2.3.1-next-nightly201506308f6f4280c6/SHASUMS256.txt
gyp http 200 https://iojs.org/download/next-nightly/v2.3.1-next-nightly201506308f6f4280c6/SHASUMS256.txt
make: Entering directory '/tmp/node_modules/buffertools/build'
  CXX(target) Release/obj.target/buffertools/buffertools.o
../buffertools.cc: In function ‘v8::Local<v8::Value> {anonymous}::decodeHex(const uint8_t*, size_t, const v8::FunctionCallbackInfo<v8::Value>&, uint32_t)’:
../buffertools.cc:367:71: error: conversion from ‘v8::MaybeLocal<v8::Object>’ to non-scalar type ‘v8::Local<v8::Object>’ requested
   Local<Object> buffer = UNI_BUFFER_NEW(size / 2);
                                                                       ^
../buffertools.cc: In function ‘void {anonymous}::Concat(const v8::FunctionCallbackInfo<v8::Value>&)’:
../buffertools.cc:459:67: error: conversion from ‘v8::MaybeLocal<v8::Object>’ to non-scalar type ‘v8::Local<v8::Object>’ requested
   Local<Object> buffer = UNI_BUFFER_NEW(size);
                                                                   ^
buffertools.target.mk:88: recipe for target 'Release/obj.target/buffertools/buffertools.o' failed
make: *** [Release/obj.target/buffertools/buffertools.o] Error 1
make: Leaving directory '/tmp/node_modules/buffertools/build'

@kkoopa can you let us know if there's anything blocking a release to cope with this so we can make it happen asap?

@kkoopa
Copy link
Collaborator

kkoopa commented Jun 30, 2015

I'll check, but I don't think there's more than cosmetic fixes (naming and
such) to fix.

On Tuesday 30 June 2015 00:20:34 Rod Vagg wrote:

So! We have V8 4.4 in io.js/next now and the next-nightlies are also coming
out with both header-only tarballs and a node-gyp that is hacked to
understand when it's running on a nightly, next-nightly, rc or release
build and will then grab the headers tarball from the right location. i.e.
npm install <compiled addon> should work properly on next-nightly builds
and RC builds that I'm about to start pushing out for io.js v3. We need to
get NAN rolled out to cope with this now that we have a target to work
against.

From this build:
https://iojs.org/download/next-nightly/v2.3.1-next-nightly201506308f6f4280c
6/

$ npm i buffertools
npm http request GET https://registry.npmjs.org/buffertools
npm http 304 https://registry.npmjs.org/buffertools
npm WARN engine [email protected]: wanted: {"node":">=0.3.0"} (current:
{"node":"2.3.1-next-nightly201506308f6f4280c6","npm":"2.11.3"})
> [email protected] install /tmp/node_modules/buffertools
> node-gyp rebuild

gyp http GET
https://iojs.org/download/next-nightly/v2.3.1-next-nightly201506308f6f4280c
6/iojs-v2.3.1-next-nightly201506308f6f4280c6-headers.tar.gz gyp http 200
https://iojs.org/download/next-nightly/v2.3.1-next-nightly201506308f6f4280c
6/iojs-v2.3.1-next-nightly201506308f6f4280c6-headers.tar.gz gyp http GET
https://iojs.org/download/next-nightly/v2.3.1-next-nightly201506308f6f4280c
6/SHASUMS256.txt gyp http 200
https://iojs.org/download/next-nightly/v2.3.1-next-nightly201506308f6f4280c
6/SHASUMS256.txt make: Entering directory
'/tmp/node_modules/buffertools/build'
  CXX(target) Release/obj.target/buffertools/buffertools.o
../buffertools.cc: In function ‘v8::Local<v8::Value>
{anonymous}::decodeHex(const uint8_t*, size_t, const
v8::FunctionCallbackInfo<v8::Value>&, uint32_t)’: ../buffertools.cc:367:71:
error: conversion from ‘v8::MaybeLocal<v8::Object>’ to non-scalar type
‘v8::Local<v8::Object>’ requested Local<Object> buffer =
UNI_BUFFER_NEW(size / 2);
                                                                       ^
../buffertools.cc: In function ‘void {anonymous}::Concat(const
v8::FunctionCallbackInfo<v8::Value>&)’: ../buffertools.cc:459:67: error:
conversion from ‘v8::MaybeLocal<v8::Object>’ to non-scalar type
‘v8::Local<v8::Object>’ requested Local<Object> buffer =
UNI_BUFFER_NEW(size);
                                                                   ^
buffertools.target.mk:88: recipe for target
'Release/obj.target/buffertools/buffertools.o' failed make: ***
[Release/obj.target/buffertools/buffertools.o] Error 1
make: Leaving directory '/tmp/node_modules/buffertools/build'

@kkoopa can you let us know if there's anything blocking a release to cope
with this so we can make it happen asap?


Reply to this email directly or view it on GitHub:
#376

@bnoordhuis
Copy link
Member

buffertools doesn't use nan at the moment (it uses a hand-rolled compat shim) but I can migrate it to nan if you think it's a useful guinea pig.

@rvagg
Copy link
Member Author

rvagg commented Jun 30, 2015

not necessary @bnoordhuis, I just use it as a quick test for the runtime, not nan necessarily, cause it's small and a quick compile. bignum is probably just as good for testing nan.

@rvagg
Copy link
Member Author

rvagg commented Jun 30, 2015

https://iojs.org/download/rc/v3.0.0-rc1/

There's an RC1, we'll hold off on publicising it and putting it on iojs.org until we have a NAN release out.

@rvagg
Copy link
Member Author

rvagg commented Jul 1, 2015

Some issues in attempting a migration of leveldown to nan@next, which I'm obviously far from achieving but here are some things I've encountered so far:

  • The RC1 build still has the same NODE_MODULE_VERSION as io.js v2, I should have bumped it to 45 and I'll have to do an RC2 to accommodate this. Grr.
  • Internal references in NAN don't use the namespace so unless you are using namespace Nan you get errors, so far just on the NAN_METHOD, NAN_GETTER etc. definitions, should be using Nan::NAN_METHOD_RETURN_TYPE etc.
  • We need to take into account the lack of a native node::smalloc in v3:
../node_modules/nan/nan.h:667:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
  • My compiler is warning of redefinition of EnsureHandleOrPersistent and EnsureLocal, I can comment out the v8::Local<T> ones to make these warnings go away.

And finally: I have clearly lost track of the rewriting going on in NAN because this is super-painful and I feel like I don't have enough context. The change to implementing Nan versions of FunctionInfoCallback and Persistent have caught me a little off guard. I tried to use the 1to2.js tool initially but with not much success so I backed up and started picking off the changes using sed and now I'm stuck at trying to grok the new funky Maybe stuff.

So, my take-away is that there's a huge need for documentation to get NAN@2 out, both formal API documentation but also a primer for people upgrading, otherwise we're just going to have a lot of wailing and gnashing of teeth (actually that might be hard to avoid anyway!). I can write docs but I don't have enough information to start with and will likely do a bad job at it. Perhaps @kkoopa et. al. could provide some dot-points of the major changes that I can use as a starting point to begin investigation?

@trevnorris
Copy link
Collaborator

Ooh yeah. The removal of smalloc was a last minute change when V8 was updated to v4.4 after latest nan had been released. Couldn't have been accounted for.

@mathiask88
Copy link
Contributor

@rvagg kkoopa wrote a migration tool based on libclang (https://github.com/kkoopa/node-libclang/tree/experiment?files=1) but I don't know the status of that. The plan was to wrap this tool into a prebuild electron app making the conversion as easy as possible (select binding.gyp->press convert->show some help how to deal with Maybes->done)

@rvagg
Copy link
Member Author

rvagg commented Jul 1, 2015

that sounds like a lot of work when we need this released yesterday

@kkoopa
Copy link
Collaborator

kkoopa commented Jul 1, 2015

It's not necessary for release. Can come at some later point.

@rvagg
Copy link
Member Author

rvagg commented Jul 2, 2015

RC2 https://iojs.org/download/rc/v3.0.0-rc2/ minor V8 update, NODE_MODULE_VERSION bumped

@rvagg
Copy link
Member Author

rvagg commented Jul 2, 2015

babel is fine with this version in smoke testing except for:

  1) util regexify:
     AssertionError: /\x66oo|\x62ar/i deepEqual /foo|bar/i

😕

@rvagg
Copy link
Member Author

rvagg commented Jul 2, 2015

aaand I can't smoke test npm@master now either:

Packaging or installing [email protected] with [email protected] is impossible.
Please install npm@^3.0.0-0 from the registry and use that or run your command with
this version of npm with:
    /usr/local/bin/iojs /smoke/npm install --cache-min=Infinity

@domenic
Copy link

domenic commented Jul 2, 2015

@Fishrock123 was looking in to npm@3, summoning him... that is a strange error. Maybe try that thing it asks you to do with cache-min?

@rvagg
Copy link
Member Author

rvagg commented Jul 2, 2015

actually, ignore those 2 msgs, I thought I was in the v2.3.2 release thread! this is not relevant to v3.0.0, I confused

@kkoopa
Copy link
Collaborator

kkoopa commented Jul 4, 2015

I've pushed an update. It makes the callback declaration macros use fully qualified names. These should be the only macros and hence the only ones requiring this namespace fix.
I also renamed Scope to HandleScope and EscapableScope to EscapableHandleScope, to better match v8.

Regarding changes to persistent and such, they now follow newest v8 API as closely as possible, so you basically just use them as such.

Regarding smalloc errors and EnsureLocal et al, I don't get warnings about that on my compiler. Which one are you using? Can you fix it?

@kkoopa
Copy link
Collaborator

kkoopa commented Jul 4, 2015

Of course I didn't test smalloc on the version affected... Think I've fixed it now.

@kkoopa
Copy link
Collaborator

kkoopa commented Jul 4, 2015

And the EnsureLocal error is because V8 got rid of the Handle class. v8::Handle is now an alias to v8::Local for legacy code. I just have to add ifdefs around whether to define the Handle version or not.

@kkoopa
Copy link
Collaborator

kkoopa commented Jul 4, 2015

There, all known issues have been fixed.

@rvagg
Copy link
Member Author

rvagg commented Jul 13, 2015

Progress update:

@kkoopa can you tell me about the state of docs? What needs to be done in #371 to finish this off?

@rvagg
Copy link
Member Author

rvagg commented Jul 13, 2015

For the LevelDOWN conversion, here's the bulk of work I've had to do in a simple bash script (Linux only atm cause of sed -r but that's fixable). Obviously doesn't cover all cases but covers the common cases.

#!/bin/bash

files=$@
replacements=(
  "NanAsyncWorker/Nan::AsyncWorker"
  "NanAsyncQueueWorker/Nan::AsyncQueueWorker"
  "NanCallback/Nan::Callback"
  "NanNewBufferHandle\\(([^;]+);/Nan::NewBuffer(\\1.ToLocalChecked();"
  "(NanNew(<(v8::)?String>)?\\(\"[^\"]*\"\\))/\\1.ToLocalChecked()"
  "(NanNew<(v8::)?String>\\([^\"][^\;]*);/\\1.ToLocalChecked();"
  "NanNew/Nan::New"
  "NODE_SET_PROTOTYPE_METHOD/Nan::SetPrototypeMethod"
  "NODE_SET_METHOD/Nan::SetMethod"
  "_NAN_METHOD_ARGS_TYPE/Nan::NAN_METHOD_ARGS_TYPE"
  "(\\W)?args(\\W)/\\1info\\2"
  "(^|\\s)(v8::)?Persistent/\\1Nan::Persistent"
  "NanAssignPersistent(<\w+>)?\\(([^,]+),\\s*([^)]+)\\)/\\2.Reset(\\3)"
  "NanDisposePersistent\\(([^\\)]+)\\)/\\1.Reset()"
  "NanReturnValue/info.GetReturnValue().Set"
  "NanReturnNull\\(\\)/info.GetReturnValue().Set(Nan::Null())"
  "NanScope\\(\\)/Nan::HandleScope\ scope"
  "NanEscapableScope\\(\\)/Nan::EscapableHandleScope scope"
  "NanEscapeScope/scope.Escape"
  "NanReturnUndefined\\(\\);/return;"
  "NanUtf8String/Nan::Utf8String"
  "NanObjectWrapHandle\\(([^\\)]+)\\)/\\1->handle()"
  "(node::)?ObjectWrap/Nan::ObjectWrap"
  "NanMakeCallback/Nan::MakeCallback"
  "NanNull/Nan::Null"
  "NanUndefined/Nan::Undefined"
  "NanFalse/Nan::False"
  "NanTrue/Nan::True"
  "NanThrow(\w+)?Error/Nan::Throw\\1Error"
  "NanError/Nan::Error"
  "NanGetCurrentContext/Nan::GetCurrentContext"
  "([a-zA-Z0-9_]+)->SetAccessor\\(/Nan::SetAccessor(\\1, "
  "NanAdjustExternalMemory/Nan::AdjustExternalMemory"
  "NanSetTemplate/Nan::SetTemplate"
  "NanHasInstance\\(([^,]+),\\s*([^)]+)\\)/Nan::New(\\1)->HasInstance(\\2)"
)

for file in $files; do
  echo $file
  for replacement in "${replacements[@]}"; do
    cat $file | sed -r "s/${replacement}/g" > $file.$$ && mv $file.$$ $file
  done
done

@rvagg
Copy link
Member Author

rvagg commented Jul 13, 2015

I have a question about the Maybe stuff, why is it that I'm needing to .ToLocalChecked() on String Locals and occasional Buffer handles but nothing else?

@kkoopa
Copy link
Collaborator

kkoopa commented Jul 13, 2015

Re docs:
All that is missing from there needs to be added... That is, the old documentation file needs updating to remove what has been removed, renaming what has been renamed, restructuring to group things according to topic, general improvements. Then there are definitely some things left which have not yet been documented at all. Ideally, I wanted the new documentation to be standalone and complete, not building upon implicit knowledge of V8. I wanted it more in the nodedocs style, documenting everything necessary for native addon development. Essentially, replace this: https://iojs.org/api/addons.html and
complete it by documenting all the functions.

Re Maybe:
It is actually all Buffer handles and most String locals. Buffer creation can fail because memory allocation can fail, thus it needs to return a MaybeLocal. String creation can fail if the length is too long, thus it too need to return a MaybeLocal. However, creating an empty string cannot fail. this was shoehorned in with Nan::EmptyString or such, which returns a Local. Creating scripts may fail, thus a Maybe is used, the same goes for RegExp, and so on. Infallible methods return pure values, while flawed methods wrap them in maybes.

@rvagg
Copy link
Member Author

rvagg commented Jul 13, 2015

Thanks for the update and background @kkoopa.

I've just converted canvas, PR is here: Automattic/node-canvas#580 and I've updated my conversion script above to include some new patterns in use there.

Also, in the process I figured out what the bug with LevelDOWN was because I was getting something similar with canvas! It's from here in nan.h:

  NAN_INLINE MaybeLocal<v8::Object> NewBuffer(
      char* data
    , uint32_t size
  ) {
    // arbitrary buffer lengths requires
    // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION
    assert(size <= imp::kMaxLength && "too large buffer");
#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION
    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
#else
    return MaybeLocal<v8::Object>(
        node::Buffer::Use(v8::Isolate::GetCurrent(), data, size));
#endif
  }

Note the Buffer::New() vs Buffer::Use(), all of the uses so far assume copying and allowing the original data to be deleted or garbage collected. In canvas it's a case of explicitly doing a Nan::NewBuffer() and then a free() on the source data so that when it gets up to JS it's pointing to a freed area of memory.

Changing the Buffer::Use() to Buffer::New() in Nan::BufferNew() fixes the problem.

I see that we've removed NanBufferUse() completely, should it be added back as Nan::BufferUse()?

@kkoopa
Copy link
Collaborator

kkoopa commented Jul 13, 2015

No, this is how it should be. Trevor finally cleaned up Node's Buffer implementation and this follows that, so it's a matter of missing documentation. If you want the buffer copied, you should use Nan::CopyBuffer (node::Buffer::Copy).

@rvagg
Copy link
Member Author

rvagg commented Jul 13, 2015

Upgrade bignum, tuned the script some more. justmoon/node-bignum#55

Got some hiccups though.

  1. Nan::SetMethod() does:
   v8::Local<v8::String> fn_name = New(name);
   fn->SetName(fn_name);

But the compiler complains. Changing to this sorts it out:

   v8::Local<v8::String> fn_name = New(name).ToLocalChecked();
   fn->SetName(fn_name);
  1. I get this failure, even if I change the Buffer::New() thing:
node: /home/rvagg/.node-gyp/2.3.4/src/node_object_wrap.h:56: void node::ObjectWrap::Wrap(v8::Handle<v8::Object>): Assertion `handle->InternalFieldCount() > 0' failed.
Aborted (core dumped)

shrug

@rvagg
Copy link
Member Author

rvagg commented Jul 13, 2015

btw, that bash script above applied straight to bignum without any additional modifications needed to make it compile

@kkoopa
Copy link
Collaborator

kkoopa commented Jul 13, 2015

SetMethod is definitely wrong and your fix is correct. Don't know what ObjectWrap is whining about. Does ObjectWrap use Buffer? Is this then a bug in io.js since the buffer change? say if it weren't updated? Or is it something else. Don't know what internal field it's looking for there... Although... Doesn't ObjectWrap require having one internal field set per the Node docs?

@rvagg
Copy link
Member Author

rvagg commented Jul 13, 2015

I have no insight on the ObjectWrap problem yet, will have to get back to it later

@kkoopa
Copy link
Collaborator

kkoopa commented Jul 13, 2015

Fixed SetMethod. 10f258d

@kkoopa
Copy link
Collaborator

kkoopa commented Jul 13, 2015

That assert is here.

  inline void Wrap(v8::Handle<v8::Object> handle) {
    assert(persistent().IsEmpty());
    assert(handle->InternalFieldCount() > 0);
    handle->SetAlignedPointerInInternalField(0, this);
    persistent().Reset(v8::Isolate::GetCurrent(), handle);
    MakeWeak();
  }

According to the docs https://iojs.org/api/addons.html#addons_wrapping_c_objects There has to be at least one internal field present before calling ObjectWrap::Wrap. So something is wrong around there. Either the wrong handle gets passed to ObjectWrap:: Wrap, or the correct number of internal fields never gets set.

void MyObject::Init(Local<Object> exports) {
  Isolate* isolate = exports->GetIsolate();

  // Prepare constructor template
  Local<FunctionTemplate> tpl = FunctionTemplate::New(isolate, New);
  tpl->SetClassName(String::NewFromUtf8(isolate, "MyObject"));
  tpl->InstanceTemplate()->SetInternalFieldCount(1);

@kkoopa
Copy link
Collaborator

kkoopa commented Jul 13, 2015

I pushed some further commits. Nan::HasInstance is no more. It had become needless sugar.

@trevnorris
Copy link
Collaborator

ObjectWrap is no longer used by internal core. For performance I implemented a similar class but that requires less overhead.

@kkoopa Can you clarify why Nan::HasInstance was removed?

@kkoopa
Copy link
Collaborator

kkoopa commented Jul 13, 2015

It seemed unnecessary. All it did was call FunctionTemplate::HasInstance. I can put it back if someone makes a good argument for why it should stay.

On July 13, 2015 9:14:41 PM EEST, Trevor Norris [email protected] wrote:

ObjectWrap is no longer used by internal core. For performance I
implemented a similar class but that requires less overhead.

@kkoopa Can you clarify why Nan::HasInstance was removed?


Reply to this email directly or view it on GitHub:
#376 (comment)

@corbinu
Copy link

corbinu commented Jul 14, 2015

@rvagg I tried using your upgrade script here on https://github.com/corbinu/couchnode

It works great other then a few issues for example line 37 of src/exception.h

which is

Handle<Value> args[] = { NanNew<String>(msg.c_str()) };

got converted to

Handle<Value> info[] = { Nan::New<String>(msg.c_str()) }.ToLocalChecked();

rather than

Handle<Value> info[] = { Nan::New<String>(msg.c_str()).ToLocalChecked() };

Also happened with line 103 of src/couchbase_impl.cc
which should be decObj->Set(Nan::New(valueKey), Nan::NewBuffer((char*)bytes, nbytes).ToLocalChecked());

This may not be as easy to fix but it also missed adding .ToLocalChecked() on line 10-11 of src/constants.cc

I still don't have all the issues fixed but hoping to soon.

On another note thanks guys for all your work looks like it will be MUCH better then before!

@rvagg
Copy link
Member Author

rvagg commented Jul 14, 2015

Thanks for the feedback @corbinu, I've had a lot of trouble with the .ToLocalChecked() addition too, unfortunately I don't have a good solution for it but on the plus side, at least the compiler picks them up properly too.

For the ones that it missed on line 10-11, a change from:

  "(NanNew<(v8::)?String>\\([^\"][^\;]+);/\\1.ToLocalChecked();"

to

  "(NanNew<(v8::)?String>\\([^\"][^\;]*);/\\1.ToLocalChecked();"

should fix it, it's the single-char variables that are catching it. I've updated the original. Thanks!

@kkoopa kkoopa added this to the 2.0 milestone Jul 19, 2015
@kkoopa
Copy link
Collaborator

kkoopa commented Jul 19, 2015

Getting insertion of ToLocalCheccked() calls fully right using regular expressions will be impossible, even in non-contrived cases. Partly for that reason I started work on a heavy-duty converter based on libclang https://github.com/kkoopa/node-libclang/blob/experiment/analyzer.js The only major obstacle there is getting the physical rewriting part correct, my offsets get messed up now and then for no good reason and it all goes south from there. However, the analyzer part works great in that it finds all the correct locations that need changing. The only drawback with this approach is that only active code paths can be fixed. Anything that uses conditional compilation (for different versions or operating systems or such) will require a run of the analyzer in every environment, but this is only a minor nuisance. Any proper software project should have a way of running the entire code base during testing.

@rvagg
Copy link
Member Author

rvagg commented Jul 22, 2015

RC 4 released: https://iojs.org/download/rc/v3.0.0-rc.4/ (properly including all of io.js v2.4.0)

Details here: nodejs/node#2221 (comment) (note the node-gyp changes, yay!)

@thlorenz
Copy link

WRT bash script:

(Linux only atm cause of sed -r but that's fixable)

Just use sed -E on OSX instead.

@thlorenz
Copy link

Updated that nifty bash script a bit with things I ran into (just very minor changes) and put it in a public gist so we can keep updating it easier than in this issue.
https://gist.github.com/thlorenz/7e9d8ad15566c99fd116

@rvagg
Copy link
Member Author

rvagg commented Sep 25, 2015

FYI finally finished and published a migration guide https://nodesource.com/blog/cpp-addons-for-nodejs-v4

@brett19
Copy link
Contributor

brett19 commented Sep 25, 2015

Nice job. Looks awesome!

joelpurra added a commit to joelpurra/getdns-node that referenced this issue Jul 24, 2016
- The upgrade steps are almost undocumented, but simplified by running a series of `sed` commands on the source files.
- The script was [originally suggested](nodejs/nan#376) in a github issue for NAN.
- One version has been [released as a gist](https://gist.github.com/thlorenz/7e9d8ad15566c99fd116).
- [A modified version](https://gist.github.com/joelpurra/a1129ca1336c14bfd51b1a7ad0f79171) which works better with `getdns-node` was used.
- This commit contains only automated fixes; the next commit contains manual fixes to some regexp misses.
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

9 participants