-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Less aggressive inspect request for completer ? #15787
Comments
Completer should only send inspect requests when
What does it mean that an object exists? AFAIK the inspect request can be also sent on arbitrary text when moving cursor with the inspector panel open, right? |
As far as I can tell it also send request just when cycling, I will recheck. I agree that it's a bit on the edge about this request as no-one is doing something obviously wrong. The problem with sending inspect request with the completer is that it send requests for text that is not in a cell and rapid succession. Inspect was originally ment to pull info for |
From a quick look around the codebase it seems that it is indeed what is happening, and fixing it is non-trivial (without breaking downstream). The jupyterlab/packages/completer/src/default/kernelprovider.ts Lines 86 to 90 in 21919ee
Adding an argument to the inspect request sounds good. Of note we already set jupyterlab/packages/completer/src/default/kernelprovider.ts Lines 107 to 112 in 21919ee
We previously talked about having an argument to completion request to enable completer with LSP to say "I want only the completions derived from dynamic rather than static analysis because for static analysis I can do a better job". It looks like this is a very similar scenario where we want only static analysis (no imports) - what do you think? |
It seem that recently (?) the completer was modified to send inspect request when cycling through completions.
This leads to some problems, as some extensions for object inspect (deshaw/pyflyby#296) assume that the objects exists, and this leads to the jupyterLab completer triggering side effects (imports).
Would you be open to splitting the current ipykernel inspects requests (or add a parameter), to distinguish requests for objects that might, or might not exists.
This would likely require coordination between likely a few packages to add new APIs.
The text was updated successfully, but these errors were encountered: