Added an option to force rescan imports in ModuleCache
This commit is contained in:
parent
f38d36ab41
commit
02dfa8ee33
|
|
@ -62,6 +62,7 @@ int runServer(string[] args)
|
||||||
bool help;
|
bool help;
|
||||||
bool printVersion;
|
bool printVersion;
|
||||||
bool ignoreConfig;
|
bool ignoreConfig;
|
||||||
|
bool forceScan;
|
||||||
string[] importPaths;
|
string[] importPaths;
|
||||||
LogLevel level = globalLogLevel;
|
LogLevel level = globalLogLevel;
|
||||||
version(Windows)
|
version(Windows)
|
||||||
|
|
@ -81,7 +82,7 @@ int runServer(string[] args)
|
||||||
{
|
{
|
||||||
getopt(args, "port|p", &port, "I", &importPaths, "help|h", &help,
|
getopt(args, "port|p", &port, "I", &importPaths, "help|h", &help,
|
||||||
"version", &printVersion, "ignoreConfig", &ignoreConfig,
|
"version", &printVersion, "ignoreConfig", &ignoreConfig,
|
||||||
"logLevel", &level, "tcp", &useTCP, "socketFile", &socketFile);
|
"logLevel", &level, "tcp", &useTCP, "socketFile", &socketFile, "forceScan", &forceScan);
|
||||||
}
|
}
|
||||||
catch (ConvException e)
|
catch (ConvException e)
|
||||||
{
|
{
|
||||||
|
|
@ -294,6 +295,8 @@ int runServer(string[] args)
|
||||||
else if (request.kind & RequestKind.autocomplete)
|
else if (request.kind & RequestKind.autocomplete)
|
||||||
{
|
{
|
||||||
info("Getting completions");
|
info("Getting completions");
|
||||||
|
if(forceScan)
|
||||||
|
cache.forceScan();
|
||||||
s.sendResponse(complete(request, cache));
|
s.sendResponse(complete(request, cache));
|
||||||
}
|
}
|
||||||
else if (request.kind & RequestKind.doc)
|
else if (request.kind & RequestKind.doc)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue