Skip to content

repl: handle exceptions from async context after close#62165

Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom
addaleax:repl-uncaught-after-close
Mar 9, 2026
Merged

repl: handle exceptions from async context after close#62165
nodejs-github-bot merged 1 commit intonodejs:mainfrom
addaleax:repl-uncaught-after-close

Conversation

@addaleax
Copy link
Member

@addaleax addaleax commented Mar 9, 2026

a9da9ff recently restructured async context handling in the REPL source so that it no longer uses the domain module, and instead performs its own async context tracking.

That change was not intended to be breaking, but it affected behavior for uncaught exceptions thrown after the REPL was closed. Those would now be treated as uncaught exceptions on the process level, which is probably not intentional in most situations.

While it's understandably not great that we handle execptions after closing the REPL instance, I am confident that it's best to restore the previous behavior for now and add more granular handling options separately and intentionally in a (potentially semver-major) follow-up change.

Refs: #61227

a9da9ff recently restructured async context handling
in the REPL source so that it no longer uses the domain module,
and instead performs its own async context tracking.

That change was not intended to be breaking, but it affected
behavior for uncaught exceptions thrown after the REPL was closed.
Those would now be treated as uncaught exceptions on the process
level, which is probably not intentional in most situations.

While it's understandably not great that we handle execptions
after closing the REPL instance, I am confident that it's
best to restore the previous behavior for now and add more
granular handling options separately and intentionally
in a (potentially semver-major) follow-up change.

Refs: nodejs#61227
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem. labels Mar 9, 2026
@addaleax addaleax added fast-track PRs that do not need to wait for 72 hours to land. and removed repl Issues and PRs related to the REPL subsystem. needs-ci PRs that need a full CI run. labels Mar 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Fast-track has been requested by @addaleax. Please 👍 to approve.

@addaleax
Copy link
Member Author

addaleax commented Mar 9, 2026

Requesting fast-track since it's a bugfix for a recently landed change

@addaleax addaleax added repl Issues and PRs related to the REPL subsystem. needs-ci PRs that need a full CI run. labels Mar 9, 2026
@addaleax addaleax added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Mar 9, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 9, 2026
@nodejs-github-bot
Copy link
Collaborator

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.65%. Comparing base (a9da9ff) to head (0c9c017).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #62165   +/-   ##
=======================================
  Coverage   89.65%   89.65%           
=======================================
  Files         676      676           
  Lines      206468   206546   +78     
  Branches    39537    39550   +13     
=======================================
+ Hits       185108   185181   +73     
- Misses      13480    13497   +17     
+ Partials     7880     7868   -12     
Files with missing lines Coverage Δ
lib/repl.js 93.97% <100.00%> (+0.02%) ⬆️

... and 67 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Mar 9, 2026

@addaleax addaleax added the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 9, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 9, 2026
@nodejs-github-bot nodejs-github-bot merged commit bd3cba5 into nodejs:main Mar 9, 2026
91 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in bd3cba5

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. fast-track PRs that do not need to wait for 72 hours to land. needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants