Skip to content

deps,debugger: move node-inspect into core - #38161

Merged
Trott merged 12 commits into
nodejs:masterfrom
Trott:node-inspect
Apr 25, 2021
Merged

deps,debugger: move node-inspect into core#38161
Trott merged 12 commits into
nodejs:masterfrom
Trott:node-inspect

Conversation

@Trott

@TrottTrott commented Apr 9, 2021

Copy link
Copy Markdown
Member

Refs: https://github.com/nodejs/node/discussions/36481

I named a lot of files/directories with inspector-cli and I suspect inspect-cli or debugger-cli (or just debugger or inspect) would have all been better?

Still some ESLint checks to re-enable in three files, but assuming tests pass everywhere, I think this is good enough to land and things can be adjusted with subsequent PRs.

Because I was porting over the tests, this found and fixed a small bug with node inspect in Node.js 15.x. Specifically, calling scripts would always include internal scripts, even with scripts(false). (Wouldn't mind reconsidering that API as that first argument is a boolean trap. But OMG not when first landing this thing.)

Also there are some changes that landed in the node-inspect repo but never made it into a release. Those changes will need to be ported over. But that's the next PR. (Or maybe the lint fixes would be the next one.)

@nodejs-github-botnodejs-github-bot added build Issues and PRs related to build files or the CI. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. labels Apr 9, 2021
@TrottTrott changed the title Node inspectdeps,debugger: move node-inspect into coreApr 9, 2021
@TrottTrott added the notable-change PRs with changes that should be highlighted in changelogs. label Apr 9, 2021
@Trott
Trott requested a review from hybristApril 9, 2021 07:06
@Trott

Trott commented Apr 9, 2021

Copy link
Copy Markdown
MemberAuthor

@nodejs/diagnostics

@Trott

Trott commented Apr 9, 2021

Copy link
Copy Markdown
MemberAuthor

(Easier to review, I think, if you look at each commit separately.)

@mcollinamcollina 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.

lgtm

@hybristhybrist 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.

Thanks so much for working on this!

@Trott
Trottforce-pushed the node-inspect branch 2 times, most recently from 267e87c to 1069e36CompareApril 10, 2021 05:13
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@Trott

Copy link
Copy Markdown
MemberAuthor

Anyone know what the right thing to do with this failing test on sharedlibs_openssl300 might be?

https://ci.nodejs.org/job/node-test-commit-linux-containered/26443/nodes=ubuntu1804_sharedlibs_openssl300_x64/testReport/junit/(root)/test/inspector_cli_test_inspector_cli_auto_resume/

/home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/node: error while loading shared libraries: libcrypto.so.3: cannot open shared object file: No such file or directory

@danbev

@Trott

Copy link
Copy Markdown
MemberAuthor

Getting a lot of ECONNRESET on Windows and wondering how I might make the tests more robust.

https://ci.nodejs.org/job/node-test-binary-windows-js-suites/9309/#showFailuresLink

@nodejs/platform-windows

@nodejs-github-bot

This comment has been minimized.

@richardlau

Copy link
Copy Markdown
Member

Anyone know what the right thing to do with this failing test on sharedlibs_openssl300 might be?

https://ci.nodejs.org/job/node-test-commit-linux-containered/26443/nodes=ubuntu1804_sharedlibs_openssl300_x64/testReport/junit/(root)/test/inspector_cli_test_inspector_cli_auto_resume/

/home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/node: error while loading shared libraries: libcrypto.so.3: cannot open shared object file: No such file or directory

@Trott The test needs to pass on the environment when it spawns a child node process — specifically on Linux LD_LIBRARY_PATH needs to be passed on (other operating systems use different but equivalent variables that would need to be passed on if node is dynamically linked to a non-system shared library).

@nodejs-github-bot

This comment has been minimized.

@Trott

Trott commented Apr 11, 2021

Copy link
Copy Markdown
MemberAuthor

The failed tests in CI on Windows looks (superficially at least) like maybe it's #37224. Might be a significant legitimate bug seen in node-inspect + Node.js 15 + WIndows. Any ideas about how to best fix?

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@Trott

Copy link
Copy Markdown
MemberAuthor

CI is green, and I think this is ready to land, but a lot has changed since it's last review, so a review, or a re-review, or a rubber-stamp LGTM would be great. Anyone?

Comment threadlib/internal/inspector/_inspect.js Outdated
Comment threadlib/internal/inspector/inspect_client.js Outdated
Comment threadlib/internal/inspector/inspect_repl.js Outdated
Trott added 12 commits April 25, 2021 01:49
node-inspect developers have agreed to move node-inspect into core
rather than vendor it as a dependency.
Refs: https://github.com/nodejs/node/discussions/36481
PR-URL: nodejs#38161
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: nodejs#38161
Refs: https://github.com/nodejs/node/discussions/36481
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Remove code that was for when `node-inspect` was called as a standalone
process.
PR-URL: nodejs#38161
Refs: https://github.com/nodejs/node/discussions/36481
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Fixes: nodejs#37224
PR-URL: nodejs#38161
Refs: https://github.com/nodejs/node/discussions/36481
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: nodejs#38161
Refs: https://github.com/nodejs/node/discussions/36481
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Make five attempts with a timeout of 1 second each rather than 10
attempts with a timeout of 500ms each. This is to allow for
slower-connecting devices like Raspberry Pi.
PR-URL: nodejs#38161
Refs: https://github.com/nodejs/node/discussions/36481
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
The test was assuming that the entire string being sought would arrive
in a single data chunk, but it can be split across multiple chunks.
PR-URL: nodejs#38161
Refs: https://github.com/nodejs/node/discussions/36481
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Migrate the node-inspect tests to core (where node-inspect code now
lives) and remove node-inspect from deps directory.
PR-URL: nodejs#38161
Refs: https://github.com/nodejs/node/discussions/36481
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Change process.binding() use to internalBinding().
PR-URL: nodejs#38161
Refs: https://github.com/nodejs/node/discussions/36481
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: nodejs#38161
Refs: https://github.com/nodejs/node/discussions/36481
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: nodejs#38161
Refs: https://github.com/nodejs/node/discussions/36481
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: nodejs#38161
Refs: https://github.com/nodejs/node/discussions/36481
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@Trott

Copy link
Copy Markdown
MemberAuthor

Landed in dfc00ea...2a70f4f

@targos

Copy link
Copy Markdown
Member

Is this really a notable change for users? What should I write in the changelog/blog post about it ?

@Trott

Trott commented May 3, 2021

Copy link
Copy Markdown
MemberAuthor

Is this really a notable change for users? What should I write in the changelog/blog post about it ?

You can leave it off the notable changes and remove the label.

@Trott

Trott commented May 3, 2021

Copy link
Copy Markdown
MemberAuthor

In fact, I just removed the label myself.

@targostargos mentioned this pull request May 3, 2021
@targos

Copy link
Copy Markdown
Member

Do you want to backport this to v14.x-staging?

@Trott

Copy link
Copy Markdown
MemberAuthor

Do you want to backport this to v14.x-staging?

No, I don't want to. But yes, I guess I should. #38858

I didn't compile or run tests locally but there was only one merge conflict that was straightforward to resolve, so I think it should work.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buildIssues and PRs related to build files or the CI.metaIssues and PRs related to the general management of the project.needs-ciPRs that need a full CI run.toolsIssues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@Trott@nodejs-github-bot@richardlau@targos@hybrist@mcollina@Qard@cjihrig@Flarna