@@ -16,7 +16,6 @@ import {
1616 CURRENT_PATH_SERVICE ,
1717 GetInterpreterLocatorOptions ,
1818 GLOBAL_VIRTUAL_ENV_SERVICE ,
19- IComponentAdapter ,
2019 IInterpreterLocatorHelper ,
2120 IInterpreterLocatorService ,
2221 KNOWN_PATH_SERVICE ,
@@ -182,12 +181,6 @@ export class WorkspaceLocators extends LazyResourceBasedLocator {
182181 }
183182}
184183
185- // The parts of IComponentAdapter used here.
186- interface IComponent {
187- hasInterpreters : Promise < boolean | undefined > ;
188- getInterpreters ( resource ?: Uri , options ?: GetInterpreterLocatorOptions ) : Promise < PythonEnvironment [ ] | undefined > ;
189- }
190-
191184/**
192185 * Facilitates locating Python interpreters.
193186 */
@@ -207,10 +200,7 @@ export class PythonInterpreterLocatorService implements IInterpreterLocatorServi
207200 Promise < PythonEnvironment [ ] >
208201 > ( ) ;
209202
210- constructor (
211- @inject ( IServiceContainer ) private serviceContainer : IServiceContainer ,
212- @inject ( IComponentAdapter ) private readonly pyenvs : IComponent ,
213- ) {
203+ constructor ( @inject ( IServiceContainer ) private serviceContainer : IServiceContainer ) {
214204 this . _hasInterpreters = createDeferred < boolean > ( ) ;
215205 serviceContainer . get < Disposable [ ] > ( IDisposableRegistry ) . push ( this ) ;
216206 this . platform = serviceContainer . get < IPlatformService > ( IPlatformService ) ;
@@ -231,12 +221,7 @@ export class PythonInterpreterLocatorService implements IInterpreterLocatorServi
231221 }
232222
233223 public get hasInterpreters ( ) : Promise < boolean > {
234- return this . pyenvs . hasInterpreters . then ( ( res ) => {
235- if ( res !== undefined ) {
236- return res ;
237- }
238- return this . _hasInterpreters . completed ? this . _hasInterpreters . promise : Promise . resolve ( false ) ;
239- } ) ;
224+ return this . _hasInterpreters . completed ? this . _hasInterpreters . promise : Promise . resolve ( false ) ;
240225 }
241226
242227 /**
@@ -256,10 +241,6 @@ export class PythonInterpreterLocatorService implements IInterpreterLocatorServi
256241 */
257242 @traceDecorators . verbose ( 'Get Interpreters' )
258243 public async getInterpreters ( resource ?: Uri , options ?: GetInterpreterLocatorOptions ) : Promise < PythonEnvironment [ ] > {
259- const envs = await this . pyenvs . getInterpreters ( resource , options ) ;
260- if ( envs !== undefined ) {
261- return envs ;
262- }
263244 const locators = this . getLocators ( options ) ;
264245 const promises = locators . map ( async ( provider ) => provider . getInterpreters ( resource ) ) ;
265246 locators . forEach ( ( locator ) => {
0 commit comments