pipobscure/fsevents — pull request #26 by chanced (2014-06-05 05:11:38+00:00)
Title: Upgrading nan to version ~1.2.0 in order to support Node v0.11.13 and above

The pull request isn't finished yet but it is getting close. I upgraded the nan version and i'm working on getting the codebase migrated to reflect changes (largely NanNew).

There are is at least one error left surrounding `uv_async_init` that I'm not 100% certain how to fix yet (I'm very rusty when it comes to C).

There are also a few warnings dangling. Some are deprecations but others are styling that I think can be fixed by removing the `using v8::...` statements I added and going back to explicit definitions (especially around v8::Integer & String).

Here's the current output from a rebuild:

```bash
gyp info it worked if it ends with ok
gyp info using node-gyp@0.13.1
gyp info using node@0.11.13 | darwin | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/chance/code/fsevents/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/chance/.node-gyp/0.11.13/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/chance/.node-gyp/0.11.13',
gyp info spawn args '-Dmodule_root_dir=/Users/chance/code/fsevents',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:85:
../src/async.cc:29:3: error: no matching function for call to 'uv_async_init'
uv_async_init(uv_default_loop(), &async, &async_propagate);
^~~~~~~~~~~~~
/Users/chance/.node-gyp/0.11.13/deps/uv/include/uv.h:1355:15: note: candidate function not viable: no known conversion from 'void (*)(uv_async_t *, int)' to 'uv_async_cb' (aka 'void (*)(uv_async_t *)') for 3rd argument
UV_EXTERN int uv_async_init(uv_loop_t*,
^
In file included from ../fsevents.cc:87:
../src/constants.cc:12:62: warning: template argument uses unnamed type [-Wunnamed-type-template-args]
object->Set(NanNew("kFSEventStreamEventFlagNone"), NanNew(kFSEventStreamEventFlagNone));
^~~~~~
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:290:1: note: unnamed type used in template argument was declared here
enum {
^
../fsevents.cc:92:21: warning: 'NanSymbol' is deprecated [-Wdeprecated-declarations]
tpl->SetClassName(NanSymbol("FSEvents"));
^
../node_modules/nan/nan.h:727:51: note: 'NanSymbol' declared here
NAN_DEPRECATED NAN_INLINE v8::Local NanSymbol(
^
2 warnings and 1 error generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1046:12)
gyp ERR! System Darwin 13.2.0
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/chance/code/fsevents
gyp ERR! node -v v0.11.13
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
```