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

readline: rename input field and remove excess params #31991

Closed
wants to merge 3 commits into from

Conversation

rexagod
Copy link
Member

@rexagod rexagod commented Feb 27, 2020

Removed excess parameters from the createInterface method,
renamed input field to options, in accordance with the docs,
and made corresponding changes in tests.

Refs: #31603 (comment)

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Removed excess parameters from the createInterface method,
renamed input field to options, in accordance with the docs,
and made corresponding changes in tests.

Refs: nodejs#31603 (comment)
@nodejs-github-bot nodejs-github-bot added the readline Issues and PRs related to the built-in readline module. label Feb 27, 2020
@addaleax addaleax added the semver-major PRs that contain breaking changes and should be released in the next major version. label Feb 28, 2020
@BridgeAR
Copy link
Member

BridgeAR commented Mar 9, 2020

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.

If I'm reading this correctly is completely removes the ability to pass in the multiple arguments and changes the API. We can't do it like this. While the createInterface(input, output, completer, terminal) signature does not appear to be documented, it works and has not been deprecated. It would need to go through a proper runtime deprecation cycle before we can remove it.

@rexagod
Copy link
Member Author

rexagod commented Mar 11, 2020 via email

@addaleax
Copy link
Member

@rexagod For runtime-deprecating something, you can look at usages of util.deprecate() in the JS source tree – basically, something that prints a deprecation warning is considered runtime-deprecated.

We could pass warnings for multiple param usage of readline in a patch version and implement this change in a major, maybe?

Runtime-deprecating/introducing warnings and removal are all semver-major changes.

And, while I understand that this is frustrating, I would also be -1 on introducing such a warning without a good reason – I don’t consider it being undocumented a good reason, personally.

@rexagod
Copy link
Member Author

rexagod commented Mar 13, 2020

Thank you for the explanation @addaleax! There is however a deprecation (DEP0094) with similar cause to this one, where multiple params were reduced to one, but I guess that was under a different scenario.

Please feel free to close this, or let me know if you have any other plans regarding this issue.

@rexagod
Copy link
Member Author

rexagod commented Apr 22, 2020

Hello, @addaleax @jasnell. I was wondering since this isn't closed yet, are there any plans on deprecating this?

@jasnell
Copy link
Member

jasnell commented Apr 23, 2020

This PR cannot land in it's current state. It should either be changed to a deprecation or closed with a separate PR deprecating first. If you'd like to do that, please do :-)

@rexagod
Copy link
Member Author

rexagod commented Apr 27, 2020

@jasnell The DeprecationWarning is causing 10 repl tests to fail. Running them with --no-deprecation flag seems to fix 3 of them, but for the rest, it seems to interfere with the core logic for what those tests were written for in the first place, and modifying them doesn't seem right.

Is there a way I can pass a --no-deprecation flag for a specific deprecation code?

@rexagod
Copy link
Member Author

rexagod commented May 29, 2020

ping @jasnell

@jasnell
Copy link
Member

jasnell commented May 29, 2020

Is there a way I can pass a --no-deprecation flag for a specific deprecation code?

Not currently

@BridgeAR BridgeAR force-pushed the master branch 2 times, most recently from 8ae28ff to 2935f72 Compare May 31, 2020 12:18
@rexagod
Copy link
Member Author

rexagod commented Jun 20, 2020

Closing this for now. I'm focusing on getting my other not-stalled PRs merged at the moment. Will come back to this later if need be.

@rexagod rexagod closed this Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
readline Issues and PRs related to the built-in readline module. 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.

5 participants