Skip to content

Commit

Permalink
deps: move inspector_protocol to deps
Browse files Browse the repository at this point in the history
The `crdtp` library in the inspector_protocol is compiled as a library
and linked to the node executable.

PR-URL: #56649
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
  • Loading branch information
legendecas authored and nodejs-github-bot committed Jan 26, 2025
1 parent 744c2f5 commit 0aa5874
Show file tree
Hide file tree
Showing 75 changed files with 84 additions and 4,799 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2098,7 +2098,7 @@ The externally maintained libraries used by Node.js are:
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

- inspector_protocol, located at tools/inspector_protocol, is licensed as follows:
- inspector_protocol, located at deps/inspector_protocol, is licensed as follows:
"""
// Copyright 2016 The Chromium Authors. All rights reserved.
//
Expand Down
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions deps/inspector_protocol/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Chromium inspector (devtools) protocol

This package contains code generators and templates for the Chromium
inspector protocol.

The canonical location of this package is at
https://chromium.googlesource.com/deps/inspector_protocol/

In the Chromium tree, it's rolled into
https://cs.chromium.org/chromium/src/third_party/inspector_protocol/

In the V8 tree, it's rolled into
https://cs.chromium.org/chromium/src/v8/third_party/inspector_protocol/

See also [Contributing to Chrome Devtools Protocol](https://docs.google.com/document/d/1c-COD2kaK__5iMM5SEx-PzNA7HFmgttcYfOHHX0HaOM/edit).

To build and run the tests of the crdtp library, see
[CRDTP - Chrome DevTools Protocol](crdtp/README.md).
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
43 changes: 43 additions & 0 deletions deps/inspector_protocol/inspector_protocol.gyp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
'variables': {
'crdtp_sources': [
'crdtp/cbor.cc',
'crdtp/cbor.h',
'crdtp/dispatch.cc',
'crdtp/dispatch.h',
'crdtp/error_support.cc',
'crdtp/error_support.h',
'crdtp/export.h',
'crdtp/find_by_first.h',
'crdtp/frontend_channel.h',
'crdtp/json.cc',
'crdtp/json.h',
'crdtp/json_platform.cc',
'crdtp/json_platform.h',
'crdtp/maybe.h',
'crdtp/parser_handler.h',
'crdtp/protocol_core.cc',
'crdtp/protocol_core.h',
'crdtp/serializable.cc',
'crdtp/serializable.h',
'crdtp/span.cc',
'crdtp/span.h',
'crdtp/status.cc',
'crdtp/status.h',
]
},
'targets': [
{
'target_name': 'crdtp',
'type': 'static_library',
'include_dirs': [ '.' ],
'direct_dependent_settings': {
# Use like `#include "crdtp/json.h"`
'include_dirs': [ '.' ],
},
'sources': [
'<@(crdtp_sources)',
],
},
]
}
File renamed without changes.
41 changes: 10 additions & 31 deletions src/inspector/node_inspector.gypi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
'variables': {
'protocol_tool_path': '../../tools/inspector_protocol',
'protocol_tool_path': '../../deps/inspector_protocol',
'jinja_dir': '../../tools/inspector_protocol',
'node_inspector_sources': [
'src/inspector_agent.cc',
'src/inspector_io.cc',
Expand Down Expand Up @@ -31,30 +32,6 @@
'src/inspector/network_agent.h',
'src/inspector/worker_inspector.cc',
'src/inspector/worker_inspector.h',

'<(protocol_tool_path)/crdtp/cbor.cc',
'<(protocol_tool_path)/crdtp/cbor.h',
'<(protocol_tool_path)/crdtp/dispatch.cc',
'<(protocol_tool_path)/crdtp/dispatch.h',
'<(protocol_tool_path)/crdtp/error_support.cc',
'<(protocol_tool_path)/crdtp/error_support.h',
'<(protocol_tool_path)/crdtp/export.h',
'<(protocol_tool_path)/crdtp/find_by_first.h',
'<(protocol_tool_path)/crdtp/frontend_channel.h',
'<(protocol_tool_path)/crdtp/json.cc',
'<(protocol_tool_path)/crdtp/json.h',
'<(protocol_tool_path)/crdtp/json_platform.cc',
'<(protocol_tool_path)/crdtp/json_platform.h',
'<(protocol_tool_path)/crdtp/maybe.h',
'<(protocol_tool_path)/crdtp/parser_handler.h',
'<(protocol_tool_path)/crdtp/protocol_core.cc',
'<(protocol_tool_path)/crdtp/protocol_core.h',
'<(protocol_tool_path)/crdtp/serializable.cc',
'<(protocol_tool_path)/crdtp/serializable.h',
'<(protocol_tool_path)/crdtp/span.cc',
'<(protocol_tool_path)/crdtp/span.h',
'<(protocol_tool_path)/crdtp/status.cc',
'<(protocol_tool_path)/crdtp/status.h',
],
'node_inspector_generated_sources': [
'<(SHARED_INTERMEDIATE_DIR)/src/node/inspector/protocol/Forward.h',
Expand Down Expand Up @@ -91,11 +68,13 @@
'<@(node_inspector_sources)',
],
'include_dirs': [
'<(protocol_tool_path)',
'<(SHARED_INTERMEDIATE_DIR)/include', # for inspector
'<(SHARED_INTERMEDIATE_DIR)',
'<(SHARED_INTERMEDIATE_DIR)/src', # for inspector
],
'dependencies': [
'<(protocol_tool_path)/inspector_protocol.gyp:crdtp',
],
'actions': [
{
'action_name': 'convert_node_protocol_to_json',
Expand All @@ -107,7 +86,7 @@
],
'action': [
'<(python)',
'tools/inspector_protocol/convert_protocol_to_json.py',
'<(protocol_tool_path)/convert_protocol_to_json.py',
'<@(_inputs)',
'<@(_outputs)',
],
Expand All @@ -126,9 +105,9 @@
'process_outputs_as_sources': 1,
'action': [
'<(python)',
'tools/inspector_protocol/code_generator.py',
'--inspector_protocol_dir', 'tools/inspector_protocol/',
'--jinja_dir', '<@(protocol_tool_path)',
'<(protocol_tool_path)/code_generator.py',
'--inspector_protocol_dir', '<(protocol_tool_path)',
'--jinja_dir', '<(jinja_dir)',
'--output_base', '<(SHARED_INTERMEDIATE_DIR)/src/',
'--config', 'src/inspector/node_protocol_config.json',
],
Expand All @@ -145,7 +124,7 @@
],
'action': [
'<(python)',
'tools/inspector_protocol/concatenate_protocols.py',
'<(protocol_tool_path)/concatenate_protocols.py',
'<@(_inputs)',
'<@(_outputs)',
],
Expand Down
36 changes: 0 additions & 36 deletions tools/inspector_protocol/.clang-format

This file was deleted.

8 changes: 0 additions & 8 deletions tools/inspector_protocol/OWNERS

This file was deleted.

18 changes: 3 additions & 15 deletions tools/inspector_protocol/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
# Chromium inspector (devtools) protocol

This package contains code generators and templates for the Chromium
inspector protocol.
This directory contains scripts to update the [Chromium inspector protocol][]
to local at `deps/inspector_protocol`.

The canonical location of this package is at
https://chromium.googlesource.com/deps/inspector_protocol/

In the Chromium tree, it's rolled into
https://cs.chromium.org/chromium/src/third_party/inspector_protocol/

In the V8 tree, it's rolled into
https://cs.chromium.org/chromium/src/v8/third_party/inspector_protocol/

See also [Contributing to Chrome Devtools Protocol](https://docs.google.com/document/d/1c-COD2kaK__5iMM5SEx-PzNA7HFmgttcYfOHHX0HaOM/edit).

To build and run the tests of the crdtp library, see
[CRDTP - Chrome DevTools Protocol](crdtp/README.md).
[Chromium inspector protocol]: https://chromium.googlesource.com/deps/inspector_protocol/
6 changes: 0 additions & 6 deletions tools/inspector_protocol/codereview.settings

This file was deleted.

Loading

0 comments on commit 0aa5874

Please sign in to comment.