Skip to content

Commit f94ef53

Browse files
committed
4th time
1 parent 0acd97a commit f94ef53

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/client/common/process/pythonExecutionFactory.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,53 +51,60 @@ export class PythonExecutionFactory implements IPythonExecutionFactory {
5151
}
5252

5353
public async create(options: ExecutionFactoryCreationOptions): Promise<IPythonExecutionService> {
54+
console.log('EJFB, 4.1');
5455
let { pythonPath } = options;
5556
if (!pythonPath || pythonPath === 'python') {
5657
const activatedEnvLaunch = this.serviceContainer.get<IActivatedEnvironmentLaunch>(
5758
IActivatedEnvironmentLaunch,
5859
);
60+
console.log('EJFB, 4.2');
5961
await activatedEnvLaunch.selectIfLaunchedViaActivatedEnv();
6062
// If python path wasn't passed in, we need to auto select it and then read it
6163
// from the configuration.
6264
const interpreterPath = this.interpreterPathExpHelper.get(options.resource);
65+
console.log('EJFB, 4.3');
6366
if (!interpreterPath || interpreterPath === 'python') {
6467
// Block on autoselection if no interpreter selected.
6568
// Note autoselection blocks on discovery, so we do not want discovery component
6669
// to block on this code. Discovery component should 'options.pythonPath' before
6770
// calling into this, so this scenario should not happen. But in case consumer
6871
// makes such an error. So break the loop via timeout and log error.
72+
console.log('EJFB, 4.4');
6973
const success = await Promise.race([
7074
this.autoSelection.autoSelectInterpreter(options.resource).then(() => true),
7175
sleep(50000).then(() => false),
7276
]);
77+
console.log('EJFB, 4.5');
7378
if (!success) {
7479
traceError(
7580
'Autoselection timeout out, this is likely a issue with how consumer called execution factory API. Using default python to execute.',
7681
);
7782
}
7883
}
84+
console.log('EJFB, 4.6');
7985
pythonPath = this.configService.getSettings(options.resource).pythonPath;
8086
}
87+
console.log('EJFB, 4.7');
8188
const processService: IProcessService = await this.processServiceFactory.create(options.resource);
82-
89+
console.log('EJFB, 4.8');
8390
if (await getPixi()) {
8491
const pixiExecutionService = await this.createPixiExecutionService(pythonPath, processService);
8592
if (pixiExecutionService) {
8693
return pixiExecutionService;
8794
}
8895
}
89-
96+
console.log('EJFB, 4.9');
9097
const condaExecutionService = await this.createCondaExecutionService(pythonPath, processService);
9198
if (condaExecutionService) {
9299
return condaExecutionService;
93100
}
94-
101+
console.log('EJFB, 4.10');
95102
const windowsStoreInterpreterCheck = this.pyenvs.isMicrosoftStoreInterpreter.bind(this.pyenvs);
96-
103+
console.log('EJFB, 4.11');
97104
const env = (await windowsStoreInterpreterCheck(pythonPath))
98105
? createMicrosoftStoreEnv(pythonPath, processService)
99106
: createPythonEnv(pythonPath, processService, this.fileSystem);
100-
107+
console.log('EJFB, 4.12');
101108
return createPythonService(processService, env);
102109
}
103110

0 commit comments

Comments
 (0)