-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat: enable explicit resource management for JavaScript #28119
base: main
Are you sure you want to change the base?
feat: enable explicit resource management for JavaScript #28119
Conversation
Need to land denoland/deno_ast#290 first and add a test that uses |
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.
LGTM!
We can't land this - V8 does not call the dispose method with the correct receiver when |
Just tested this branch and found another bug where a top-level console.log("before await using");
await using _ = {
[Symbol.dispose]() {
console.log("dispose");
},
};
console.log("after await using"); |
@0f-0b Thanks, filed https://issues.chromium.org/issues/396661138. |
This commit enabled [explicit resource management]
(https://github.com/tc39/proposal-explicit-resource-management)
proposal for JavaScript code.
This is done by upgrading
deno_ast
to a version that no longertranspiles TS files with
using
keyword, and instead enablesa V8 flag that provides native support.
Closes #20821