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

deprecate Deno.Buffer #9588

Closed
ry opened this issue Feb 23, 2021 · 9 comments
Closed

deprecate Deno.Buffer #9588

ry opened this issue Feb 23, 2021 · 9 comments
Labels
feat new feature (which has been agreed to/accepted) public API related to "Deno" namespace in JS runtime Relates to code in the runtime crate

Comments

@ry
Copy link
Member

ry commented Feb 23, 2021

Move to std

@kitsonk kitsonk added feat new feature (which has been agreed to/accepted) public API related to "Deno" namespace in JS runtime Relates to code in the runtime crate labels Feb 23, 2021
@bartlomieju
Copy link
Member

This would be a breaking change so should probably be considered for 2.0.

Additionally Deno.readAll and Deno.readAllSync depend on Buffer, but it should be straight-forward to rewrite them not to depend on Buffer.

@kitsonk
Copy link
Contributor

kitsonk commented Feb 23, 2021

Deprecating it wouldn't, right? Removing it would.

@bartlomieju
Copy link
Member

Deprecating it wouldn't, right? Removing it would.

Sure, how would we go about deprecating? Printing something to console when new instance of Buffer is created? I guess it's a good point to consider how we'll be deprecating APIs going forward (IIRC we haven't done this yet)

@lucacasonato
Copy link
Member

lucacasonato commented Feb 23, 2021

/** @deprecate Use buffer from https://deno.land/std/io/buffer.ts instead. */

Maybe we could also add a deno lint lint?

@kitsonk
Copy link
Contributor

kitsonk commented Feb 23, 2021

I would say no... I would say we simply use @deprecated in the JSDoc... that would highlight it in the documentation and would give anyone using an intelligent editor a visual indication. Logging to stderr/stdout is painful for such things and unnecessary in my opinion.

Notification_Center

@kitsonk
Copy link
Contributor

kitsonk commented Feb 23, 2021

👍 for deno lint but ideally deno lint should just parse the JSDoc and warn on any @deprecated use instead of having to maintain a list of APIs.

@lucacasonato
Copy link
Member

ideally deno lint should just parse the JSDoc and warn on any @deprecated use instead of having to maintain a list of APIs.

I don't think this isn't possible until deno lint has type information like TS does.

@kitsonk
Copy link
Contributor

kitsonk commented Feb 23, 2021

@lucacasonato I commented in denoland/deno_lint#623... it is simply tracking symbols across module boundaries, which swc does... it wouldn't work for type only constructs true, but deno doc doesn't have type information and it reads and tracks stuff just fine, right?

@lucacasonato
Copy link
Member

Closing in favor of #9795

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat new feature (which has been agreed to/accepted) public API related to "Deno" namespace in JS runtime Relates to code in the runtime crate
Projects
None yet
Development

No branches or pull requests

4 participants