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

chore: Avoid using rid-based filesystem functions #2763

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

ayame113
Copy link
Contributor

@ayame113 ayame113 commented Oct 10, 2022

I think Deno CLI is trying to move away from using rid based filesystem functions. (denoland/deno#12107, denoland/deno#15796 (comment), denoland/deno#15933 (comment))
This PR removes the use of rid based functions from the standard library and replaces them with:

  • Deno.read(file.rid, buf) -> file.read(buf)
  • Deno.write(file.rid, buf) -> file.write(buf)
  • Deno.close(file.rid) -> file.close()

(However, I didn't change node and wasi because they still seem to need rid-based functions.)

This is just a source code cleanup and does not change existing behavior.

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@cjihrig cjihrig merged commit 6b04b73 into denoland:main Oct 10, 2022
@ayame113 ayame113 deleted the leave-rid branch October 10, 2022 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants