-
Notifications
You must be signed in to change notification settings - Fork 905
Description
We are seeing crash reports for our Julia extension where we get textDocument/completion requests for positions that don't exist in the document. For example, the document is empty (i.e. an empty string), and then we get a request with a position of line 4 character 11.
We did have some bugs in terms of text sync. They previously showed up when we compared our own copy of the document content with the value we received in didSave. But we haven't received a single a single crash report with this kind of discrepancy in didSave so we kind of assume that we fixed the text sync... (we have automatic crash reporting and many thousand users, so we should have pretty good coverage).
The question for us now is: is this another bug in our text sync implementation, or should we expect to get textDocument/completion requests for positions that don't exist? Or is this maybe a bug in what positions are sent from the VS Code client?
Looking at the node implementation here it looks like it would just tolerate such erroneous position requests, i.e. even if a request with a position that doesn't exist came in, it would not crash. So maybe the VS Code client is sending these positions that are not really valid, but it hasn't shown up as bugs because the "default" implementation can ignore this problem?