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

repl: runtime deprecate inputStream, outputStream and _builtinLibs #54750

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RedYetiDev
Copy link
Member

These features have been doc-only deprecated for years (since v14!), so maybe they should finally be runtime deprecated?

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem. labels Sep 3, 2024
@RedYetiDev RedYetiDev added the deprecations Issues and PRs related to deprecations. label Sep 3, 2024
@RedYetiDev RedYetiDev changed the title repl: runtime deprecate 04141 and 04142 repl: runtime deprecate 0141 and 0142 Sep 3, 2024
@richardlau richardlau added the semver-major PRs that contain breaking changes and should be released in the next major version. label Sep 3, 2024
Copy link

codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.62%. Comparing base (5949e16) to head (f5f2f29).
Report is 217 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #54750      +/-   ##
==========================================
+ Coverage   87.60%   87.62%   +0.01%     
==========================================
  Files         650      650              
  Lines      182829   182934     +105     
  Branches    35379    35383       +4     
==========================================
+ Hits       160173   160292     +119     
+ Misses      15928    15910      -18     
- Partials     6728     6732       +4     
Files with missing lines Coverage Δ
lib/repl.js 94.45% <100.00%> (+0.33%) ⬆️

... and 42 files with indirect coverage changes

@aduh95 aduh95 changed the title repl: runtime deprecate 0141 and 0142 repl: runtime deprecate inputStream, outputStream and _builtinLibs Sep 5, 2024
@aduh95
Copy link
Contributor

aduh95 commented Sep 5, 2024

Can you make the commit message clearer? e.g. repl: runtime deprecate `inputStream`, `outputStream` and `_builtinLibs` . Also, what is the rational for deprecating those?

@RedYetiDev
Copy link
Member Author

RedYetiDev commented Sep 5, 2024

Also, what is the rational for deprecating those?

These properties have been pending deprecation for years, so I believe it's finally time to runtime deprecate them. IMO things shouldn't be pending deprecation for as long as these were.

@aduh95
Copy link
Contributor

aduh95 commented Sep 5, 2024

These properties have been pending deprecation for years

Why are there deprecated in the first place?

IMO things shouldn't be pending deprecation for as long as these were.

Deprecations can stay at the same stage forever – I don't know about this one, but it is not a valid argument for runtime deprecate something.

No API can change to End-of-Life without going through a Runtime Deprecation
cycle. There is no rule that deprecated code must progress to End-of-Life.
Documentation-Only and Runtime Deprecations can remain in place for an unlimited
duration.

@RedYetiDev
Copy link
Member Author

Deprecations can stay at the same stage forever – I don't know about this one, but it is not a valid argument for runtime deprecate something.

Apologies. A better argument for this is that these features have been replaced. inputStream has been replaced with input, and the same for output. _builtinLibs isn't best-practice (IIRC). I believe that runtime deprecating these features will encourage users to use the newer, better, replacements.

@aduh95
Copy link
Contributor

aduh95 commented Sep 5, 2024

A better argument for this is that these features have been replaced.

It is a much better argument, but I'm not sure it's true. Looking at #33294, those already existed when the deprecation was decided.

I believe that runtime deprecating these features will encourage users to use the newer, better, replacements.

I don't know if the replacements are better, IIUC it's perfectly equivalent. It will for sure create some friction for our users forcing them to either update the code to use the non-deprecated alias (which may or may not be code that they maintain), or disable/ignore the warnings. As Anna said in #33294 (review), shouldn't we prefer to keep the alias around forever?

@RedYetiDev
Copy link
Member Author

Ping @nodejs/tsc per the plan for v23

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@aduh95
Copy link
Contributor

aduh95 commented Sep 20, 2024

I'm still not convinced we should runtime deprecate this as I said in #54750 (comment).

@RedYetiDev
Copy link
Member Author

I'm still not convinced we should runtime deprecate this as I said in #54750 (comment).

It will for sure create some friction for our users forcing them to either update the code to use the non-deprecated alias

Isn't that the point of deprecations? To encourage users to upgrade to the better maintained code? Runtime deprecating this will encourage users to move to code that is currently supported.

Maybe a few versions ago it would be a concern for friction for users, but these have been runtime deprecated for (IMO) long enough that if the users haven't upgraded to non-deprecated features, it's okay to present them with a warning.

@RedYetiDev RedYetiDev added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 20, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 20, 2024
@nodejs-github-bot
Copy link
Collaborator

@aduh95
Copy link
Contributor

aduh95 commented Sep 20, 2024

if the users haven't upgraded to non-deprecated features, it's okay to present them with a warning.

Why though? It seems to be adding friction for.. the sake of it?

@RedYetiDev
Copy link
Member Author

RedYetiDev commented Sep 20, 2024

Why though? It seems to be adding friction for.. the sake of it?

I wouldn’t say it’s just for the "sake" of it. It’s about tying up loose ends. These deprecations are meant to nudge users toward upgrading, and I think it's time to start issuing warnings for this feature. I don’t see it causing much friction—users should have been aware of this since it was documented as deprecated in v14.

If they choose not to upgrade, they can stick with V22, but that’s their loss, in my opinion. It’s crucial to keep the codebase current, and by gradually phasing out deprecated features, we encourage users to do the same.


I've added author ready, as there are enough TSC approvals for this to land in the next semver (and a CI run). @aduh95 are you blocking?

@RedYetiDev RedYetiDev added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. deprecations Issues and PRs related to deprecations. needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants