Skip to content

repl: deprecate unused function convertToContext - #7829

Closed
princejwesley wants to merge 5 commits into
nodejs:masterfrom
princejwesley:repl.cleanup
Closed

repl: deprecate unused function convertToContext#7829
princejwesley wants to merge 5 commits into
nodejs:masterfrom
princejwesley:repl.cleanup

Conversation

@princejwesley

Copy link
Copy Markdown
Contributor
Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

repl

Description of change

Remove unused function convertToContext

@nodejs-github-botnodejs-github-bot added the repl Issues and PRs related to the REPL subsystem. label Jul 21, 2016
@addaleaxaddaleax added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jul 21, 2016
@thefourtheye

Copy link
Copy Markdown
Contributor

cc @ChALkeR Can you please search for this function in the npm modules?

@addaleax

Copy link
Copy Markdown
Member

Good idea, LGTM if nothing too relevant comes up (I’d be surprised if it did, this code is unused since 2010).

CI: https://ci.nodejs.org/job/node-test-commit/4216/

@Trott

Trott commented Jul 21, 2016

Copy link
Copy Markdown
Member

LGTM. Probably worth a CITGM run too, just to flush out anything obvious early on:

https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/341/

Hopefully I did that correctly....

EDIT: CITGM isn't working because of a breaking change on master. If #7846 lands, it will revert the commit that caused the regression and we can try CITGM again then.

@cjihrig

Copy link
Copy Markdown
Contributor

LGTM if it's not in use.

@Fishrock123

Copy link
Copy Markdown
Contributor

Is this supposed to be a user API?

@princejwesley

Copy link
Copy Markdown
ContributorAuthor

@Fishrock123 No.

History

@ChALkeR

ChALkeR commented Jul 24, 2016

Copy link
Copy Markdown
Member

@thefourtheye Does not seem to be used anywhere (based on the old data from 2016-01-28, new data will be ready a bit later). As always, I checked only @latest versions.

@jasnell

Copy link
Copy Markdown
Member

Even tho this doesn't appear to be used, I would still recommend (and would be more comfortable with) a proper deprecation cycle before removing outright.

@thefourtheye

Copy link
Copy Markdown
Contributor

Considering my recent attempts with fs, I am inclined to go with @jasnell's comment.

@princejwesley

Copy link
Copy Markdown
ContributorAuthor

... a proper deprecation cycle before removing outright

@jasnell Using util#deprecation ?

@jasnell

Copy link
Copy Markdown
Member

We have two methods: soft deprecation (docs only) or util.deprecation. We
should likely start with soft deprecation in v7.

On Tuesday, July 26, 2016, Prince John Wesley notifications@github.com
wrote:

... a proper deprecation cycle before removing outright

@jasnellhttps://github.com/jasnell Using util#deprecation
https://nodejs.org/api/util.html#util_util_deprecate_function_string ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#7829 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAa2eTYlUF2uNPYwwtRiIyKQjNzB5ED2ks5qZjG8gaJpZM4JSSl3
.

@princejwesley

Copy link
Copy Markdown
ContributorAuthor

@jasnell FYI, convertToContext method is not currently documented in repl.md.

@addaleax

Copy link
Copy Markdown
Member

Yeah, soft deprecation isn’t really applicable here, and util.deprecate seems like the way to go.

@princejwesley

Copy link
Copy Markdown
ContributorAuthor

@addaleax@jasnell We need a clean up/todo label for v8.x. Do we have one?

@thefourtheye

Copy link
Copy Markdown
Contributor

@princejwesley Just a leave a to-do like this TODO(princejwesley): followed by the note.

Comment threadlib/repl.js Outdated

return cmd;
};
}, 'replServer.convertToContext will be removed in v8.0.0');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

use "after", that represents a range, instead of the precise word "in" would be better?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@yorkieremoved after v7 ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Exactly what I mean :-) @princejwesley

@princejwesleyprincejwesley changed the title repl: remove unused function convertToContextrepl: deprecate unused function convertToContextJul 28, 2016
@yorkie

Copy link
Copy Markdown
Contributor

LGTM

@addaleax

Copy link
Copy Markdown
Member

Comment threadlib/repl.js Outdated

return cmd;
};
}, 'replServer.convertToContext will be removed after v7');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Our deprecation messages typically take a form like, 'replServer.convertToContext() is deprecated', without committing to a specific version when it may be removed. The message should also indicate if there is an alternative that the developer should use.

@yorkie

yorkie commented Jul 28, 2016

Copy link
Copy Markdown
Contributor

Oops, it might need a test case, though.

@jasnell

Copy link
Copy Markdown
Member

@nodejs/ctc
LGTM

@princejwesley

Copy link
Copy Markdown
ContributorAuthor

@yorkie

Copy link
Copy Markdown
Contributor

LGTM if CI is green :-)

@jasnell

Copy link
Copy Markdown
Member

@nodejs/ctc ... putting out a last call for comments on this. If there are no objections to adding this deprecation I will land tomorrow.

jasnell pushed a commit that referenced this pull request Aug 4, 2016
PR-URL: #7829
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell

Copy link
Copy Markdown
Member

Ok, it took longer than a day but landed in 488d28d! :-)

@refack

Copy link
Copy Markdown
Contributor

Just found this. Can we remove it?

@gibfahngibfahn mentioned this pull request Jun 15, 2017
3 tasks
@tniessentniessen added the deprecations Issues and PRs related to deprecations. label Sep 7, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecationsIssues and PRs related to deprecations.replIssues and PRs related to the REPL subsystem.semver-majorPRs 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.

12 participants

@princejwesley@thefourtheye@addaleax@Trott@cjihrig@Fishrock123@ChALkeR@jasnell@yorkie@refack@tniessen@nodejs-github-bot