mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 01:21:57 +00:00
Make missing clientVersion skip check
This commit is contained in:
parent
670c925204
commit
0f3680866e
@ -1511,13 +1511,13 @@ bool QueryDbMainLoop(Config* config,
|
||||
*config = *request->params.initializationOptions;
|
||||
|
||||
// Check client version.
|
||||
if (config->clientVersion != kExpectedClientVersion &&
|
||||
config->clientVersion != -1 /*disable check*/) {
|
||||
if (config->clientVersion.has_value() &&
|
||||
*config->clientVersion != kExpectedClientVersion) {
|
||||
Out_ShowLogMessage out;
|
||||
out.display_type = Out_ShowLogMessage::DisplayType::Show;
|
||||
out.params.type = lsMessageType::Error;
|
||||
out.params.message =
|
||||
"cquery client (v" + std::to_string(config->clientVersion) +
|
||||
"cquery client (v" + std::to_string(*config->clientVersion) +
|
||||
") and server (v" + std::to_string(kExpectedClientVersion) +
|
||||
") version mismatch. Please update ";
|
||||
if (config->clientVersion > kExpectedClientVersion)
|
||||
|
@ -67,8 +67,9 @@ struct Config {
|
||||
// Enables code lens on parameter and function variables.
|
||||
bool codeLensOnLocalVariables = true;
|
||||
|
||||
// Version of the client.
|
||||
int clientVersion = 0;
|
||||
// Version of the client. If undefined the version check is skipped. Used to
|
||||
// inform users their vscode client is too old and needs to be updated.
|
||||
optional<int> clientVersion;
|
||||
|
||||
// If true parameter declarations are included in code completion when calling
|
||||
// a function or method
|
||||
|
Loading…
Reference in New Issue
Block a user