GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||
GeezerVison is showing github.com — n-api: restrict exports by version by kfarnung · Pull Request #19962 · nodejs/node Conversation
|
|
can we just call it napi_version |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I updated it to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Note to self: Add a versioning section to the docs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Discussed a bit in the N-API meeting today, Kyle will do a few refinements and then we'll review in detail. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
What’s the motivation for restricting exports? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The idea is that an embedder can declare the version of N-API they want to target and trying to use any newer APIs would result in a build break. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
with our styles i think this should be
#ifndef NAPI_VERSION #define NAPI_VERSION 2 #endif // NAPI_VERSION
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@mhdawson I bumped the default NAPI_VERSION to 3 since v10.0.0 is coming out soon and we're in the process of backporting the version 3 changes anyway. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The changes look good but I think we discussed adding a section to the doc which explains how the to use the define etc. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yeah, sorry about that, I haven't had a chance to flesh that out yet. Now that 10.0.0 is out I should have a little more time. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
2902039 to
3ce6459
Compare
|
Ping @kfarnung |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I rebased the changes (pending a build/test locally), I believe I have addressed @mhdawson's comments as well. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ping @nodejs/n-api |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@kfarnung I think the one thing we discussed addint to this since you updated was the concept of EXPERIMENTAL that we could use to manage the flow of new functions into N-API. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
That change is on my backlog, I've just been busy with other stuff. I'm hoping to get to that before the N-API meeting on Thursday. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Rebased and squashed: https://ci.nodejs.org/job/node-test-pull-request/15657/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
One more: https://ci.nodejs.org/job/node-test-pull-request/15659/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I believe fatal_exception is part of NAPI_VERSION 3, it is already exposed in 6.x
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
These 2 are already in 10.x but not in 6.x so we probably missed bumping the NAPI_VERSION when they went out.
If we leave as experimental like this PR does we risk breaking somebody, but the same goes if we add a guard for NAPI_VERSION 4. I think we'll need to figure out who added them and figure out what makes the most sense. I do think getting this PR landed would be good though, so maybe just leave them in the regular set (ie non-experimental) for this PR ?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@addaleax What do you think the best approach is? I've moved them to NAPI_VERSION 3 for now.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM once napi_fatal_exception is moved under version 3, and napi_add_env_cleanup_hook and napi_remove_env_cleanup_hook are moved out of experimental
Sorry, something went wrong.
There was an error while loading. Please reload this page.
86b0958 to
fa003a3
Compare
|
Rebased: https://ci.nodejs.org/job/node-test-pull-request/15677/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
One more CI: https://ci.nodejs.org/job/node-test-pull-request/15711/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@mhdawson Any other issues? I'm hoping to land this today, if possible |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@kfarnung agreeing we should land, as would like this in place so we can make sure all future API are added as experimental. Can you take the action to follow up on napi_add_env_cleanup_hook/napi_remove_env_cleanup_hook to see if we can move out to NAPI_VERSION 4.x without breaking people? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* Move `napi_get_uv_event_loop` into the `NAPI_VERSION >= 2` section * Move `napi_open_callback_scope`, `napi_close_callback_scope`, `napi_fatal_exception`, `napi_add_env_cleanup_hook`, and `napi_remove_env_cleanup_hook` into the `NAPI_VERSION >= 3` section * Added a missing `added` property to `napi_get_uv_event_loop` in the docs * Added a `napiVersion` property to the docs and updated the parser and generator to use it. * Added usage documentation PR-URL: #19962 Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
|
Landed in 8476053 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* Move `napi_get_uv_event_loop` into the `NAPI_VERSION >= 2` section * Move `napi_open_callback_scope`, `napi_close_callback_scope`, `napi_fatal_exception`, `napi_add_env_cleanup_hook`, and `napi_remove_env_cleanup_hook` into the `NAPI_VERSION >= 3` section * Added a missing `added` property to `napi_get_uv_event_loop` in the docs * Added a `napiVersion` property to the docs and updated the parser and generator to use it. * Added usage documentation PR-URL: #19962 Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
* Move `napi_get_uv_event_loop` into the `NAPI_VERSION >= 2` section * Move `napi_open_callback_scope`, `napi_close_callback_scope`, `napi_fatal_exception`, `napi_add_env_cleanup_hook`, and `napi_remove_env_cleanup_hook` into the `NAPI_VERSION >= 3` section * Added a missing `added` property to `napi_get_uv_event_loop` in the docs * Added a `napiVersion` property to the docs and updated the parser and generator to use it. * Added usage documentation PR-URL: nodejs#19962 Backport-PR-URL: nodejs#25648 Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
* Move `napi_get_uv_event_loop` into the `NAPI_VERSION >= 2` section * Move `napi_open_callback_scope`, `napi_close_callback_scope`, `napi_fatal_exception`, `napi_add_env_cleanup_hook`, and `napi_remove_env_cleanup_hook` into the `NAPI_VERSION >= 3` section * Added a missing `added` property to `napi_get_uv_event_loop` in the docs * Added a `napiVersion` property to the docs and updated the parser and generator to use it. * Added usage documentation PR-URL: #19962 Backport-PR-URL: #25648 Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.