From #16723 (review):
When in the new sorting/auto-selection experiment (#16520):
- The first time
updateDisplay is called the interpreter is python, so it will trigger auto-selection, so far so good;
- The new auto-selection logic will query
interpreterService.getInterpreters, however this call will return cached interpreters, so the interpreter that will be displayed in the status bar is going to be one of my cached global interpreters;
- Then the auto-selection will be triggered again, this time by
ExtensionActivationManager.activate, and this time the local virtual environment selected will be returned, but there is no updateDisplay call to reflect that change.
Proposed solution from @karrtikr: Add a way for getInterpreters to return fresh workspace envs and cached global envs (instead of just cached global envs)
From #16723 (review):
When in the new sorting/auto-selection experiment (#16520):
updateDisplayis called the interpreter ispython, so it will trigger auto-selection, so far so good;interpreterService.getInterpreters, however this call will return cached interpreters, so the interpreter that will be displayed in the status bar is going to be one of my cached global interpreters;ExtensionActivationManager.activate, and this time the local virtual environment selected will be returned, but there is noupdateDisplaycall to reflect that change.Proposed solution from @karrtikr: Add a way for
getInterpretersto return fresh workspace envs and cached global envs (instead of just cached global envs)