-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
doc: clarify the meaning of legacy status #42269
Changes from 6 commits
3323b8a
128c438
75c4766
d437706
471d162
e3d9b27
4273271
0334b1c
85ace39
71fa00c
cc7d2dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -42,7 +42,7 @@ The stability indices are as follows: | |||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
> Stability: 3 - Legacy. The feature is no longer recommended for use. While it | ||||||||||||||||||||||||||||||||||||
> likely will not be removed, and is still covered by semantic-versioning | ||||||||||||||||||||||||||||||||||||
> guarantees, use of the feature should be avoided. | ||||||||||||||||||||||||||||||||||||
> guarantees, use of the feature should be avoided if possible. | ||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking suggestion if we want to warn people away from Legacy APIs a bit more vigorously:
Suggested change
I'm also fine with the if possible being left in place or removed. These are all wordsmithing things that can be iterated on later. Any of them will work for now as far as I'm concerned. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be helpful to add something to the effect of "it is not necessary to track down all instances of this feature in every module in your dep tree and spam the maintainers with PRs" but maybe with like 80% less snark than that 😅 > Stability 3 - Legacy. Avoid using the feature in new code. Although it is
> unlikely to be removed and is still covered by semantic-versioning
> guarantees, it is no longer actively maintained, and better options are
> available. Features are marked as Legacy rather than being Deprecated if
> their use does no harm, and they are widely relied upon within the npm
> ecosystem. Bugs found in Legacy features are unlikely to be fixed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe that can go directly below rather than inside the banner?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "if their use does no harm" part is pretty useful; it tells everyone that there is nothing wrong with using Legacy things, and thus no reason to pester maintainers to migrate away from them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm not sure everyone would agree with the characterization that Legacy APIs do no harm and that there's nothing wrong with using them. Regarding
I would consider that at odds with "there is nothing wrong with using" it, although I'm sure there are semantic arguments to be had here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If the API is actually harmful and there is no way to fix such issues, I think we should help our users migrate to the recommended API by emitting a runtime warning and deprecate it because we don't want our users to get harmed. I think https://stackoverflow.com/a/2873695 sums up what deprecated and legacy means really well:
Given that url.parse() has a performance benefit and also makes it easier to handle relative URLs, I don't see why people should not use it even in newer code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated accordingly, PTAL. |
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
Use caution when making use of Experimental features, particularly within | ||||||||||||||||||||||||||||||||||||
modules. Users may not be aware that experimental features are being used. | ||||||||||||||||||||||||||||||||||||
|
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.
I'd prefer to keep the stronger wording. In my experience people will ignore stronger warnings when it's not possible, but will pick up something that's got a softer warning effectively because of logic along the lines of "how bad could it be".
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.
We could even strengthen it further by making it active voice. (Suggestion to follow....)
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.
I too would prefer the stronger wording if we were okay with emitting a runtime warning (this is not the same as removing the API), which people seem to be -1 about.