Skip to content

src: rename process._inspectorEnbale#13460

Merged
cjihrig merged 1 commit into
nodejs:masterfrom
cjihrig:typo
Jun 6, 2017
Merged

src: rename process._inspectorEnbale#13460
cjihrig merged 1 commit into
nodejs:masterfrom
cjihrig:typo

Conversation

@cjihrig

@cjihrig cjihrig commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

This seems like a typo. This commit changes the property to process._inspectorEnable.

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

src

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Jun 5, 2017

@refack refack left a comment

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.

🤦‍♂️ at least it so new nobody's used it yet

@refack

refack commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

Any reason not to fast track this?
/cc @nodejs/diagnostics @jasnell

@refack

refack commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

@cjihrig Thanks for finding this 🎁

@cjihrig

cjihrig commented Jun 5, 2017

Copy link
Copy Markdown
Contributor Author

Heh, I didn't exactly find it. #9659 (comment)

Comment thread src/node.cc Outdated

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.

maybe _inspectorEnabled is better?

@refack

refack commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

So @mutantcornholio the 🏆 goes to you.

@mscdex

mscdex commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

Can we add a test for this?

@mscdex mscdex added inspector Issues and PRs related to the V8 inspector protocol process Issues and PRs related to the process subsystem. labels Jun 5, 2017
@refack

refack commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

Can we add a test for this?

I'll do a new PR first thing tomorrow. But IMHO lack of testing should not block this.

@mcollina

mcollina commented Jun 5, 2017

Copy link
Copy Markdown
Member

@cjihrig there is a typo on the commit message and the title of the PR.

@lucamaraschi

Copy link
Copy Markdown
Contributor

@mcollina I think that was the fix of this PR ;-)

@mcollina

mcollina commented Jun 5, 2017

Copy link
Copy Markdown
Member

oooh, that was not clear.

@cjihrig

cjihrig commented Jun 5, 2017

Copy link
Copy Markdown
Contributor Author

Updated to _inspectorEnabled as @refack suggested. CI: https://ci.nodejs.org/job/node-test-pull-request/8481/

@refack

refack commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

I say land after 24 hours (in 10 hours 02:00 UTC) unless anyone objects
/cc @nodejs/collaborators

@sam-github

Copy link
Copy Markdown
Contributor

I thought it might be just for our internal use, to communicate from C++ init to later js, but we have no references to this property anywhere other than its definition. So, must be for external users? If so, isn't this semver-major?

@mutantcornholio

Copy link
Copy Markdown
Contributor

Well, first internal use will be here (after this PR gets merged): #9659 (comment)

@refack

refack commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

I thought it might be just for our internal use, to communicate from C++ init to later js, but we have no references to this property anywhere other than its definition. So, must be for external users? If so, isn't this semver-major?

It's brand new (16689e3), and AFAIK never used. Was a bit of future proofing.
@cjihrig worth adding Ref: https://github.com/nodejs/node/pull/12949

@sam-github

Copy link
Copy Markdown
Contributor

Alternatively, if the property is unused, maybe it should be deleted, see #13228 (comment) and conversation after.

@refack

refack commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

Alternatively, if the property is unused, maybe it should be deleted, see #13228 (comment) and conversation after.

IMHO it's an interesting property to have Re: #9659 and especially #13228 where inspector could be enabled without a trace in process.argv

@sam-github

Copy link
Copy Markdown
Contributor

Note that #13228 allows checking whether the inspector port is open or not with a documented API (instead of an _ prefixed and undocumented property on process), and is accurate whether the port was opened using --inspect[-brk], SIGUSR1, process._debugBegin(), inspector.open(), and whether it was closed later, then reopened, etc.

@refack

refack commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

Note that #13228 allows checking whether the inspector port is open or not with a documented API (instead of an _ prefixed and undocumented property on process), and is accurate whether the port was opened using --inspect[-brk], SIGUSR1, process._debugBegin(), inspector.open(), and whether it was closed later, then reopened, etc.

Then kill it (either in #13228 or here if you land #13228)

@cjihrig

cjihrig commented Jun 5, 2017

Copy link
Copy Markdown
Contributor Author

I'm fine with removing it here. That still leaves the semver question though.

@refack

refack commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

That still leaves the semver question though.

It's an _XX property, {enumerable: false}, undocumented, and has been in existence for < 10 days. IMHO it clearly falls within the definition of "internal". I call semver-patch.
But if the plan is to kill it, I retract the call to fast-track.

@sam-github

Copy link
Copy Markdown
Contributor

I think the policy would be to deprecate process._inspectorEnbale (note spelling) in 9.x, and delete it in 10.x. But @refack makes a compelling argument in #13460 (comment), and the CTC can do the right thing by agreement even if its not the official policy, though I think they have to formally agree that disregarding stability policy is the right thing to do here. @cjihrig would understand best the options here.

@gibfahn

gibfahn commented Jun 5, 2017

Copy link
Copy Markdown
Member

I think the policy would be to deprecate process._inspectorEnbale (note spelling) in 9.x, and delete it in 10.x.

AIUI the formal policy is that underscore properties are not subject to semver (although the CTC makes exceptions for things that people use).

@jasnell

jasnell commented Jun 5, 2017

Copy link
Copy Markdown
Member

Given that this is (a) new and (b) and obvious mistake, it's worth fixing as a semver-patch.

@jasnell jasnell left a comment

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.

This should not need to wait the 48 hours to land

@Trott

Trott commented Jun 5, 2017

Copy link
Copy Markdown
Member

Adding my voice to "If this requires CTC-approval to be treated as semver-patch, please record my approval".

@cjihrig

cjihrig commented Jun 5, 2017

Copy link
Copy Markdown
Contributor Author

Just to clarify, are we talking about landing this as is, or removing the property?

@Trott

Trott commented Jun 5, 2017

Copy link
Copy Markdown
Member

@cjihrig I meant either renaming or removing. I'm fine with treating either as semver-patch in this specific instance.

@cjihrig

cjihrig commented Jun 6, 2017

Copy link
Copy Markdown
Contributor Author

CI to remove the property: https://ci.nodejs.org/job/node-test-pull-request/8497/

This commit removes process._inspectorEnbale which was
spelled incorrectly, and is being properly implemented
in a separate PR.

Refs: nodejs#12949
PR-URL: nodejs#13460
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luca Maraschi <luca.maraschi@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@cjihrig cjihrig merged commit df5d8e0 into nodejs:master Jun 6, 2017
@cjihrig cjihrig deleted the typo branch June 6, 2017 02:18
@refack

refack commented Jun 6, 2017

Copy link
Copy Markdown
Contributor

🎉

jasnell pushed a commit that referenced this pull request Jun 7, 2017
This commit removes process._inspectorEnbale which was
spelled incorrectly, and is being properly implemented
in a separate PR.

Refs: #12949
PR-URL: #13460
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luca Maraschi <luca.maraschi@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@gibfahn gibfahn mentioned this pull request Jun 15, 2017
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. inspector Issues and PRs related to the V8 inspector protocol process Issues and PRs related to the process subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.