Commit Graph

6 Commits

Author SHA1 Message Date
Ben Barham
68f89d44de [SourceKit] Fix flakey VFS completion tests
These tests relied on timing between completion runs in order to check
that fast completion was working properly for completions in VFS files.
That is, they would assume that two runs happening one after another
without a sleep inbetween would always run fast completion.

However, that's not necessarily the case and there have been cases where
a dependency check happens despite its interval being fairly long
(multi-second).

This change emulates the same behaviour by changing the interval
between 0/100, which should prevent any timing issues.

Resolves rdar://72144331
2020-12-11 09:22:24 +10:00
Rintaro Ishizaki
77b4f75608 [SourceKit] Reorgantize code completion options
* Abolish 'reuseastcontext' per-request option
* Add 'MaxASTContextReuseCount' global configuration
2020-09-03 19:30:05 -07:00
Rintaro Ishizaki
bf5fb4d2bb [CodeCompletion] Don't update VFS content hash map after each completion
This was not needed. The list of depenencies should not be changed
during fast-completion sessions.

This was also harmful because it calls stat(2) for all the dependency
files.

rdar://problem/67773257
2020-08-26 09:56:36 -07:00
Rintaro Ishizaki
af5daed144 [CodeCompletion] Tweak fast completion dependency checking
- Detect same file with bufferID instead of the file name
- Compare virtual in-memory filesystem content with hash value
2020-05-04 16:35:41 -07:00
Rintaro Ishizaki
e32de789ff [Tests] Mark check dependency tests cases 'REQUIRES: shell'
These test cases use shell variables etc.
2020-05-04 13:02:09 -07:00
Rintaro Ishizaki
df8fa09d8e [CodeCompletion] Added check dependency test for complete.open 2020-05-04 13:02:09 -07:00