You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reproes also in VS - VS simply shows no completions.
In VSC:
classEmployee:
'Common base class for all employees'empCount=0def__init__(self, name, salary):
self.name=nameself.salary=salaryEmployee.empCount+=1p1=Employee('Bob', 1)
Type p1. or delete and retype .
Now, close completion and ctrl+space
Ideally engine should be able to provide completions from the previous snapshot without having to wait for the analysis to complete.
The text was updated successfully, but these errors were encountered:
MikhailArkhipov
changed the title
First time completion list is almost always wrong b/c of analyzis delay
First time completion list is almost always wrong b/c of analysis delay
Apr 10, 2018
It generally can do this already, but there are some cases where a race occurs.
The analyzer uses incremental reanalysis, and has thread-safe querying during this process. When we requeue a class definition it clears out all values of that class type in preparation for the new type becoming available, which is likely where you are getting the incomplete analysis from.
We don't snapshot the entire set of completion results. The memory requirements for this would be prohibitive. At best we could cache prior requests, but that doesn't seem like a genuine solution (at first glance, at least, I could be wrong).
The delay on the first run is somewhat unavoidable, unless we lock out users from doing anything until we've finished initializing. There is no "previous snapshot" in this case. VS still has synchronous completions, which is why it times out and you see nothing (though I'm working on fixing this already), and if you wait for completions without analysis then you aren't going to see anything useful.
We should be able to support the "incomplete" flag here, at least in VSC, which will cause it to requery and hopefully get complete results after a few seconds. I'll see how easily I can add that in to my current changes - I think it'll just want to match the "IsAnalyzed" flag of the entry being queried.
Reproes also in VS - VS simply shows no completions.
In VSC:
Type
p1.
or delete and retype.
Now, close completion and ctrl+space
Ideally engine should be able to provide completions from the previous snapshot without having to wait for the analysis to complete.
The text was updated successfully, but these errors were encountered: