Skip to content

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

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
legendecas:node-api/uncaught-exception
Sep 25, 2023
Merged

node-api: enable uncaught exceptions policy by default#49313
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
legendecas:node-api/uncaught-exception

Conversation

@legendecas

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

Review requested:

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

@nodejs-github-botnodejs-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

@mhdawsonmhdawson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@mhdawsonmhdawson added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 25, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 25, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@gabrielschulhof

Copy link
Copy Markdown
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
legendecasforce-pushed the node-api/uncaught-exception branch from 2efb890 to bcda6c4CompareSeptember 11, 2023 17:25
@legendecaslegendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 12, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 12, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Comment threaddoc/api/n-api.md Outdated
const binding = require(`./build/${common.buildType}/binding`);
const binding = require(`./build/${common.buildType}/test_uncaught_exception`);

const callbackCheck = common.mustCall((err) => {

Copy link
Copy Markdown
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.

@legendecaslegendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 23, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 23, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@legendecaslegendecas 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-botnodejs-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:mainSep 25, 2023
@nodejs-github-bot

Copy link
Copy Markdown
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>
@ruyadornoruyadorno 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>
@ruyadornoruyadorno mentioned this pull request Sep 28, 2023
@legendecas
legendecas deleted the node-api/uncaught-exception branch October 24, 2023 06:57
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>
@targostargos mentioned this pull request Nov 28, 2023
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 freeto 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-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.needs-ciPRs that need a full CI run.node-apiIssues and PRs related to the Node-API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@legendecas@nodejs-github-bot@gabrielschulhof@mhdawson