GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — inspector: do not depend on v8's inspector_protocol generator by aslushnikov · Pull Request #21975 · nodejs/node

Conversation

@aslushnikov

@aslushnikov aslushnikov commented Jul 25, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

inspector_protocol is designed in a way that every instance of the generated code needs to own its copy of the inspector_protocol harness. For example, chromium code has 2 instances, one in v8 and one in chromium itself.

The reason is that otherwise incremental changes to the inspector_protocol need to happen in the interdependent projects simultaneously, which is infeasible due to the roll process.

This patch fixes the issue introduced by the Tracing agent's misuse of the v8's private protocol generator harness and establishes a direct dependency to the harness for the Node's agents.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@aslushnikov

aslushnikov commented Jul 25, 2018

Copy link
Copy Markdown
Contributor Author

@ak239 can you guys please take a look?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax

addaleax commented Jul 25, 2018

Copy link
Copy Markdown
Member

@aslushnikov Can you update the commit message to follow the guidelines?

/cc @nodejs/v8-inspector

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax

addaleax commented Jul 25, 2018

Copy link
Copy Markdown
Member

Also, since this brings in multiple new directories in deps/ – does this need to come with updates for tools/license-builder.sh?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax addaleax added the inspector Issues and PRs related to the V8 inspector protocol. label Jul 25, 2018
eugeneo
eugeneo approved these changes Jul 25, 2018
View reviewed changes

@eugeneo eugeneo left a comment

Copy link
Copy Markdown
Contributor

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.

+1, but please address the comments raised by @addaleax

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
alexkozy
alexkozy approved these changes Jul 25, 2018
View reviewed changes
@aslushnikov

aslushnikov commented Jul 25, 2018

Copy link
Copy Markdown
Contributor Author

Can you update the commit message to follow the guidelines?

@addaleax I think it's all good now. Please let me know if I'm missing something.

Also, since this brings in multiple new directories in deps/ – does this need to come with updates for tools/license-builder.sh?

I ran the tool, but it just removed seemingly unrelated licenses from the LICENSE file. I wonder if it works as expected.

@eugeneo @ak239 thanks for the review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@refack

refack commented Jul 25, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Hello @aslushnikov and thank you for the contribution!
I think this might not be the optimal way to achieve this. Since V8 carries its own version of inspector_protocol IMHO we need to keep using that.
As for CL 1149321 AFAICT it will not affect node since we trigger inspector_protocol via GYP and have all it's files as dependencies.

node/node.gyp

Lines 1055 to 1079 in 83474ae

'node_protocol_files': [
'<(protocol_path)/lib/Allocator_h.template',
'<(protocol_path)/lib/Array_h.template',
'<(protocol_path)/lib/Collections_h.template',
'<(protocol_path)/lib/DispatcherBase_cpp.template',
'<(protocol_path)/lib/DispatcherBase_h.template',
'<(protocol_path)/lib/ErrorSupport_cpp.template',
'<(protocol_path)/lib/ErrorSupport_h.template',
'<(protocol_path)/lib/Forward_h.template',
'<(protocol_path)/lib/FrontendChannel_h.template',
'<(protocol_path)/lib/Maybe_h.template',
'<(protocol_path)/lib/Object_cpp.template',
'<(protocol_path)/lib/Object_h.template',
'<(protocol_path)/lib/Parser_cpp.template',
'<(protocol_path)/lib/Parser_h.template',
'<(protocol_path)/lib/Protocol_cpp.template',
'<(protocol_path)/lib/ValueConversions_h.template',
'<(protocol_path)/lib/Values_cpp.template',
'<(protocol_path)/lib/Values_h.template',
'<(protocol_path)/templates/Exported_h.template',
'<(protocol_path)/templates/Imported_h.template',
'<(protocol_path)/templates/TypeBuilder_cpp.template',
'<(protocol_path)/templates/TypeBuilder_h.template',
'<(protocol_path)/CodeGenerator.py',
]

I think you can solve the fail on the V8 buildbot by updating the GN that is used to build node, and make sure all the templates are dependencies (or force a rerun on every build).

/CC @nodejs/build-files @nodejs/v8-update

mmarchini reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@refack refack added build Issues and PRs related to Node.js builds or CI infrastructure. v8 engine Issues and PRs related to the V8 dependency. tools Issues and PRs related to the tools directory. labels Jul 25, 2018
@addaleax

addaleax commented Jul 25, 2018

Copy link
Copy Markdown
Member

Also, since this brings in multiple new directories in deps/ – does this need to come with updates for tools/license-builder.sh?

I ran the tool, but it just removed seemingly unrelated licenses from the LICENSE file. I wonder if it works as expected.

@nodejs/collaborators I’m not sure who’d be best pinged for this question, so, sorry to bother all of you.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alexkozy

alexkozy commented Jul 25, 2018

Copy link
Copy Markdown
Member

@refack,
I believe that we need separate copy of inspector_protocol. We can consider example Chromium as another example of V8 embedder. We introduced separate copy there a long time ago and it allows us to make changes inside inspector_protocol much easier.
Imagine that we would like to make some inspector_protocol change. We first landed it into inspector_protocol repository. As next step we can separately rolled it for all protocol users with all required changes. Without separate copy we need to roll change into V8 in a manner that would not break node.js usage so most likely we need 3 steps every time: roll to V8 some intermediate protocol state, roll V8 to node, migrate node to new version, implement final solution for protocol, roll to V8, roll V8 to node. With separate copy we can just land new feature to inspector_protocol and then roll it to V8 and node by two patches without non trivial intermediate step.

addaleax and aslushnikov reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@refack

refack commented Jul 25, 2018

Copy link
Copy Markdown
Contributor

Let's separate two concerns.

  1. The codegen tool
  2. The templates

There should be only one instance of the tool in the code base.
As for the templates, if the changes are incompatible, won't they break the code?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eugeneo

eugeneo commented Jul 25, 2018

Copy link
Copy Markdown
Contributor

@refack divergent templates will not break the code. Node Inspector calls into V8 inspector through the stable API and does not directly interact with the code generated with those templates.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aslushnikov

aslushnikov commented Jul 25, 2018

Copy link
Copy Markdown
Contributor Author

cc @hashseed

there's also more context about this in v8#76.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented Jul 25, 2018

Copy link
Copy Markdown
Member

@aslushnikov So, currently the license-builder.sh file is slightly broken in that it includes entries for three things that don't ship with our source code and therefore don't need to be included. But you can ignore those errors. I've opened a PR to fix it. (#21979)

What needs to happen in this PR is an entry needs to be added for the dependency or dependencies added here, and then the script should be run and the license file updated as part of the PR.

Hope that helps!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@refack

refack commented Jul 25, 2018

Copy link
Copy Markdown
Contributor

@refack divergent templates will not break the code. Node Inspector calls into V8 inspector through the stable API and does not directly interact with the code generated with those templates.

@eugeneo So what does break and why?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

refack
refack previously requested changes Jul 25, 2018
View reviewed changes

@refack refack left a comment

Copy link
Copy Markdown
Contributor

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.

This should not land as a dep it should be in tools.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aslushnikov aslushnikov changed the title inspector: bring inspector_protocol as a direct dependency inspector: do not depend on v8's inspector_protocol generator Jul 25, 2018
@aslushnikov

aslushnikov commented Jul 25, 2018

Copy link
Copy Markdown
Contributor Author

@refack I updated the description; hopefully it now does a better job explaining what's going on.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eugeneo

eugeneo commented Jul 26, 2018

Copy link
Copy Markdown
Contributor

@refack I believe this PR is trying to address Node build breaking when V8 moves to a newer version of the inspector_protocol generator. There is no reason to require them to use same generator and templates.

@aslushnikov I am unable to build it locally even with a clean build:
make[1]: *** No rule to make target '../deps/v8/src/debug/mirrors.js', needed by '/usr/local/google/home/eostroukhov/Development/node/out/Release/obj/gen/libraries.cc'. Stop.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aslushnikov

aslushnikov commented Jul 26, 2018

Copy link
Copy Markdown
Contributor Author

What needs to happen in this PR is an entry needs to be added for the dependency or dependencies added here, and then the script should be run and the license file updated as part of the PR.

@Trott thanks, I see what's going on. Once your PR lands, I'll rebaseline atop; I included your changes here meanwhile.

This should not land as a dep it should be in tools.

@refack done.

@aslushnikov I am unable to build it locally even with a clean build:
make[1]: *** No rule to make target '../deps/v8/src/debug/mirrors.js', needed by '/usr/local/google/home/eostroukhov/Development/node/out/Release/obj/gen/libraries.cc'. Stop.

@eugeneo that's right; I was compiling against v8/node instead of nodejs/node. I updated the PR to include an older version of the generators that is currently used in the node.js.

eugeneo reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hashseed

hashseed commented Jul 26, 2018

Copy link
Copy Markdown
Member

Haven't reviewed yet, but I'm generally +1 on this.

I've recently been bitten by this when a new inspector_protocol rolled into V8. I scrambled to update V8/node to make sure our CI for Node.js didn't break. Decoupling Node.js from V8 in this regard makes sense.

Consider this the same as with ICU.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eugeneo

eugeneo commented Jul 26, 2018

Copy link
Copy Markdown
Contributor

The fix works for me, I can now build locally and "make tests' passes! 👍

aslushnikov reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ofrobots

ofrobots commented Jul 28, 2018

Copy link
Copy Markdown
Contributor

@refack, your concern about deps/ vs. tools/ directory has been addressed. Can you dismiss your request for changes?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alexkozy

alexkozy commented Aug 5, 2018

Copy link
Copy Markdown
Member

This PR is blocking us from rolling new inspector_protocol version to V8.
@refack could you please take a look and dismiss your request for changes or describe what additional changes are required?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented Aug 5, 2018

Copy link
Copy Markdown
Member

The other license-builder PR has landed so this one can be rebased. We'll need a CI run once that happens.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aslushnikov
Bring in inspector_protocol as a direct dependency
1ece530
Currently, node.js depends on [inspector_protocol](https://www.google.com/url?q=https://chromium.googlesource.com/deps/inspector_protocol/) indirectly through the dependency on v8.

This is a dependency violation that will make it hard to roll V8 into
Node if V8 gets a newer inspector protocol version with incompatible
API. In fact, this surfaced on one of our bots when we tried to roll new
inspector_protocol into V8: [upstream patch](https://chromium-review.googlesource.com/c/v8/v8/+/1149321).

This patch adds inspector protocol and its required dependencies to node
deps:
- jinja2
- markupsafe
@aslushnikov
aslushnikov force-pushed the node-fix-deps-violation branch from d98e288 to 1ece530 Compare August 6, 2018 20:27
@addaleax

addaleax commented Aug 9, 2018

Copy link
Copy Markdown
Member

I agree, @refack’s change request seems to have been addressed.

(That being said, I was surprised by it, I can’t find an explanation for it in this thread and, quite frankly, I disagree with it – dependencies that influence directly what goes into the node binary should be in deps/, imho. I didn’t want to make any fuzz about it and I’m fine with opening a PR to move it back myself after this lands.)

ofrobots reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alexkozy

alexkozy commented Aug 10, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

CI once again, failures on existing one looks unrelated: https://ci.nodejs.org/job/node-test-pull-request/16326/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented Aug 10, 2018

Copy link
Copy Markdown
Member

Resume Build: https://ci.nodejs.org/job/node-test-pull-request/16329/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alexkozy

alexkozy commented Aug 10, 2018

Copy link
Copy Markdown
Member

It looks like latest CI finished successfully. I will merge this PR later today.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alexkozy
alexkozy dismissed refack’s stale review August 11, 2018 00:54

Based on development process, I can see that requested changes have been made and can dismiss request changes in this case.

@alexkozy

alexkozy commented Aug 11, 2018

Copy link
Copy Markdown
Member

Landed in e039524

aslushnikov reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

alexkozy pushed a commit that referenced this pull request Aug 11, 2018
@aslushnikov @alexkozy
inspector: add inspector_protocol as a direct dependency
e039524
Currently, node.js depends on inspector_protocol indirectly through the
dependency on v8.

This is a dependency violation that will make it hard to roll V8 into
Node if V8 gets a newer inspector protocol version with incompatible
API. In fact, this surfaced on one of our bots when we tried to roll new
inspector_protocol into V8.

This patch adds inspector protocol and its required dependencies to node
deps:
- jinja2
- markupsafe

PR-URL: #21975
Reviewed-By: Eugene Ostroukhov <[email protected]>
Reviewed-By: Aleksei Koziatinskii <[email protected]>
@alexkozy alexkozy closed this Aug 11, 2018
targos pushed a commit that referenced this pull request Aug 11, 2018
@aslushnikov @targos
inspector: add inspector_protocol as a direct dependency
c96e552
Currently, node.js depends on inspector_protocol indirectly through the
dependency on v8.

This is a dependency violation that will make it hard to roll V8 into
Node if V8 gets a newer inspector protocol version with incompatible
API. In fact, this surfaced on one of our bots when we tried to roll new
inspector_protocol into V8.

This patch adds inspector protocol and its required dependencies to node
deps:
- jinja2
- markupsafe

PR-URL: #21975
Reviewed-By: Eugene Ostroukhov <[email protected]>
Reviewed-By: Aleksei Koziatinskii <[email protected]>
@rvagg rvagg mentioned this pull request Aug 13, 2018
Release proposal: v10.9.0 #22295
Merged
@aslushnikov aslushnikov mentioned this pull request Aug 13, 2018
inspector: bring in inspector_protocol as a direct dependency v8/node#76
Closed
1 of 4 tasks
This was referenced Aug 16, 2018
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#230
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#215
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#231
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#216
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#232
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#217
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#233
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#218
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#234
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#219
Closed
hashseed pushed a commit to v8/node that referenced this pull request Aug 17, 2018
@aslushnikov @hashseed
inspector: add inspector_protocol as a direct dependency
f17cb95
Currently, node.js depends on inspector_protocol indirectly through the
dependency on v8.

This is a dependency violation that will make it hard to roll V8 into
Node if V8 gets a newer inspector protocol version with incompatible
API. In fact, this surfaced on one of our bots when we tried to roll new
inspector_protocol into V8.

This patch adds inspector protocol and its required dependencies to node
deps:
- jinja2
- markupsafe

PR-URL: nodejs#21975
Reviewed-By: Eugene Ostroukhov <[email protected]>
Reviewed-By: Aleksei Koziatinskii <[email protected]>
@refack refack mentioned this pull request Aug 17, 2018
tools: remove gyp from tools directory #22343
Closed
2 tasks done
addaleax added a commit to addaleax/node that referenced this pull request Aug 20, 2018
@addaleax
deps: move inspector_protocol to deps
b661b5f
Dependencies that influence directly what goes into the `node` binary
should be in `deps/`.

Refs: nodejs#21975 (comment)
@addaleax addaleax mentioned this pull request Aug 20, 2018
deps: move inspector_protocol to deps #22411
Closed
2 tasks done
@refack refack mentioned this pull request Sep 4, 2018
deps: update V8 to 6.9 #21983
Closed
@ravishivt ravishivt mentioned this pull request Sep 28, 2018
Inspect - sources aren't visible in Node v10.9.0 #23152
Closed
@kapouer kapouer mentioned this pull request Sep 30, 2018
multiple copies of markupsafe, jinja2, inspector_protocol #23171
Closed
firass111 pushed a commit to firass111/Project_node1 that referenced this pull request Apr 16, 2025
@aslushnikov @rvagg
inspector: add inspector_protocol as a direct dependency
3989869
Currently, node.js depends on inspector_protocol indirectly through the
dependency on v8.

This is a dependency violation that will make it hard to roll V8 into
Node if V8 gets a newer inspector protocol version with incompatible
API. In fact, this surfaced on one of our bots when we tried to roll new
inspector_protocol into V8.

This patch adds inspector protocol and its required dependencies to node
deps:
- jinja2
- markupsafe

PR-URL: nodejs/node#21975
Reviewed-By: Eugene Ostroukhov <[email protected]>
Reviewed-By: Aleksei Koziatinskii <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

3 more reviewers
@eugeneo eugeneo eugeneo approved these changes
@alexkozy alexkozy alexkozy approved these changes
@refack refack refack left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

build Issues and PRs related to Node.js builds or CI infrastructure. inspector Issues and PRs related to the V8 inspector protocol. tools Issues and PRs related to the tools directory. v8 engine Issues and PRs related to the V8 dependency.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@aslushnikov @addaleax @refack @alexkozy @eugeneo @Trott @hashseed @ofrobots
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.