mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-31 18:00:26 +00:00
Remove Ipc_Cout; rename IpcId::Cout to IpcId::Unknown.
This commit is contained in:
parent
6c5f1d9c88
commit
670c925204
@ -85,7 +85,7 @@ bool ShouldDisplayIpcTiming(IpcId id) {
|
|||||||
switch (id) {
|
switch (id) {
|
||||||
case IpcId::TextDocumentPublishDiagnostics:
|
case IpcId::TextDocumentPublishDiagnostics:
|
||||||
case IpcId::CqueryPublishInactiveRegions:
|
case IpcId::CqueryPublishInactiveRegions:
|
||||||
case IpcId::Cout:
|
case IpcId::Unknown:
|
||||||
return false;
|
return false;
|
||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
@ -126,7 +126,7 @@ bool FindFileOrFail(QueryDatabase* db,
|
|||||||
out.id = *id;
|
out.id = *id;
|
||||||
out.error.code = lsErrorCodes::InternalError;
|
out.error.code = lsErrorCodes::InternalError;
|
||||||
out.error.message = "Unable to find file " + absolute_path;
|
out.error.message = "Unable to find file " + absolute_path;
|
||||||
IpcManager::WriteStdout(IpcId::Cout, out);
|
IpcManager::WriteStdout(IpcId::Unknown, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -876,7 +876,7 @@ void EmitProgress(Config* config, QueueManager* queue) {
|
|||||||
out.params.onIdMappedCount = queue->on_id_mapped.Size();
|
out.params.onIdMappedCount = queue->on_id_mapped.Size();
|
||||||
out.params.onIndexedCount = queue->on_indexed.Size();
|
out.params.onIndexedCount = queue->on_indexed.Size();
|
||||||
|
|
||||||
IpcManager::WriteStdout(IpcId::Cout, out);
|
IpcManager::WriteStdout(IpcId::Unknown, out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,8 +73,8 @@ const char* IpcIdToString(IpcId id) {
|
|||||||
case IpcId::CqueryDerived:
|
case IpcId::CqueryDerived:
|
||||||
return "$cquery/derived";
|
return "$cquery/derived";
|
||||||
|
|
||||||
case IpcId::Cout:
|
case IpcId::Unknown:
|
||||||
return "$cout";
|
return "$unknown";
|
||||||
|
|
||||||
case IpcId::CqueryIndexFile:
|
case IpcId::CqueryIndexFile:
|
||||||
return "$cquery/indexFile";
|
return "$cquery/indexFile";
|
||||||
|
@ -50,7 +50,7 @@ enum class IpcId : int {
|
|||||||
CqueryDerived, // Show all derived types/methods.
|
CqueryDerived, // Show all derived types/methods.
|
||||||
|
|
||||||
// Internal implementation detail.
|
// Internal implementation detail.
|
||||||
Cout,
|
Unknown,
|
||||||
|
|
||||||
// Index the given file contents. Used in tests.
|
// Index the given file contents. Used in tests.
|
||||||
CqueryIndexFile,
|
CqueryIndexFile,
|
||||||
@ -80,13 +80,6 @@ struct IpcMessage : public BaseIpcMessage {
|
|||||||
IpcMessage() : BaseIpcMessage(T::kIpcId) {}
|
IpcMessage() : BaseIpcMessage(T::kIpcId) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Ipc_Cout : public IpcMessage<Ipc_Cout> {
|
|
||||||
static constexpr IpcId kIpcId = IpcId::Cout;
|
|
||||||
std::string content;
|
|
||||||
IpcId original_ipc_id;
|
|
||||||
};
|
|
||||||
MAKE_REFLECT_STRUCT(Ipc_Cout, content);
|
|
||||||
|
|
||||||
struct Ipc_CqueryIndexFile : public IpcMessage<Ipc_CqueryIndexFile> {
|
struct Ipc_CqueryIndexFile : public IpcMessage<Ipc_CqueryIndexFile> {
|
||||||
static constexpr IpcId kIpcId = IpcId::CqueryIndexFile;
|
static constexpr IpcId kIpcId = IpcId::CqueryIndexFile;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ optional<Matcher> Matcher::Create(const std::string& search) {
|
|||||||
out.params.type = lsMessageType::Error;
|
out.params.type = lsMessageType::Error;
|
||||||
out.params.message = "cquery: Parsing EMCAScript regex \"" + search +
|
out.params.message = "cquery: Parsing EMCAScript regex \"" + search +
|
||||||
"\" failed; " + e.what();
|
"\" failed; " + e.what();
|
||||||
IpcManager::WriteStdout(IpcId::Cout, out);
|
IpcManager::WriteStdout(IpcId::Unknown, out);
|
||||||
return nullopt;
|
return nullopt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user