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

Unstable APIs in stable packages should be more clearly marked as unstable #5920

Closed
15 tasks done
kt3k opened this issue Sep 6, 2024 · 8 comments
Closed
15 tasks done

Comments

@kt3k
Copy link
Member

kt3k commented Sep 6, 2024

Currently we add the note @experimental **UNSTABLE**: New API, yet to be vetted. to the docs of unstable APIs. However there are feedbacks that this note is not enough for making the users aware of the unstableness of those APIs, and there are too high chance that users unintentionally start using them.

We currently consider moving unstable APIs under unstable- prefixed export paths. For example, (unstable) route API in @std/http becomes:

-import { route } from "@std/http/route";
+import { route } from "@std/http/unstable-route";

@BlackAsLight
Copy link
Contributor

With the current note, are you trying to communicate that the public API is unstable in the sense that it might change drastically and in breaking ways or that it is free of malicious intent?

When I hear the word unstable, I get the impression that it might change in breaking ways, but the latter part of the note "yet to be vetted" sounds like that's not the message trying to be communicated here.

@timreichen
Copy link
Contributor

How about logging a warning?

@kt3k
Copy link
Member Author

kt3k commented Sep 6, 2024

@BlackAsLight

With the current note, are you trying to communicate that the public API is unstable in the sense that it might change drastically and in breaking ways or that it is free of malicious intent?

It means it can be changed in breaking ways in the future. The phrase is traditionally used in CLI's API docs. Maybe it can be worded in a better way

@timreichen

How about logging a warning?

That might be another option, but there's also an opinion from the core team that it should be visible in sample code. (Warnings are only visible at runtime)

@iuioiua
Copy link
Contributor

iuioiua commented Sep 7, 2024

How about logging a warning?

I'd rather not. We did this for deprecated APIs in preparation for Deno 2 and quickly reverted it, even with environment variables that disabled it. It seemed to cause more annoyance than provide help.

@kt3k
Copy link
Member Author

kt3k commented Sep 10, 2024

These 51 APIs are targets of this change.

https://gist.github.com/kt3k/f6754c2fa5b90cc6ef7c03396aa90b37

@iuioiua
Copy link
Contributor

iuioiua commented Sep 11, 2024

@kt3k, if you have time, would you be able to create a checklist for the modules that need to migrate? I can probably work through this tomorrow.

@kt3k
Copy link
Member Author

kt3k commented Sep 11, 2024

Added the task list in the first comment.

@kt3k kt3k pinned this issue Sep 12, 2024
@kt3k
Copy link
Member Author

kt3k commented Sep 12, 2024

All unstable items in stable packages have been migrated to unstable-<api> name paths.

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

No branches or pull requests

4 participants