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

node-api: enable uncaught exceptions policy by default #49313

Merged
merged 2 commits into from
Sep 25, 2023

Conversation

legendecas
Copy link
Member

This enables the option --force-node-api-uncaught-exceptions-policy
for a specific Node-API addon when it is compiled with
NAPI_EXPERIMENTAL (and this would be the default behavior when
NAPI_VERSION 10 releases). This would not break existing Node-API
addons.

Refs: #36510

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/node-api

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. node-api Issues and PRs related to the Node-API. labels Aug 24, 2023
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

@mhdawson mhdawson added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 25, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 25, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@gabrielschulhof
Copy link
Contributor

It would be best to land this after #49515.

This enables the option `--force-node-api-uncaught-exceptions-policy`
for a specific Node-API addon when it is compiled with
`NAPI_EXPERIMENTAL` (and this would be the default behavior when
`NAPI_VERSION` 10 releases). This would not break existing Node-API
addons.
@legendecas legendecas force-pushed the node-api/uncaught-exception branch from 2efb890 to bcda6c4 Compare September 11, 2023 17:25
@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 12, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 12, 2023
@nodejs-github-bot
Copy link
Collaborator

doc/api/n-api.md Outdated Show resolved Hide resolved

const common = require('../../common');
const assert = require('assert');
const binding = require(`./build/${common.buildType}/binding`);
const binding = require(`./build/${common.buildType}/test_uncaught_exception`);

const callbackCheck = common.mustCall((err) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to put this code in a common module? That would make it clear that the same test is supposed to work with both versions, and only the preprocessor flags and the node launch flags differ. I think files not starting with test_ are not executed when the test suite runs.

@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 23, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 23, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@legendecas legendecas added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Sep 25, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 25, 2023
@nodejs-github-bot nodejs-github-bot merged commit 77597d3 into nodejs:main Sep 25, 2023
30 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 77597d3

ruyadorno pushed a commit that referenced this pull request Sep 28, 2023
This enables the option `--force-node-api-uncaught-exceptions-policy`
for a specific Node-API addon when it is compiled with
`NAPI_EXPERIMENTAL` (and this would be the default behavior when
`NAPI_VERSION` 10 releases). This would not break existing Node-API
addons.

PR-URL: #49313
Refs: #36510
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
@ruyadorno ruyadorno mentioned this pull request Sep 28, 2023
ruyadorno pushed a commit that referenced this pull request Sep 28, 2023
This enables the option `--force-node-api-uncaught-exceptions-policy`
for a specific Node-API addon when it is compiled with
`NAPI_EXPERIMENTAL` (and this would be the default behavior when
`NAPI_VERSION` 10 releases). This would not break existing Node-API
addons.

PR-URL: #49313
Refs: #36510
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
@ruyadorno ruyadorno mentioned this pull request Sep 28, 2023
@legendecas legendecas deleted the node-api/uncaught-exception branch October 24, 2023 06:57
alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
This enables the option `--force-node-api-uncaught-exceptions-policy`
for a specific Node-API addon when it is compiled with
`NAPI_EXPERIMENTAL` (and this would be the default behavior when
`NAPI_VERSION` 10 releases). This would not break existing Node-API
addons.

PR-URL: nodejs#49313
Refs: nodejs#36510
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
targos pushed a commit that referenced this pull request Nov 27, 2023
This enables the option `--force-node-api-uncaught-exceptions-policy`
for a specific Node-API addon when it is compiled with
`NAPI_EXPERIMENTAL` (and this would be the default behavior when
`NAPI_VERSION` 10 releases). This would not break existing Node-API
addons.

PR-URL: #49313
Refs: #36510
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
This enables the option `--force-node-api-uncaught-exceptions-policy`
for a specific Node-API addon when it is compiled with
`NAPI_EXPERIMENTAL` (and this would be the default behavior when
`NAPI_VERSION` 10 releases). This would not break existing Node-API
addons.

PR-URL: nodejs/node#49313
Refs: nodejs/node#36510
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
This enables the option `--force-node-api-uncaught-exceptions-policy`
for a specific Node-API addon when it is compiled with
`NAPI_EXPERIMENTAL` (and this would be the default behavior when
`NAPI_VERSION` 10 releases). This would not break existing Node-API
addons.

PR-URL: nodejs/node#49313
Refs: nodejs/node#36510
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. node-api Issues and PRs related to the Node-API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants