LCP: Fix up LCP warnings

Reviewers: mtomic, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D2090
This commit is contained in:
Lovro Lugovic 2019-05-08 17:17:38 +02:00
parent 18698ac7e6
commit 59af45f94e
17 changed files with 114 additions and 110 deletions

View File

@ -16,18 +16,18 @@ cpp<#
(lcp:define-rpc create-bfs-subcursor
(:request
((tx-id "tx::TransactionId")
(direction "query::EdgeAtom::Direction")
((tx-id "::tx::TransactionId")
(direction "::query::EdgeAtom::Direction")
(edge-types "std::vector<storage::EdgeType>")
(filter-lambda "query::plan::ExpansionLambda"
(filter-lambda "::query::plan::ExpansionLambda"
:slk-load (lambda (member)
#>cpp
slk::Load(&self->${member}, reader, ast_storage);
cpp<#))
(symbol-table "query::SymbolTable")
(symbol-table "::query::SymbolTable")
(timestamp :int64_t)
(parameters "query::Parameters"))
(:serialize (:slk :load-args '((ast-storage "query::AstStorage *")))))
(parameters "::query::Parameters"))
(:serialize (:slk :load-args '((ast-storage "::query::AstStorage *")))))
(:response ((member :int64_t))))
(lcp:define-rpc register-subcursors
@ -67,20 +67,20 @@ cpp<#
}
cpp<#)))
(:serialize (:slk :save-args '((worker-id :int16_t))
:load-args '((dba "database::GraphDbAccessor *")
(data-manager "distributed::DataManager *"))))))
:load-args '((dba "::database::GraphDbAccessor *")
(data-manager "::distributed::DataManager *"))))))
(lcp:define-rpc set-source
(:request
((subcursor-id :int64_t)
(source "storage::VertexAddress")))
(source "::storage::VertexAddress")))
(:response ()))
(lcp:define-rpc expand-to-remote-vertex
(:request
((subcursor-id :int64_t)
(edge "storage::EdgeAddress")
(vertex "storage::VertexAddress")))
(edge "::storage::EdgeAddress")
(vertex "::storage::VertexAddress")))
(:response ((member :bool))))
(lcp:define-rpc reconstruct-path

View File

@ -27,7 +27,7 @@ cpp<#
(lcp:define-rpc cluster-discovery
(:request
((worker-id :int16_t)
(endpoint "io::network::Endpoint")))
(endpoint "::io::network::Endpoint")))
(:response ()))
(lcp:define-rpc stop-worker

View File

@ -15,8 +15,8 @@ cpp<#
(lcp:namespace distributed)
(lcp:define-struct tx-gid-pair ()
((tx-id "tx::TransactionId")
(gid "gid::Gid")
((tx-id "::tx::TransactionId")
(gid "::gid::Gid")
(from-worker-id :int64_t))
(:serialize (:slk)))
@ -86,6 +86,7 @@ cpp<#
cpp<#)
:slk-load
(lambda (member)
(declare (ignore member))
#>cpp
bool has_ptr;
slk::Load(&has_ptr, reader);
@ -105,6 +106,7 @@ cpp<#
cpp<#)
:slk-load
(lambda (member)
(declare (ignore member))
#>cpp
bool has_ptr;
slk::Load(&has_ptr, reader);
@ -117,7 +119,7 @@ cpp<#
(edge-new-output "std::unique_ptr<Edge>" :initarg nil :dont-save t))))
(lcp:define-rpc vertex-count
(:request ((member "tx::TransactionId")))
(:request ((member "::tx::TransactionId")))
(:response ((member :int64_t))))
(lcp:pop-namespace) ;; distributed

View File

@ -10,11 +10,11 @@ cpp<#
(lcp:namespace distributed)
(lcp:define-rpc make-snapshot
(:request ((member "tx::TransactionId")))
(:request ((member "::tx::TransactionId")))
(:response ((member :bool))))
(lcp:define-rpc recover-wal-and-indexes
(:request ((member "durability::RecoveryData")))
(:request ((member "::durability::RecoveryData")))
(:response ()))
(lcp:pop-namespace) ;; distributed

View File

@ -14,15 +14,15 @@ cpp<#
(lcp:define-rpc populate-index
(:request
((label "storage::Label")
(property "storage::Property")
(tx-id "tx::TransactionId")))
((label "::storage::Label")
(property "::storage::Property")
(tx-id "::tx::TransactionId")))
(:response ()))
(lcp:define-rpc create-index
(:request
((label "storage::Label")
(property "storage::Property")))
((label "::storage::Label")
(property "::storage::Property")))
(:response ()))
(lcp:pop-namespace) ;; distributed

View File

@ -35,8 +35,8 @@ cpp<#
(plan "std::shared_ptr<query::plan::LogicalOperator>"
:slk-save #'slk-save-plan
:slk-load #'slk-load-plan)
(symbol-table "query::SymbolTable")
(storage "query::AstStorage" :initarg nil :dont-save t)))
(symbol-table "::query::SymbolTable")
(storage "::query::AstStorage" :initarg nil :dont-save t)))
(:response ()))
(lcp:define-rpc remove-plan

View File

@ -94,7 +94,7 @@ the relevant parts of the response, ready for use."))
"Id of the worker on which the response is created, used for
serializing vertices (converting local to global addresses). Indicates which
of (old, new) records of a graph element should be sent.")
(send-versions "storage::SendVersions" :dont-save t)
(send-versions "::storage::SendVersions" :dont-save t)
;; Temporary caches used between deserialization and post-processing
;; (transfering the ownership of this data to a Cache).
(vertices "std::vector<GraphElementData<Vertex>>" :dont-save t)
@ -116,11 +116,11 @@ frame (potentially embedded in lists/maps) is too error-prone.")
cpp<#
(lcp:define-struct (graph-element-data t-record) ()
((cypher-id :int64_t)
(global-address "storage::Address<mvcc::VersionList<TRecord>>")
(global-address "::storage::Address<mvcc::VersionList<TRecord>>")
(old-record "std::unique_ptr<TRecord>")
(new-record "std::unique_ptr<TRecord>")
(element-in-frame
"query::TypedValue *"
"::query::TypedValue *"
:documentation
"The position in frame is optional. This same structure is used for
deserializing path elements, in which case the vertex/edge in question is not
@ -167,19 +167,19 @@ to the appropriate value. Not used on side that generates the response.")
(lcp:define-rpc pull
(:request
((tx-id "tx::TransactionId")
(tx-snapshot "tx::Snapshot"
((tx-id "::tx::TransactionId")
(tx-snapshot "::tx::Snapshot"
:slk-save #'slk-save-snapshot
:slk-load #'slk-load-snapshot)
(plan-id :int64_t)
(command-id "tx::CommandId")
(command-id "::tx::CommandId")
(timestamp :int64_t)
(parameters "query::Parameters")
(parameters "::query::Parameters")
(symbols "std::vector<query::Symbol>")
(accumulate :bool)
(batch-size :int64_t)
;; Indicates which of (old, new) records of a graph element should be sent.
(send-versions "storage::SendVersions")))
(send-versions "::storage::SendVersions")))
(:response
((data "PullResData" :initarg :move
:slk-load (lambda (m)
@ -194,13 +194,13 @@ to the appropriate value. Not used on side that generates the response.")
(lcp:define-rpc reset-cursor
(:request
((tx-id "tx::TransactionId")
((tx-id "::tx::TransactionId")
(plan-id :int64_t)
(command-id "tx::CommandId")))
(command-id "::tx::CommandId")))
(:response ()))
(lcp:define-rpc transaction-command-advanced
(:request ((member "tx::TransactionId")))
(:request ((member "::tx::TransactionId")))
(:response ()))
(lcp:pop-namespace) ;; distributed

View File

@ -11,7 +11,7 @@ cpp<#
(lcp:define-rpc ran-local-gc
(:request
((local-oldest-active "tx::TransactionId")
((local-oldest-active "::tx::TransactionId")
(worker-id :int16_t)))
(:response ()))

View File

@ -24,22 +24,22 @@ cpp<#
(:serialize))
(lcp:define-rpc update
(:request ((member "database::StateDelta")
(:request ((member "::database::StateDelta")
(worker-id :int64_t)))
(:response ((member "UpdateResult"))))
(lcp:define-rpc update-apply
(:request ((member "tx::TransactionId")))
(:request ((member "::tx::TransactionId")))
(:response ((member "UpdateResult"))))
(lcp:define-struct create-result ()
((result "UpdateResult")
(cypher-id :int64_t :documentation "Only valid if creation was successful.")
(gid "gid::Gid" :documentation "Only valid if creation was successful."))
(gid "::gid::Gid" :documentation "Only valid if creation was successful."))
(:serialize (:slk)))
(lcp:define-struct create-vertex-req-data ()
((tx-id "tx::TransactionId")
((tx-id "::tx::TransactionId")
(labels "std::vector<storage::Label>")
(properties "std::unordered_map<storage::Property, PropertyValue>")
(cypher-id "std::optional<int64_t>"))
@ -51,10 +51,10 @@ cpp<#
(lcp:define-struct create-edge-req-data ()
((worker-id :int64_t)
(from "gid::Gid")
(to "storage::VertexAddress")
(edge-type "storage::EdgeType")
(tx-id "tx::TransactionId")
(from "::gid::Gid")
(to "::storage::VertexAddress")
(edge-type "::storage::EdgeType")
(tx-id "::tx::TransactionId")
(cypher-id "std::optional<int64_t>"))
(:serialize (:slk)))
@ -64,11 +64,11 @@ cpp<#
(lcp:define-struct add-in-edge-req-data ()
((worker-id :int64_t)
(from "storage::VertexAddress")
(edge-address "storage::EdgeAddress")
(to "gid::Gid")
(edge-type "storage::EdgeType")
(tx-id "tx::TransactionId"))
(from "::storage::VertexAddress")
(edge-address "::storage::EdgeAddress")
(to "::gid::Gid")
(edge-type "::storage::EdgeType")
(tx-id "::tx::TransactionId"))
(:serialize (:slk)))
(lcp:define-rpc add-in-edge
@ -77,8 +77,8 @@ cpp<#
(lcp:define-struct remove-vertex-req-data ()
((worker-id :int64_t)
(gid "gid::Gid")
(tx-id "tx::TransactionId")
(gid "::gid::Gid")
(tx-id "::tx::TransactionId")
(check-empty :bool))
(:serialize (:slk)))
@ -88,10 +88,10 @@ cpp<#
(lcp:define-struct remove-edge-data ()
((worker-id :int64_t)
(tx-id "tx::TransactionId")
(edge-id "gid::Gid")
(vertex-from-id "gid::Gid")
(vertex-to-address "storage::VertexAddress"))
(tx-id "::tx::TransactionId")
(edge-id "::gid::Gid")
(vertex-from-id "::gid::Gid")
(vertex-to-address "::storage::VertexAddress"))
(:serialize (:slk)))
(lcp:define-rpc remove-edge
@ -100,9 +100,9 @@ cpp<#
(lcp:define-struct remove-in-edge-data ()
((worker-id :int64_t)
(tx-id "tx::TransactionId")
(vertex "gid::Gid")
(edge-address "storage::EdgeAddress"))
(tx-id "::tx::TransactionId")
(vertex "::gid::Gid")
(edge-address "::storage::EdgeAddress"))
(:serialize (:slk)))
(lcp:define-rpc remove-in-edge
@ -111,7 +111,7 @@ cpp<#
(lcp:define-struct created-info ()
((cypher-id "int64_t")
(gid "gid::Gid"))
(gid "::gid::Gid"))
(:public #>cpp
CreatedInfo(int64_t cypher_id, gid::Gid gid)
: cypher_id(cypher_id), gid(gid) {}
@ -119,7 +119,7 @@ cpp<#
(lcp:define-struct created-vertex-info ()
((cypher-id "int64_t")
(gid "gid::Gid"))
(gid "::gid::Gid"))
(:public #>cpp
CreatedVertexInfo(int64_t cypher_id, gid::Gid gid)
: cypher_id(cypher_id), gid(gid) {}
@ -127,7 +127,7 @@ cpp<#
(lcp:define-struct created-edge-info ()
((cypher-id "int64_t")
(edge-address "storage::EdgeAddress"))
(edge-address "::storage::EdgeAddress"))
(:public #>cpp
CreatedEdgeInfo(int64_t cypher_id, storage::EdgeAddress edge_address)
: cypher_id(cypher_id), edge_address(edge_address) {}

View File

@ -22,24 +22,24 @@ cpp<#
(
;; Members valid for every delta.
(type "Type")
(transaction-id "tx::TransactionId")
(transaction-id "::tx::TransactionId")
;; Members valid only for some deltas, see StateDelta::Type comments above.
;; TODO: when preparing the WAL for distributed, most likely remove Gids and
;; only keep addresses.
(vertex-id "gid::Gid")
(edge-id "gid::Gid")
(vertex-id "::gid::Gid")
(edge-id "::gid::Gid")
(cypher-id :int64_t)
(edge-address "storage::EdgeAddress")
(vertex-from-id "gid::Gid")
(vertex-from-address "storage::VertexAddress")
(vertex-to-id "gid::Gid")
(vertex-to-address "storage::VertexAddress")
(edge-type "storage::EdgeType")
(edge-address "::storage::EdgeAddress")
(vertex-from-id "::gid::Gid")
(vertex-from-address "::storage::VertexAddress")
(vertex-to-id "::gid::Gid")
(vertex-to-address "::storage::VertexAddress")
(edge-type "::storage::EdgeType")
(edge-type-name "std::string")
(property "storage::Property")
(property "::storage::Property")
(property-name "std::string")
(value "PropertyValue" :initval "PropertyValue::Null")
(label "storage::Label")
(label "::storage::Label")
(label-name "std::string")
(check-empty :bool))
(:documentation

View File

@ -25,25 +25,25 @@ cpp<#
(
;; Members valid for every delta.
(type "Type")
(transaction-id "tx::TransactionId")
(transaction-id "::tx::TransactionId")
;; Members valid only for some deltas, see StateDelta::Type comments above.
;; TODO: when preparing the WAL for distributed, most likely remove Gids and
;; only keep addresses.
(vertex-id "gid::Gid")
(edge-id "gid::Gid")
(edge-address "mvcc::VersionList<Edge> *")
(vertex-from-id "gid::Gid")
(vertex-from-address "mvcc::VersionList<Vertex> *")
(vertex-to-id "gid::Gid")
(vertex-to-address "mvcc::VersionList<Vertex> *")
(edge-type "storage::EdgeType")
(vertex-id "::gid::Gid")
(edge-id "::gid::Gid")
(edge-address "::mvcc::VersionList<Edge> *")
(vertex-from-id "::gid::Gid")
(vertex-from-address "::mvcc::VersionList<Vertex> *")
(vertex-to-id "::gid::Gid")
(vertex-to-address "::mvcc::VersionList<Vertex> *")
(edge-type "::storage::EdgeType")
(edge-type-name "std::string")
(property "storage::Property")
(property "::storage::Property")
(property-name "std::string")
(properties "std::vector<storage::Property>")
(property-names "std::vector<std::string>")
(value "PropertyValue" :initval "PropertyValue::Null")
(label "storage::Label")
(label "::storage::Label")
(label-name "std::string")
(check-empty :bool))
(:documentation

View File

@ -25,20 +25,20 @@ cpp<#
(
;; Members valid for every delta.
(type "Type")
(transaction-id "tx::TransactionId")
(transaction-id "::tx::TransactionId")
;; Members valid only for some deltas, see StateDelta::Type comments above.
(vertex-id "gid::Gid")
(edge-id "gid::Gid")
(vertex-from-id "gid::Gid")
(vertex-to-id "gid::Gid")
(edge-type "storage::EdgeType")
(vertex-id "::gid::Gid")
(edge-id "::gid::Gid")
(vertex-from-id "::gid::Gid")
(vertex-to-id "::gid::Gid")
(edge-type "::storage::EdgeType")
(edge-type-name "std::string")
(property "storage::Property")
(property "::storage::Property")
(property-name "std::string")
(properties "std::vector<storage::Property>")
(property-names "std::vector<std::string>")
(value "PropertyValue" :initval "PropertyValue::Null")
(label "storage::Label")
(label "::storage::Label")
(label-name "std::string")
(check-empty :bool))
(:documentation

View File

@ -719,7 +719,7 @@ CPP-TYPE-DECL."
}"))
(undefine-cpp-types)
;; inheritance with :ignore-other-base-classes and :base
(let ((base-class (lcp:define-class base ("utils::TotalOrdering")
(let ((base-class (lcp:define-class base ("::utils::TotalOrdering")
((int-member :int32_t)
(string-member "std::string"))
(:abstractp t)
@ -729,7 +729,7 @@ CPP-TYPE-DECL."
:init-object (lambda (var typename)
(format nil "~A* ~A = GlobalFactory::Create();"
typename var)))))
(child-class (lcp:define-class child (base "utils::TotalOrdering" "utils::TotalOrdering")
(child-class (lcp:define-class child (base "::utils::TotalOrdering" "::utils::TotalOrdering")
((another-int-member :int64_t))
(:clone :ignore-other-base-classes t))))
(is-generated (lcp.clone:clone-function-definition-for-class base-class)

View File

@ -505,9 +505,11 @@ To process the typestring means to:
(typestring-fully-qualified-p typestring))
typestring)
((typestring-qualified-p typestring)
(typestring-warn
"Treating qualified type \"~A\" as the fully qualified type \"::~A\"."
typestring typestring)
(let ((cpp-type (parse-cpp-type-declaration typestring)))
(unless (string= (first (cpp-type-namespace cpp-type)) "std")
(typestring-warn
"Treating qualified type \"~A\" as the fully qualified type \"::~A\"."
typestring typestring)))
(format nil "::~A" typestring))
;; Unqualified.
(t

View File

@ -428,8 +428,8 @@ a preceeding `MATCH`), or multiple nodes (`MATCH ... CREATE` or
(properties "std::vector<std::pair<storage::Property, Expression *>>"
:slk-save #'slk-save-properties
:slk-load #'slk-load-properties)
(edge-type "storage::EdgeType")
(direction "EdgeAtom::Direction" :initval "EdgeAtom::Direction::BOTH"))
(edge-type "::storage::EdgeType")
(direction "::EdgeAtom::Direction" :initval "EdgeAtom::Direction::BOTH"))
(:serialize (:slk :save-args '((helper "query::plan::LogicalOperator::SaveHelper *"))
:load-args '((helper "query::plan::LogicalOperator::SlkLoadHelper *"))))
(:clone :args '((storage "AstStorage *"))))
@ -588,7 +588,7 @@ with a constructor argument.
(:clone))
(lcp:define-class scan-all-by-label (scan-all)
((label "storage::Label" :scope :public))
((label "::storage::Label" :scope :public))
(:documentation
"Behaves like @c ScanAll, but this operator produces only vertices with
given label.
@ -667,8 +667,8 @@ given label.
cpp<#)
(lcp:define-class scan-all-by-label-property-range (scan-all)
((label "storage::Label" :scope :public)
(property "storage::Property" :scope :public)
((label "::storage::Label" :scope :public)
(property "::storage::Property" :scope :public)
(property-name "std::string" :scope :public)
(lower-bound "std::optional<Bound>" :scope :public
:slk-save #'slk-save-optional-bound
@ -720,8 +720,8 @@ property value which is inside a range (inclusive or exlusive).
(:clone))
(lcp:define-class scan-all-by-label-property-value (scan-all)
((label "storage::Label" :scope :public)
(property "storage::Property" :scope :public)
((label "::storage::Label" :scope :public)
(property "::storage::Property" :scope :public)
(property-name "std::string" :scope :public)
(expression "Expression *" :scope :public
:slk-save #'slk-save-ast-pointer
@ -769,7 +769,7 @@ This is where the new node will be stored.")
(edge-symbol "Symbol"
:documentation "Symbol for the edges to be expanded.
This is where a TypedValue containing a list of expanded edges will be stored.")
(direction "EdgeAtom::Direction"
(direction "::EdgeAtom::Direction"
:documentation "EdgeAtom::Direction determining the direction of edge
expansion. The direction is relative to the starting vertex for each expansion.")
(edge-types "std::vector<storage::EdgeType>"
@ -882,7 +882,7 @@ pulled.")
:slk-load #'slk-load-operator-pointer)
(input-symbol "Symbol" :scope :public)
(common "ExpandCommon" :scope :public)
(type "EdgeAtom::Type" :scope :public)
(type "::EdgeAtom::Type" :scope :public)
(is-reverse :bool :scope :public :documentation
"True if the path should be written as expanding from node_symbol to input_symbol.")
(lower-bound "Expression *" :scope :public
@ -1178,7 +1178,7 @@ Has a flag for using DETACH DELETE when deleting vertices.")
((input "std::shared_ptr<LogicalOperator>" :scope :public
:slk-save #'slk-save-operator-pointer
:slk-load #'slk-load-operator-pointer)
(property "storage::Property" :scope :public)
(property "::storage::Property" :scope :public)
(lhs "PropertyLookup *" :scope :public
:slk-save #'slk-save-ast-pointer
:slk-load (slk-load-ast-pointer "PropertyLookup"))
@ -1345,7 +1345,7 @@ It does NOT remove labels that are already set on that Vertex.")
((input "std::shared_ptr<LogicalOperator>" :scope :public
:slk-save #'slk-save-operator-pointer
:slk-load #'slk-load-operator-pointer)
(property "storage::Property" :scope :public)
(property "::storage::Property" :scope :public)
(lhs "PropertyLookup *" :scope :public
:slk-save #'slk-save-ast-pointer
:slk-load (slk-load-ast-pointer "PropertyLookup")))
@ -1591,7 +1591,7 @@ elements are in an undefined state after aggregation.")
(key "Expression *"
:slk-save #'slk-save-ast-pointer
:slk-load (slk-load-ast-pointer "Expression"))
(op "Aggregation::Op")
(op "::Aggregation::Op")
(output-sym "Symbol"))
(:documentation
"An aggregation element, contains:

View File

@ -45,7 +45,7 @@ cpp<#
(:request
((leader-id :uint16_t)
(term :uint64_t)
(snapshot-metadata "raft::SnapshotMetadata")
(snapshot-metadata "::raft::SnapshotMetadata")
(data "std::string")))
(:response
((term :uint64_t))))

View File

@ -53,7 +53,7 @@ cpp<#
(lcp:define-rpc clog-info
(:request ((member "TransactionId")))
(:response ((member "CommitLog::Info"
(:response ((member "::tx::CommitLog::Info"
:slk-save #'slk-save-commitlog-info
:slk-load #'slk-load-commitlog-info))))