[CodeCompletion] Give up fast-completion if dependent files are modified

Check if dependencies are modified since the last checking.
Dependencies:

 - Other source files in the current module
 - Dependent files collected by the dependency tracker

When:

 - If the last dependency check was over N (defaults to 5) seconds ago

Invalidate if:

 - The dependency file is missing
 - The modification time of the dependecy is greater than the last check
 - If the modification time is zero, compare the content using the file
   system from the previous completion and the current completion

rdar://problem/62336432
This commit is contained in:
Rintaro Ishizaki
2020-04-28 18:34:44 -07:00
parent d9b1d8f694
commit 05a87e86c4
29 changed files with 527 additions and 18 deletions

View File

@@ -179,6 +179,8 @@ UID_KEYS = [
KEY('OptimizeForIDE', 'key.optimize_for_ide'),
KEY('RequiredBystanders', 'key.required_bystanders'),
KEY('ReusingASTContext', 'key.reusingastcontext'),
KEY('CompletionCheckDependencyInterval',
'key.completion_check_dependency_interval'),
]