Closed
Description
Based on our previous discussions I was informed that calling refresh
on the new Python API would be a noop if Python has already started the refresh. Thus we'd get a promise back letting us know if and when python has completed refreshing/loading the interpreters.
However based on the latest discussions this is not the case.
Here's what was previously discussed:
- Adopt new Python extensions non-blocking API for interpreter disocvery vscode-jupyter#7583 (comment)
change getRefreshPromise to getRefreshPromise(): Promise | undefined;
WheregetRefreshPromise
returns an existing promise instead of starting a whole new refresh. Note,refreshEnvironments
is a separate method. - The UI here also requires jupyter to know whether a refresh in Python is already in progress
https://github.com/DonJayamanne/kernel-python-picker
This is what we need:
- If Python is busy discovering interpreters we need to know this
It doesn't need to be a promise, it could be an event along with a status property (as previously discussed),
This way the change even triggers when theres' a change in the state
and a status property contains the current statusrefreshing|idle|etc...
@karrtikr this is something we wanted in the previous API, hence filing this as a bug.