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: deprecate Deno.Reader, Deno.ReaderSync, Deno.Writer, Deno.WriterSync and Deno.Closer #21465

Merged
merged 2 commits into from
Dec 13, 2023

Conversation

iuioiua
Copy link
Contributor

@iuioiua iuioiua commented Dec 5, 2023

This change deprecates Deno.Reader, Deno.ReaderSync, Deno.Writer, Deno.WriterSync and Deno.Closer in favour of the Web Streams API. After discussing with Yoshiya, we both thought now might be the right time to deprecate these interfaces with v2 getting closer.

@iuioiua iuioiua changed the title chore: deprecate IO interfaces chore: deprecate Deno.Reader, Deno.ReaderSync, Deno.Writer, Deno.WriterSync and Deno.Closer Dec 5, 2023
@iuioiua iuioiua marked this pull request as ready for review December 5, 2023 03:27
@crowlKats
Copy link
Member

Ref #9795

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM

@bartlomieju
Copy link
Member

@iuioiua are there any APIs in deno_std that use these types that are not deprecated?

@iuioiua
Copy link
Contributor Author

iuioiua commented Dec 7, 2023

In std, we use a types.d.ts file which copies these IO interfaces exactly. Sub-modules that use these identical interfaces from types.d.ts and are not deprecated include:

@iuioiua
Copy link
Contributor Author

iuioiua commented Dec 7, 2023

Sidenote: IMO, having these identical types is confusing, and I think we should remove them and use Deno.* types.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

In std, we use a types.d.ts file which copies these IO interfaces exactly. Sub-modules that use these identical interfaces from types.d.ts and are not deprecated include:

I spoke with @crowlKats about std/archive and it seems we could do compression side, but decompression is currently blocked 🤔 As for std/log - could we rewrite it to use Web streams APIs instead?

That said, I think these two shouldn't be a blocker for landing this deprecation

@iuioiua
Copy link
Contributor Author

iuioiua commented Dec 8, 2023

I spoke with @crowlKats about std/archive and it seems we could do compression side, but decompression is currently blocked 🤔

Yeah, I looked into it and couldn't fix the issue. See here.

As for std/log - could we rewrite it to use Web streams APIs instead?

Yep, I've already created an issue to do that here.

That said, I think these two shouldn't be a blocker for landing this deprecation

Agreed.

@mmastrac mmastrac merged commit a3fc93a into denoland:main Dec 13, 2023
14 checks passed
@mmastrac
Copy link
Contributor

Landing for v1.39

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.

5 participants