Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: clarify N-API version 1 #34344
doc: clarify N-API version 1 #34344
Changes from 8 commits
71c7a51
6904325
9455cdc
4bc4c13
6713a61
7d81104
c9ad6f1
127f153
2ece38b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to rephrase or even discard. The objective I'm trying to achieve with the suggestion is that the final phrasing include a reference to ABI stability and the earliest version which is ABI-compatible with what we have today.
Is v8.7.0 truly the first version of Node.js whose N-API implementation is ABI-compatible with today's? IIRC we had the final ABI in place even while we were still in experimental. Of course, it may not be worth pushing back the documented number a couple of minor versions just to "maximize our coverage".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gabrielschulhof 8.7.0 is the earliest level that @devsnek reported as being compatible so believe it was the earliest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gabrielschulhof I think I'd also prefer to leave out the extra sentence as I think it restates what the earlier lines say in a bit more detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know exactly. I gauged it based on when node-addon-api headers didn't have undefined symbols and such. I don't exhaustively test if it actually works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff between 8.7.0 and the last 8.x version (8.17.0) for node_api.h is:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the additions I don't see any API changes from 8.7.0 and the last 8.x version in the diff above (+struct uv_loop_s; // Forward declaration. was added as part of the NAPI_VERSION_2 addition, not sure why we did that but that's a separate issue)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git diff v8.6.0..v8.7.0 src/node_api.h shows no changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git diff v8.5.0..v8.6.0 src/node_api.h show a number of changes in the API.
I think that would likely say that v8.6.0 is the right one to specify. There don't seem to be any changes in the api file between v8.6.0 that and the last 8.x version which would affect the API shape. It was still experimental so there would be no guarantees about it working properly or internal behavior changing but that is not relevant to us adding the comment about when the shape of V1 was finalized.
@devsnek I'll update to v8.6.0 unless what you saw contradicts that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checking this again, it appears to be 8.6.0, not 8.7.0. 8.5.0 is missing napi_async_context and NAPI_AUTO_LENGTH which are both in version 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@devsnek thanks for confirming, we must have both been investigating at the same time.