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

Fix Node.js v10.12.0 deprecation warnings. #825

Merged
merged 2 commits into from
Nov 26, 2018
Merged

Fix Node.js v10.12.0 deprecation warnings. #825

merged 2 commits into from
Nov 26, 2018

Conversation

bnoordhuis
Copy link
Member

v10.12.0 turns on a number of V8 deprecation warnings. This commit fixes
them in NAN.

Fixes: #810
Refs: #811

@@ -337,7 +345,23 @@ Factory<v8::StringObject>::New(v8::Local<v8::String> value) {
#if V8_MAJOR_VERSION >= 7
Copy link
Member

Choose a reason for hiding this comment

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

At the other locations this #if was replaced by #if NODE_MAJOR_VERSION >= 10. Is it kept intentionally here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Should I add a comment?

Copy link
Member

Choose a reason for hiding this comment

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

Up to you.
Personally I find the #ifs on V8 version not nice as it indicates that it breaks the API/ABI stability within a major nodejs version.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I agree. I've pushed a new commit that removes it, PTAL.

@bnoordhuis
Copy link
Member Author

Rebased onto master. The CI should be passing now that #826 is merged.

Copy link

@m2hd1 m2hd1 left a comment

Choose a reason for hiding this comment

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

🚢 🚢 🚢

@bnoordhuis
Copy link
Member Author

@agnat @kkoopa Can I persuade one of you to take a look? I'll trade you a review in exchange!

@kkoopa
Copy link
Collaborator

kkoopa commented Nov 25, 2018

Nice job! LGTM.

v10.12.0 turns on a number of V8 deprecation warnings. This commit fixes
them in NAN.

Fixes: #810
PR-URL: #825
Refs: #811
Reviewed-By: Benjamin Byholm <bbyholm@abo.fi>
This commit was brought to you by `perl -i -pe` (well, mostly - I did
some manual fixups.)

PR-URL: #825
Reviewed-By: Benjamin Byholm <bbyholm@abo.fi>
@bnoordhuis bnoordhuis merged commit e222068 into nodejs:master Nov 26, 2018
@bnoordhuis bnoordhuis deleted the fix810 branch November 26, 2018 00:19
@bnoordhuis
Copy link
Member Author

Thanks for the review, Benjamin. Landed in e6ef6a4...e222068.

kkoopa pushed a commit that referenced this pull request Dec 18, 2018
The five argument WriteUtf8() method was introduced in Node.js v10.0.0,
it doesn't exist in older 10.x releases.

Use the four argument overload and a bunch of pragmas to silence the
compiler warnings.

Fixes: #832
Refs: #825
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

Successfully merging this pull request may close these issues.

New deprecation warnings in node 10.12
5 participants