-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
deps: Add node-inspect #10187
deps: Add node-inspect #10187
Conversation
node inspect
to depsnode inspect
to deps
node inspect
to deps
This PR is supposed to start a conversation around both the code itself and how the debugger should be exposed. Notes and references
The rm -rf deps/node-inspect node-inspect-* && curl -sSL "https://github.com/buggerjs/node-inspect/archive/v1.10.4.tar.gz" | tar -xzvf - && mv node-inspect-* deps/node-inspect |
@@ -241,6 +241,9 @@ test-debugger: all | |||
test-inspector: all | |||
$(PYTHON) tools/test.py inspector | |||
|
|||
test-node-inspect: $(NODE_EXE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, there's be a similar job for Windows in vcbuild.bat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, didn't have a Windows machine set up to look into vcbuild.bat
, that's why I only copied tools/test-npm.sh
in the first push. Should be able to work on the Windows part next week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows part is done.
Didn't look too closely yet but this only checks in the files without further integration? That's not very useful by itself so what (and when) is the next step? I agree with Rich that the tests should run on Windows so you should probably turn the shell script into a node script. Ideally, it gets integrated with tools/test.py somehow but I don't quite know how yet. The fact that the test runner copies around files and runs |
Btw, it might be quite helpful for reviewing to put the additions to |
This adds a reimplementation of the old CLI debugger (`node debug`) against the new debugger protocol (`node --inspect`). This is necessary because the old protocol won't be supported in future versions of V8.
This just adds an additional make target (`make test-node-inspect`) but will not include the new debugger in releases.
cdc0e47
to
46ab980
Compare
@addaleax Good point. Split the change into two commits. One for the bulk |
I agree that just enabling the tests is of limited use. It gets us "master doesn't break the CLI debugger" but not "bundle the CLI debugger". The latter would be the next step - and I would say it comes as soon as we agree that the CLI debugger is ready to ship with node. I'm hoping that this PR will surface any blockers for that 2nd step.
Agreed. Honest answer: I just blindly copied whatever was done for the
I believe the idea is to keep P.S.: The fact that it currently runs |
Can tap (the module) produce .tap files? Node's test runner prints tap output to both stdio and a file. The file is then picked up and parsed by the CI. I suppose you could
I don't think |
the tap module can definitely output raw tap... just have to select it as a reporter. It is worth noting we are moving towards junit XML for CI... but we will be able to convert the tap stream to xml in real time with @jbergstroem's tap2xml utility make test-npm is not run in CI. |
But can it run in a tee-like mode? It needs to print to stdio for humans and to a file for machines. |
I looked trough the |
Starting with 1.10.2 the test suite should pass consistently on windows.
@bnoordhuis |
It probably wouldn't be too hard to write a cross platform |
@gibfahn Thanks for that link! I'll see tomorrow morning if I can steal that code for |
Got it, should've subscribed to that other PR. It looked stalled so I wasn't sure if we can count on it landing soon. I assume that |
Include the relevant files from `deps/node-inspect` in the compiled `node` binary and make `node inspect` work like `node-inspect`. PR-URL: #10187 Reviewed-By: James M Snell <jasnell@gmail.com>
I’ve gone ahead and landed this in b1fc774...fd18b65. Thanks for the PR, @jkrems! 🎉 |
Squashed from: - deps: Add node-inspect 1.10.1 This adds a reimplementation of the old CLI debugger (`node debug`) against the new debugger protocol (`node --inspect`). This is necessary because the old protocol won't be supported in future versions of V8. - deps: Update node-inspect to 1.10.2 Starting with 1.10.2 the test suite should pass consistently on windows. - deps: Update to node-inspect 1.10.4 PR-URL: #10187 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This just adds an additional make target (`make test-node-inspect`) but will not include the new debugger in releases. PR-URL: #10187 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Include the relevant files from `deps/node-inspect` in the compiled `node` binary and make `node inspect` work like `node-inspect`. PR-URL: #10187 Reviewed-By: James M Snell <jasnell@gmail.com>
Thank you @addaleax @jkrems and everyone who's worked on bringing this in! Great to see it landed and primed to land in 7.6.0 (#11185 (comment)). I think we now need to decide if/how/when to deprecate or change behavior of
Also to be sure we're on the same page, I think we expect updates to "upstream" nodejs/node-inspect to be manually integrated into nodejs/node occasionally via a PR, as we do with npm currently (e.g. #11020). |
👍
Was there a decision on this? IIRC 5.8 was the release that would potentially break the older debug protocol and there was uncertainty about pulling it into node 8.x or not. Anyhow - I would say the alias should, if at all possible, happen before we're forced to drop the old debugger. That way we have some cycles to make additional changes (like the |
Squashed from: - deps: Add node-inspect 1.10.1 This adds a reimplementation of the old CLI debugger (`node debug`) against the new debugger protocol (`node --inspect`). This is necessary because the old protocol won't be supported in future versions of V8. - deps: Update node-inspect to 1.10.2 Starting with 1.10.2 the test suite should pass consistently on windows. - deps: Update to node-inspect 1.10.4 PR-URL: nodejs#10187 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This just adds an additional make target (`make test-node-inspect`) but will not include the new debugger in releases. PR-URL: nodejs#10187 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Include the relevant files from `deps/node-inspect` in the compiled `node` binary and make `node inspect` work like `node-inspect`. PR-URL: nodejs#10187 Reviewed-By: James M Snell <jasnell@gmail.com>
Notable changes: * deps: * update V8 to 5.5 (Michaël Zasso) [#11029](#11029) * upgrade libuv to 1.11.0 (cjihrig) [#11094](#11094) * add node-inspect 1.10.2 (Jan Krems) [#10187](#10187) * lib: build `node inspect` into `node` (Anna Henningsen) [#10187](#10187) * crypto: Remove expired certs from CNNIC whitelist (Shigeki Ohtsu) [#9469](#9469) * inspector: add --inspect-brk (Josh Gavant) [#11149](#11149) * fs: allow WHATWG URL and file: URLs as paths (James M Snell) [#10739](#10739) * src: support UTF-8 in compiled-in JS source files (Ben Noordhuis) [#11129](#11129) * url: extend url.format to support WHATWG URL (James M Snell) [#10857](#10857) PR-URL: #11185
Notable changes: * deps: * update V8 to 5.5 (Michaël Zasso) [nodejs#11029](nodejs#11029) * upgrade libuv to 1.11.0 (cjihrig) [nodejs#11094](nodejs#11094) * add node-inspect 1.10.4 (Jan Krems) [nodejs#10187](nodejs#10187) * upgrade zlib to 1.2.11 (Sam Roberts) [nodejs#10980](nodejs#10980) * lib: build `node inspect` into `node` (Anna Henningsen) [nodejs#10187](nodejs#10187) * crypto: Remove expired certs from CNNIC whitelist (Shigeki Ohtsu) [nodejs#9469](nodejs#9469) * inspector: add --inspect-brk (Josh Gavant) [nodejs#11149](nodejs#11149) * fs: allow WHATWG URL objects as paths (James M Snell) [nodejs#10739](nodejs#10739) * src: support UTF-8 in compiled-in JS source files (Ben Noordhuis) [nodejs#11129](nodejs#11129) * url: extend url.format to support WHATWG URL (James M Snell) [nodejs#10857](nodejs#10857) PR-URL: nodejs#11185
Notable changes: * deps: * update V8 to 5.5 (Michaël Zasso) [nodejs#11029](nodejs#11029) * upgrade libuv to 1.11.0 (cjihrig) [nodejs#11094](nodejs#11094) * add node-inspect 1.10.4 (Jan Krems) [nodejs#10187](nodejs#10187) * upgrade zlib to 1.2.11 (Sam Roberts) [nodejs#10980](nodejs#10980) * lib: build `node inspect` into `node` (Anna Henningsen) [nodejs#10187](nodejs#10187) * crypto: Remove expired certs from CNNIC whitelist (Shigeki Ohtsu) [nodejs#9469](nodejs#9469) * inspector: add --inspect-brk (Josh Gavant) [nodejs#11149](nodejs#11149) * fs: allow WHATWG URL objects as paths (James M Snell) [nodejs#10739](nodejs#10739) * src: support UTF-8 in compiled-in JS source files (Ben Noordhuis) [nodejs#11129](nodejs#11129) * url: extend url.format to support WHATWG URL (James M Snell) [nodejs#10857](nodejs#10857) PR-URL: nodejs#11185
Notable changes: * deps: * update V8 to 5.5 (Michaël Zasso) [#11029](nodejs/node#11029) * upgrade libuv to 1.11.0 (cjihrig) [#11094](nodejs/node#11094) * add node-inspect 1.10.4 (Jan Krems) [#10187](nodejs/node#10187) * upgrade zlib to 1.2.11 (Sam Roberts) [#10980](nodejs/node#10980) * lib: build `node inspect` into `node` (Anna Henningsen) [#10187](nodejs/node#10187) * crypto: Remove expired certs from CNNIC whitelist (Shigeki Ohtsu) [#9469](nodejs/node#9469) * inspector: add --inspect-brk (Josh Gavant) [#11149](nodejs/node#11149) * fs: allow WHATWG URL objects as paths (James M Snell) [#10739](nodejs/node#10739) * src: support UTF-8 in compiled-in JS source files (Ben Noordhuis) [#11129](nodejs/node#11129) * url: extend url.format to support WHATWG URL (James M Snell) [#10857](nodejs/node#10857) PR-URL: nodejs/node#11185 Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
we've opted to not land this on v6.x due to the the inspect being provided being an older version. It could prove difficult to keep this up to date. Please let me know if we should reconsider |
👍 People on 6.x already have a working bundled CLI debugger & if they really want |
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
deps
Description of change
This adds a reimplementation of the old CLI debugger (
node debug
)against the new debugger protocol (
node --inspect
). This is necessarybecause the old protocol won't be supported in future versions of V8.
This just adds an additional make target (
make test-node-inspect
) butwill not include the new debugger in releases.
Fixes #7266