Skip to content

tools: update inspector_protocol - #26154

Closed
targos wants to merge 1 commit into
nodejs:masterfrom
targos:inspector-protocol
Closed

tools: update inspector_protocol#26154
targos wants to merge 1 commit into
nodejs:masterfrom
targos:inspector-protocol

Conversation

@targos

Copy link
Copy Markdown
Member

This is still WIP. I'm opening a PR early so I don't forget about it.

Fixes: #25808

/cc @cclauss

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Feb 16, 2019
@targos

Copy link
Copy Markdown
MemberAuthor

I'm blocked here:

LD_LIBRARY_PATH=/home/mzasso/git/nodejs/node/out/Release/lib.host:/home/mzasso/git/nodejs/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; mkdir -p /home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol; python tools/inspector_protocol/code_generator.py --jinja_dir tools/inspector_protocol/.. --output_base "/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/" --config "/home/mzasso/git/nodejs/node/out/Release/obj/gen/node_protocol_config.json"
g++ -o /home/mzasso/git/nodejs/node/out/Release/obj.target/node_lib/src/inspector_agent.o ../src/inspector_agent.cc '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-DOPENSSL_THREADS' '-DNODE_ARCH="x64"' '-DNODE_PLATFORM="linux"' '-DNODE_WANT_INTERNALS=1' '-DV8_DEPRECATION_WARNINGS=1' '-DNODE_OPENSSL_SYSTEM_CERT_PATH=""' '-DHAVE_INSPECTOR=1' '-DNODE_REPORT' '-D__POSIX__' '-DNODE_USE_V8_PLATFORM=1' '-DNODE_HAVE_I18N_SUPPORT=1' '-DNODE_HAVE_SMALL_ICU=1' '-DHAVE_OPENSSL=1' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' '-DHTTP_PARSER_STRICT=0' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_POSIX_C_SOURCE=200112' '-DNGHTTP2_STATICLIB' -I../src -I/home/mzasso/git/nodejs/node/out/Release/obj/gen -I/home/mzasso/git/nodejs/node/out/Release/obj/gen/include -I/home/mzasso/git/nodejs/node/out/Release/obj/gen/src -I../deps/v8/include -I../deps/icu-small/source/i18n -I../deps/icu-small/source/common -I../deps/zlib -I../deps/http_parser -I../deps/llhttp/include -I../deps/cares/include -I../deps/uv/include -I../deps/nghttp2/lib/includes -I../deps/brotli/c/include -I../deps/openssl/openssl/include -pthread -Wall -Wextra -Wno-unused-parameter -m64 -Wall -Wextra -Wno-unused-parameter -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++1y -MMD -MF /home/mzasso/git/nodejs/node/out/Release/.deps//home/mzasso/git/nodejs/node/out/Release/obj.target/node_lib/src/inspector_agent.o.d.raw -c
In file included from /home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:10,
from /home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/NodeTracing.h:10,
from ../src/inspector/tracing_agent.h:4,
from ../src/inspector_agent.cc:5:
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Forward.h:85:5: error: ‘ProtocolMessage’ does not name a type
ProtocolMessage serialize(bool binary) {
^~~~~~~~~~~~~~~
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Forward.h:101:70: error: ‘ProtocolMessage’ does not name a type
virtual void fallThrough(int callId, const String& method, const ProtocolMessage& message) = 0;
^~~~~~~~~~~~~~~
In file included from /home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/NodeTracing.h:10,
from ../src/inspector/tracing_agent.h:4,
from ../src/inspector_agent.cc:5:
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:95:27: error: ‘Binary’ has not been declared
virtual bool asBinary(Binary* output) const;
^~~~~~
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:177:54: error: ‘Binary’ does not name a type
static std::unique_ptr<BinaryValue> create(const Binary& value)
^~~~~~
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:182:19: error: ‘Binary’ has not been declared
bool asBinary(Binary* output) const override;
^~~~~~
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:188:32: error: ‘Binary’ does not name a type
explicit BinaryValue(const Binary& value) : Value(TypeBinary), m_binaryValue(value) { }
^~~~~~
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:190:5: error: ‘Binary’ does not name a type
Binary m_binaryValue;
^~~~~~
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h: In constructor ‘node::inspector::protocol::BinaryValue::BinaryValue(const int&)’:
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:188:68: error: class ‘node::inspector::protocol::BinaryValue’ does not have any field named ‘m_binaryValue’
explicit BinaryValue(const Binary& value) : Value(TypeBinary), m_binaryValue(value) { }
^~~~~~~~~~~~~
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h: At global scope:
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:471:25: error: ‘Binary’ was not declared in this scope
struct ValueConversions<Binary> {
^~~~~~
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:471:31: error: template argument 1 is invalid
struct ValueConversions<Binary> {
^
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:690:13: error: ‘Binary’ was not declared in this scope
class Maybe<Binary> : public MaybeBase<Binary> {
^~~~~~
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:690:19: error: template argument 1 is invalid
class Maybe<Binary> : public MaybeBase<Binary> {
^
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:690:40: error: ‘Binary’ was not declared in this scope
class Maybe<Binary> : public MaybeBase<Binary> {
^~~~~~
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:690:46: error: template argument 1 is invalid
class Maybe<Binary> : public MaybeBase<Binary> {
^
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:920:96: error: ‘ProtocolMessage’ does not name a type
Callback(std::unique_ptr<WeakPtr> backendImpl, int callId, const String& method, const ProtocolMessage& message);
^~~~~~~~~~~~~~~
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:932:9: error: ‘ProtocolMessage’ does not name a type
ProtocolMessage m_message;
^~~~~~~~~~~~~~~
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:939:67: error: ‘ProtocolMessage’ does not name a type
virtual void dispatch(int callId, const String& method, const ProtocolMessage& rawMessage, std::unique_ptr<protocol::DictionaryValue> messageObject) = 0;
^~~~~~~~~~~~~~~
In file included from /home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/NodeTracing.h:10,
from ../src/inspector/tracing_agent.h:4,
from ../src/inspector_agent.cc:5:
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:963:91: error: ‘ProtocolMessage’ does not name a type
void dispatch(int callId, const String& method, std::unique_ptr<Value> message, const ProtocolMessage& rawMessage);
^~~~~~~~~~~~~~~
../src/inspector_agent.cc: In member function ‘std::__cxx11::string node::inspector::{anonymous}::ChannelImpl::dispatchProtocolMessage(const v8_inspector::StringView&)’:
../src/inspector_agent.cc:235:23: error: ‘class node::inspector::protocol::UberDispatcher’ has no member named ‘getCommandName’
node_dispatcher_->getCommandName(
^~~~~~~~~~~~~~
../src/inspector_agent.cc:241:51: error: no matching function for call to ‘node::inspector::protocol::UberDispatcher::dispatch(std::remove_reference<std::unique_ptr<node::inspector::protocol::DictionaryValue>&>::type)’
node_dispatcher_->dispatch(std::move(parsed));
^
In file included from /home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/NodeTracing.h:10,
from ../src/inspector/tracing_agent.h:4,
from ../src/inspector_agent.cc:5:
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:963:10: note: candidate: ‘void node::inspector::protocol::UberDispatcher::dispatch(int, const String&, std::unique_ptr<node::inspector::protocol::Value>, const int&)’
void dispatch(int callId, const String& method, std::unique_ptr<Value> message, const ProtocolMessage& rawMessage);
^~~~~~~~
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:963:10: note: candidate expects 4 arguments, 1 provided
../src/inspector_agent.cc: In member function ‘virtual void node::inspector::{anonymous}::ChannelImpl::sendProtocolResponse(int, std::unique_ptr<node::inspector::protocol::Serializable>)’:
../src/inspector_agent.cc:281:36: error: ‘class node::inspector::protocol::Serializable’ has no member named ‘serialize’; did you mean ‘Serializable’?
sendMessageToFrontend(message->serialize());
^~~~~~~~~
Serializable
../src/inspector_agent.cc: In member function ‘virtual void node::inspector::{anonymous}::ChannelImpl::sendProtocolNotification(std::unique_ptr<node::inspector::protocol::Serializable>)’:
../src/inspector_agent.cc:285:36: error: ‘class node::inspector::protocol::Serializable’ has no member named ‘serialize’; did you mean ‘Serializable’?
sendMessageToFrontend(message->serialize());
^~~~~~~~~
Serializable
In file included from /usr/include/c++/8/memory:80,
from ../src/inspector_agent.h:6,
from ../src/inspector_agent.cc:1:
/usr/include/c++/8/bits/unique_ptr.h: In instantiation of ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = node::inspector::{anonymous}::ChannelImpl; _Args = {node::Environment*&, std::unique_ptr<v8_inspector::V8Inspector, std::default_delete<v8_inspector::V8Inspector> >&, std::shared_ptr<node::inspector::WorkerManager>, std::unique_ptr<node::inspector::InspectorSessionDelegate, std::default_delete<node::inspector::InspectorSessionDelegate> >, bool&}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr<node::inspector::{anonymous}::ChannelImpl>]’:
../src/inspector_agent.cc:472:76: required from here
/usr/include/c++/8/bits/unique_ptr.h:831:30: error: invalid new-expression of abstract class type ‘node::inspector::{anonymous}::ChannelImpl’
{ return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/inspector_agent.cc:207:7: note: because the following virtual functions are pure within ‘node::inspector::{anonymous}::ChannelImpl’:
class ChannelImpl final : public v8_inspector::V8Inspector::Channel,
^~~~~~~~~~~
In file included from /home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Protocol.h:10,
from /home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/NodeTracing.h:10,
from ../src/inspector/tracing_agent.h:4,
from ../src/inspector_agent.cc:5:
/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/node/inspector/protocol/Forward.h:101:18: note: ‘virtual void node::inspector::protocol::FrontendChannel::fallThrough(int, const String&, const int&)’
virtual void fallThrough(int callId, const String& method, const ProtocolMessage& message) = 0;
^~~~~~~~~~~
make[1]: *** [node_lib.target.mk:340: /home/mzasso/git/nodejs/node/out/Release/obj.target/node_lib/src/inspector_agent.o] Error 1
rm edccdf53db835bef9587f095647b3f87a1d24e1e.intermediate 589d5813039707f9192dc1d215286b2fe3935efc.intermediate 5769651a82c50c8a3bbfba6d0e18edf1b2841196.intermediate d2d6e5ad72d735d8f0d004f3242977282a7306dc.intermediate
make: *** [Makefile:100: node] Error 2

/cc @nodejs/v8-inspector

@pavelfeldman

Copy link
Copy Markdown
Contributor

It was too many little things to update as a part of this change, so I created my own pr: #26303 for the reference.

@targostargos closed this Mar 4, 2019
@targos
targos deleted the inspector-protocol branch March 4, 2019 12:42
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.lib / srcIssues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@targos@nodejs-github-bot@pavelfeldman