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

doc: add blurb about implications of ABI stability #22508

Conversation

gabrielschulhof
Copy link
Contributor

Mention that ABI stability can be achieved only by linking to ABI-
stable parts of Node.js and to other libraries which are ABI-stable.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

Mention that ABI stability can be achieved only by linking to ABI-
stable parts of Node.js and to other libraries which are ABI-stable.
doc/api/n-api.md Outdated

Although N-API provides an ABI stability guarantee, other parts of Node.js do
not, and any external libraries used from the addon may not. In particular,
neither of the following Node.js APIs provides an ABI stability guarantee:
Copy link
Member

Choose a reason for hiding this comment

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

I think this wording is a bit misleading – we do have ABI stability guarantees, but we follow semver rather than not allowing any breakage.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point - sorry!

Copy link
Contributor

@mscdex mscdex Aug 24, 2018

Choose a reason for hiding this comment

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

How about instead (s/neither/none/, s/Node.js//, s/provides/provide/):

In particular, none of the following APIs provide an ABI stability guarantee:

@mscdex
Copy link
Contributor

mscdex commented Aug 24, 2018

Perhaps this could be combined with #22237 or vice versa?

doc/api/n-api.md Outdated
#include <node_object_wrap.h>
#include <node_perf_common.h>
#include <node_platform.h>
#include <node_version.h>
Copy link
Member

Choose a reason for hiding this comment

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

Only node_buffer.h, node_version.h, node_object_wrap.h and node.h (+ N-API) are real public API. I’ll open a PR to put the others behind NODE_WANT_INTERNALS.

@@ -367,6 +367,10 @@ set of APIs that are used by the native code. Instead of using the V8
or [Native Abstractions for Node.js][] APIs, the functions available
in the N-API are used.

Creating and maintaining an add-on that benefits from the ABI stability
Copy link
Member

Choose a reason for hiding this comment

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

add-on -> addon for consistency with the rest of the doc.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, I'll just go ahead and make that change myself since I'm right here...

Copy link
Member

@lpinca lpinca left a comment

Choose a reason for hiding this comment

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

LGTM with comments addressed.

@gabrielschulhof
Copy link
Contributor Author

@mscdex I believe there's a difference between this ABI compatibility note and the one in #22237, in that herein we deal with ABI compatibility across major versions of Node.js, whereas in the other we deal with ABI compatibility within a major version of Node.js.

@gabrielschulhof
Copy link
Contributor Author

@addaleax I have updated the text to reflect your comments.

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM - once linter is green...

@BridgeAR
Copy link
Member

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 31, 2018
@gabrielschulhof
Copy link
Contributor Author

doc/api/n-api.md Outdated
```C
#include <node_api.h>
```
and by checking, for all external library that it uses, that the external
Copy link
Member

Choose a reason for hiding this comment

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

typo: libraries

@gabrielschulhof
Copy link
Contributor Author

@gabrielschulhof
Copy link
Contributor Author

gabrielschulhof commented Sep 3, 2018

Landed in 7033fc7.

gabrielschulhof pushed a commit to gabrielschulhof/node that referenced this pull request Sep 3, 2018
Mention that ABI stability can be achieved only by linking to ABI-
stable parts of Node.js and to other libraries which are ABI-stable.

PR-URL: nodejs#22508
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@gabrielschulhof gabrielschulhof deleted the abi-stability-implications branch September 3, 2018 15:33
targos pushed a commit that referenced this pull request Sep 3, 2018
Mention that ABI stability can be achieved only by linking to ABI-
stable parts of Node.js and to other libraries which are ABI-stable.

PR-URL: #22508
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
targos pushed a commit that referenced this pull request Sep 6, 2018
Mention that ABI stability can be achieved only by linking to ABI-
stable parts of Node.js and to other libraries which are ABI-stable.

PR-URL: #22508
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants