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

Fix compilation errors on node 12 #8

Merged
merged 2 commits into from
Nov 29, 2019
Merged

Fix compilation errors on node 12 #8

merged 2 commits into from
Nov 29, 2019

Conversation

darangi
Copy link

@darangi darangi commented Nov 28, 2019

The following errors were generated while trying to compile on node 12

../src/binding.cpp:33:37: error: too few arguments to function call, single
      argument 'isolate' was not specified
  std::string str(v8str->Utf8Length(), ' ');

../src/binding.cpp:34:27: error: too few arguments to function call, expected at
      least 2, have 1
  v8str->WriteUtf8(&str[0]);
  ~~~~~~~~~~~~~~~~        

../src/binding.cpp:54:37: error: no matching member function for call to
      'ToString'
    return to_std_string(propLocal->ToString());

../src/binding.cpp:76:47: error: too few arguments to function call, single
      argument 'context' was not specified
    MatcherConstructor.Reset(tpl->GetFunction());

../src/binding.cpp:77:73: error: too few arguments to function call, single
      argument 'context' was not specified
    exports->Set(Nan::New("Matcher").ToLocalChecked(), tpl->GetFunction());

../src/binding.cpp:95:46: error: no matching member function for call to
      'ToString'
    std::string query(to_std_string(info[0]->ToString()));

../src/binding.cpp:100:35: error: no matching member function for call to
      'ToObject'
      auto options_obj = info[1]->ToObject();

../src/binding.cpp:162:52: error: no matching member function for call to
      'ToString'
        auto value = to_std_string(values->Get(i)->ToString());

@lkashef
Copy link

lkashef commented Nov 28, 2019

@darangi Take a look at this atom/nsfw#11, it should help, it looks like you are facing the same issues. In general any PR from any node package adding node 12 support should be a great resource, it's also a good idea to add support for node 12 in the CI as indicated in this PR.

@darangi darangi marked this pull request as ready for review November 29, 2019 01:32
@darangi darangi self-assigned this Nov 29, 2019
@darangi darangi requested a review from lkashef November 29, 2019 02:00
Copy link

@lkashef lkashef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good man! Good job @darangi.

@darangi
Copy link
Author

darangi commented Nov 29, 2019

@lkashef Thanks! I just noticed this repo doesn't have CI?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants