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

build: allow using alternate inspector_protocol path #57116

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions node.gni
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ declare_args() {
# The location of simdutf - use the one from node's deps by default.
node_simdutf_path = "$node_path/deps/simdutf"

# The location of inspector_protocol - use the one from node's deps by default.
node_inspector_protocol_path = "$node_path/deps/inspector_protocol"

# The NODE_MODULE_VERSION defined in node_version.h.
node_module_version = exec_script("$node_path/tools/getmoduleversion.py", [], "value")

Expand Down
2 changes: 1 addition & 1 deletion src/inspector/unofficial.gni
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ template("inspector_gn_build") {
}

node_gen_dir = get_label_info("../..", "target_gen_dir")
protocol_tool_path = "../../deps/inspector_protocol"
protocol_tool_path = "$node_inspector_protocol_path"

gypi_values = exec_script(
"../../tools/gypi_to_gn.py",
Expand Down
3 changes: 2 additions & 1 deletion unofficial.gni
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ template("node_gn_build") {
}
if (node_enable_inspector) {
deps += [
"src/inspector:crdtp",
"$node_inspector_protocol_path:crdtp",
Copy link
Contributor

Choose a reason for hiding this comment

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

The crdtp target in inspector_protocol can not be built with Node.js (it has dependency on Chromium's things).

The ideal fix would be removing the dependency on Chromium in the upstream inspector_protocol, pulling it in Node, and then updating here.

"src/inspector:node_protocol_generated_sources",
"src/inspector:v8_inspector_compress_protocol_json",
]
Expand Down Expand Up @@ -382,6 +382,7 @@ template("node_gn_build") {
include_dirs = [
"$target_gen_dir/src",
"$target_gen_dir/src/inspector",
"$node_inspector_protocol_path",
]
} else {
sources -= gypi_values.node_cctest_inspector_sources
Expand Down
Loading