-
-
Notifications
You must be signed in to change notification settings - Fork 33k
doc: deprecate closing fs.Dir
on garbage collection
#59839
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
base: main
Are you sure you want to change the base?
doc: deprecate closing fs.Dir
on garbage collection
#59839
Conversation
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.
The subsystem should be doc:
, not fs:
4e56891
to
5a293b6
Compare
fs.Dir
on garbage collectionfs.Dir
on garbage collection
5a293b6
to
96104ef
Compare
{ | ||
await using dir = await opendir('/async/disposable/directory'); | ||
} // Closed by dir[Symbol.asyncDispose]() | ||
|
||
{ | ||
using dir = await opendir('/sync/disposable/directory'); | ||
} // Closed by dir[Symbol.dispose]() |
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.
Adding
dont-land-on-v22.x
Doc-only version of #58850 (runtime deprecation).
Note that every time a
Dir
is closed on GC, it already emits a warning. Alternatively we can make this deprecation runtime right away, I don't have strong opinion on this.