File tree 1 file changed +5
-1
lines changed
src/client/pythonEnvironments
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { IServiceContainer, IServiceManager } from '../ioc/types';
6
6
import { PythonEnvInfo } from './base/info' ;
7
7
import { ILocator , IPythonEnvsIterator , PythonLocatorQuery } from './base/locator' ;
8
8
import { PythonEnvsChangedEvent } from './base/watcher' ;
9
+ import { CachingLocator } from './collection/cachingLocator' ;
9
10
import { ExtensionLocators , WorkspaceLocators } from './discovery/locators' ;
10
11
import { registerForIOC } from './legacyIOC' ;
11
12
@@ -49,11 +50,14 @@ export class PythonEnvironments implements ILocator {
49
50
*/
50
51
export function createAPI ( ) : [ PythonEnvironments , ( ) => void ] {
51
52
const [ locators , activateLocators ] = initLocators ( ) ;
53
+ const cache = { } ; // This will be filled in once we have it.
54
+ const cachingLocator = new CachingLocator ( cache ! , locators ) ;
52
55
53
56
return [
54
- new PythonEnvironments ( locators ) ,
57
+ new PythonEnvironments ( cachingLocator ) ,
55
58
( ) => {
56
59
activateLocators ( ) ;
60
+ cachingLocator . initialize ( ) . ignoreErrors ( ) ;
57
61
// Any other activation needed for the API will go here later.
58
62
}
59
63
] ;
You can’t perform that action at this time.
0 commit comments