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

src: use executable + pid as inspector context id #17087

Merged
merged 2 commits into from
Nov 20, 2017

Conversation

bnoordhuis
Copy link
Member

@bnoordhuis bnoordhuis commented Nov 17, 2017

Report (for example) "node[1337]" as the human-readable name rather
than the more generic and less helpful "Node.js Main Context."

While not perfect yet, it should be an improvement to people that
debug multiple processes from DevTools, VS Code, etc.

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

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Nov 17, 2017
@targos
Copy link
Member

targos commented Nov 20, 2017

is this the context id that I'm looking for in #16591?

@bnoordhuis
Copy link
Member Author

@targos Probably not. This PR just changes the context's human-readable name in the UI.

@bnoordhuis
Copy link
Member Author

Copy link
Member

@TimothyGu TimothyGu left a comment

Choose a reason for hiding this comment

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

Commit message nit: "as inspector context name" to reduce confusion

@bnoordhuis
Copy link
Member Author

bnoordhuis commented Nov 20, 2017

Minor tweak for Windows: https://ci.nodejs.org/job/node-test-pull-request/11559/

@TimothyGu Yep, I'll include that if I can fit it in <= 50 columns. (Don't say anything about relaxing that rule, I can't hear you with my hands over my ears.)

edit: again with smartos fixup: https://ci.nodejs.org/job/node-test-pull-request/11563/

There are a few places where we paper over the fact that getpid() is
called GetCurrentProcessId() on Windows.  Let's move it into a function.

PR-URL: nodejs#17087
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Report (for example) "node[1337]" as the human-readable name rather
than the more generic and less helpful "Node.js Main Context."

While not perfect yet, it should be an improvement to people that
debug multiple processes from DevTools, VS Code, etc.

PR-URL: nodejs#17087
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
@bnoordhuis bnoordhuis closed this Nov 20, 2017
@bnoordhuis bnoordhuis deleted the better-inspector-context-name branch November 20, 2017 22:39
@bnoordhuis bnoordhuis merged commit f526deb into nodejs:master Nov 20, 2017
@addaleax addaleax added the inspector Issues and PRs related to the V8 inspector protocol label Nov 28, 2017
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
There are a few places where we paper over the fact that getpid() is
called GetCurrentProcessId() on Windows.  Let's move it into a function.

PR-URL: #17087
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
Report (for example) "node[1337]" as the human-readable name rather
than the more generic and less helpful "Node.js Main Context."

While not perfect yet, it should be an improvement to people that
debug multiple processes from DevTools, VS Code, etc.

PR-URL: #17087
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 12, 2017
@MylesBorins
Copy link
Contributor

This does not land cleany on v6.x, should we manually backport?

As an aside, when landing PRs with multiple commits can you please add a comment specifying which commits landed. It is hard to tell from the merge info which commits to include

gibfahn pushed a commit that referenced this pull request Dec 19, 2017
There are a few places where we paper over the fact that getpid() is
called GetCurrentProcessId() on Windows.  Let's move it into a function.

PR-URL: #17087
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
gibfahn pushed a commit that referenced this pull request Dec 19, 2017
Report (for example) "node[1337]" as the human-readable name rather
than the more generic and less helpful "Node.js Main Context."

While not perfect yet, it should be an improvement to people that
debug multiple processes from DevTools, VS Code, etc.

PR-URL: #17087
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
@gibfahn
Copy link
Member

gibfahn commented Dec 19, 2017

Landed in 7dc35e9 and f526deb on master

@bnoordhuis
Copy link
Member Author

This does not land cleany on v6.x, should we manually backport?

No, the relevant inspector API doesn't exist in v6.x. I'll update the labels.

As an aside, when landing PRs with multiple commits can you please add a comment specifying which commits landed. It is hard to tell from the merge info which commits to include

What merge info are you referring to? I thought you were using the GH API to back-port pull requests. You can get the parent commit from the base/sha field in https://api.github.com/repos/nodejs/node/pulls/17087.

@gibfahn gibfahn mentioned this pull request Dec 20, 2017
gibfahn pushed a commit that referenced this pull request Dec 20, 2017
There are a few places where we paper over the fact that getpid() is
called GetCurrentProcessId() on Windows.  Let's move it into a function.

PR-URL: #17087
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
gibfahn pushed a commit that referenced this pull request Dec 20, 2017
Report (for example) "node[1337]" as the human-readable name rather
than the more generic and less helpful "Node.js Main Context."

While not perfect yet, it should be an improvement to people that
debug multiple processes from DevTools, VS Code, etc.

PR-URL: #17087
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
@gibfahn gibfahn mentioned this pull request Dec 20, 2017
@gibfahn
Copy link
Member

gibfahn commented Dec 20, 2017

What merge info are you referring to? I thought you were using the GH API to back-port pull requests. You can get the parent commit from the base/sha field in api.github.com/repos/nodejs/node/pulls/17087.

We use the GH API to generate the list of pull requests to triage, we backport with git cherry-pick sha1 sha2 sha3, so having a

Landed in 7dc35e9 f526deb

Is the easiest to copy-paste from. The Collaborator guide requires it when you merge multiple commits, or when you close without merging:

Close the pull request with a "Landed in " comment. If your pull request shows the purple merged status then you should still add the "Landed in .." comment if you added multiple commits.

https://github.com/nodejs/node/blob/master/COLLABORATOR_GUIDE.md#technical-howto

Basically if you wanted to make backporters' lives easier, you'd always put landed in sha, even if it was just a single commit and GitHub shows that it was merged.

@bnoordhuis
Copy link
Member Author

We use the GH API to generate the list of pull requests to triage, we backport with git cherry-pick sha1 sha2 sha3

Then can I suggest you start using the base/sha field to get the merge base? Less margin for error and it's less labor all around. We're programmers, we automate all the things, right?

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 lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants