GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — repl: runtime deprecate `inputStream`, `outputStream` and `_builtinLibs` by avivkeller · Pull Request #54750 · nodejs/node

Conversation

@avivkeller

@avivkeller avivkeller commented Sep 3, 2024

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@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
@avivkeller avivkeller added the deprecations Issues and PRs related to deprecations. label Sep 3, 2024
@avivkeller avivkeller 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
@codecov

codecov Bot commented Sep 3, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.62%. Comparing base (5949e16) to head (f5f2f29).
Report is 273 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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

aduh95 commented Sep 5, 2024

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell approved these changes Sep 5, 2024
View reviewed changes
@avivkeller

avivkeller commented Sep 5, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95

aduh95 commented Sep 5, 2024

Copy link
Copy Markdown
Contributor

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.

node/doc/contributing/collaborator-guide.md

Lines 492 to 495 in 27f1306

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller

avivkeller commented Sep 5, 2024

Copy link
Copy Markdown
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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95

aduh95 commented Sep 5, 2024

Copy link
Copy Markdown
Contributor

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 reviewed Sep 5, 2024
View reviewed changes
Comment thread test/parallel/test-repl-tab-complete-import.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 reviewed Sep 5, 2024
View reviewed changes
Comment thread test/parallel/test-repl-tab-complete.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 reviewed Sep 5, 2024
View reviewed changes
Comment thread test/parallel/test-repl-options.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller
repl: runtime deprecate inputStream, outputStream and _builtinLibs
f5f2f29
@avivkeller

avivkeller commented Sep 19, 2024

Copy link
Copy Markdown
Member Author

Ping @nodejs/tsc per the plan for v23

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mcollina
mcollina approved these changes Sep 20, 2024
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

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.

lgtm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aduh95

aduh95 commented Sep 20, 2024

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller

avivkeller commented Sep 20, 2024

Copy link
Copy Markdown
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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller avivkeller added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 20, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 20, 2024
@nodejs-github-bot

nodejs-github-bot commented Sep 20, 2024

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/62602/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

marco-ippolito
marco-ippolito approved these changes Sep 20, 2024
View reviewed changes
@aduh95

aduh95 commented Sep 20, 2024

Copy link
Copy Markdown
Contributor

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller

avivkeller commented Sep 20, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller avivkeller added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Sep 20, 2024
aduh95
aduh95 requested changes Sep 23, 2024
View reviewed changes

@aduh95 aduh95 left a comment

Copy link
Copy Markdown
Contributor

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.

Each deprecation should be its own PR. Also this shouldn't land without a CITGM run (and probably shouldn't land at all until there's a rational for it).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aduh95 aduh95 removed the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Sep 23, 2024
@avivkeller avivkeller added the needs-citgm PRs that need a CITGM CI run. label Sep 23, 2024
@avivkeller

avivkeller commented Sep 24, 2024

Copy link
Copy Markdown
Member Author

Each deprecation should be its own PR.

Got it. I currently have a lot of open PRs, and I'm trying to narrow my focus down to where it's really needed, so I'm closing this until a time where I can find a good rationale to not waste reviewers time

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller avivkeller closed this Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aduh95 aduh95 aduh95 requested changes
@mcollina mcollina mcollina approved these changes
@jasnell jasnell jasnell approved these changes
@marco-ippolito marco-ippolito marco-ippolito approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

deprecations Issues and PRs related to deprecations. needs-ci PRs that need a full CI run. needs-citgm PRs that need a CITGM 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

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@avivkeller @aduh95 @nodejs-github-bot @mcollina @jasnell @marco-ippolito @richardlau
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.