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 instantiating without new #54869

Merged
merged 6 commits into from
Nov 7, 2024

Conversation

RedYetiDev
Copy link
Member

Followup #54842

This PR runtime-deprecates instantiating the REPL classes without the new keyword.

@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. util Issues and PRs related to the built-in util module. labels Sep 9, 2024
@RedYetiDev RedYetiDev added semver-major PRs that contain breaking changes and should be released in the next major version. deprecations Issues and PRs related to deprecations. labels Sep 9, 2024
lib/internal/util.js Outdated Show resolved Hide resolved
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.32%. Comparing base (f0e5b6a) to head (9bf85bc).
Report is 89 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #54869      +/-   ##
==========================================
- Coverage   88.43%   88.32%   -0.11%     
==========================================
  Files         654      654              
  Lines      187662   187673      +11     
  Branches    36120    36044      -76     
==========================================
- Hits       165955   165763     -192     
- Misses      14948    15133     +185     
- Partials     6759     6777      +18     
Files with missing lines Coverage Δ
lib/internal/util.js 97.11% <100.00%> (+0.13%) ⬆️
lib/repl.js 94.95% <100.00%> (-0.02%) ⬇️

... and 29 files with indirect coverage changes

Copy link
Contributor

@LiviaMedeiros LiviaMedeiros left a comment

Choose a reason for hiding this comment

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

LGTM with updates to existing codebase. Example:

@aduh95 aduh95 added the needs-citgm PRs that need a CITGM CI run. label Sep 10, 2024
@RedYetiDev
Copy link
Member Author

CC @nodejs/repl

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

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

I think we need a documentation-only deprecation on this first and we need to get a sense of how impactful a runtime deprecation would be on the ecosystem here. Given the nature of the repl module, this would most likely lead to a fair bit of console output noise for modules that are using the repl and users may not actually be able to do anything about it. So let's be careful.

@RedYetiDev
Copy link
Member Author

I think we need a documentation-only deprecation on this first and we need to get a sense of how impactful a runtime deprecation would be on the ecosystem here.

FWIW It has already been doc-deprecated (but very recently).

@RedYetiDev
Copy link
Member Author

@jasnell would you be opposed to landing this in v23 entirely-I'm happy to wait until v24?

@jasnell
Copy link
Member

jasnell commented Sep 17, 2024

I prefer to wait

@RedYetiDev
Copy link
Member Author

Got it. While I'd prefer for this to release in v23, I respect your opinion. I'll look into other optimizations in the meantime.

@RedYetiDev
Copy link
Member Author

RedYetiDev commented Sep 19, 2024

@nodejs/tsc per nodejs/Release#1034


My main question is: is this something that could happen in v23? Or should it wait (like @jasnell suggested)?

@benjamingr
Copy link
Member

I agree with James on this

@anonrig
Copy link
Member

anonrig commented Sep 19, 2024

Let's give people some time to make arrangements, before polluting their console.

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

@RedYetiDev RedYetiDev added the blocked PRs that are blocked by other issues or PRs. label Sep 30, 2024
@RedYetiDev
Copy link
Member Author

RedYetiDev commented Sep 30, 2024

I've added the blocked label, as this should go out with v24.

@jasnell, Putting aside the 'dont release yet', could you re-review?

@RedYetiDev RedYetiDev added dont-land-on-v23.x PRs that should not land on the v23.x-staging branch and should not be released in v23.x. and removed blocked PRs that are blocked by other issues or PRs. labels Oct 1, 2024
lib/internal/util.js Outdated Show resolved Hide resolved
@RedYetiDev RedYetiDev added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Oct 26, 2024
lib/repl.js Outdated Show resolved Hide resolved
RedYetiDev and others added 2 commits October 26, 2024 16:29
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@RedYetiDev
Copy link
Member Author

Hey, I assume this needs a new CI since there has been commits since the latest change, can someone start it?

The CITGM shouldn't need a rerun tho (IIUC)

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

@RedYetiDev
Copy link
Member Author

Can someone restart the fialed build so this can land? Thanks!

@nodejs-github-bot
Copy link
Collaborator

@RedYetiDev
Copy link
Member Author

RedYetiDev commented Nov 3, 2024

The CI is 📗, can this land 🚀?

@JakobJingleheimer JakobJingleheimer added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 6, 2024
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Nov 6, 2024
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/54869
✔  Done loading data for nodejs/node/pull/54869
----------------------------------- PR info ------------------------------------
Title      repl: runtime deprecate instantiating without new (#54869)
Author     Aviv Keller <redyetidev@gmail.com> (@RedYetiDev)
Branch     RedYetiDev:repl-deprecate-2 -> nodejs:main
Labels     util, repl, semver-major, author ready, deprecations, needs-ci, needs-citgm, commit-queue-squash
Commits    6
 - repl: runtime deprecate instantiating without new
 - fixup!
 - fixup! fixup!
 - fixup! fixup! fixup!
 - fix flaky test
 - fixup! fix flaky test
Committers 2
 - RedYetiDev <38299977+RedYetiDev@users.noreply.github.com>
 - GitHub <noreply@github.com>
PR-URL: https://github.com/nodejs/node/pull/54869
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/54869
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
--------------------------------------------------------------------------------
   ⚠  Commits were pushed since the last approving review:
   ⚠  - repl: runtime deprecate instantiating without new
   ⚠  - fixup!
   ⚠  - fixup! fixup!
   ⚠  - fixup! fixup! fixup!
   ⚠  - fix flaky test
   ⚠  - fixup! fix flaky test
   ℹ  This PR was created on Mon, 09 Sep 2024 23:11:31 GMT
   ✔  Approvals: 4
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/54869#pullrequestreview-2383013809
   ✔  - LiviaMedeiros (@LiviaMedeiros): https://github.com/nodejs/node/pull/54869#pullrequestreview-2302928904
   ✔  - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/54869#pullrequestreview-2374242695
   ✔  - Benjamin Gruenbaum (@benjamingr) (TSC): https://github.com/nodejs/node/pull/54869#pullrequestreview-2397344156
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2024-11-03T06:43:31Z: https://ci.nodejs.org/job/node-test-pull-request/63402/
   ℹ  Last CITGM CI on 2024-10-24T21:16:40Z: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/3494/
- Querying data for job/node-test-pull-request/63402/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/11712304862

@RedYetiDev RedYetiDev removed the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Nov 6, 2024
@JakobJingleheimer JakobJingleheimer added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 7, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 7, 2024
@nodejs-github-bot nodejs-github-bot merged commit 0368f2f into nodejs:main Nov 7, 2024
67 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 0368f2f

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. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. 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. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants