From 3f9bc826a447843e656442f7600cd49df6771a18 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Thu, 27 Jun 2024 10:24:00 +1000 Subject: [PATCH 1/2] Exclude other workspace envs when comparing envs --- .../base/locators/composite/envsCollectionService.ts | 12 ++++++++++-- src/client/telemetry/index.ts | 7 ++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts b/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts index 5469e58d94e5..7815be1fda0c 100644 --- a/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts +++ b/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { Event, EventEmitter } from 'vscode'; +import { Event, EventEmitter, workspace } from 'vscode'; import '../../../../common/extensions'; import { createDeferred, Deferred } from '../../../../common/utils/async'; import { StopWatch } from '../../../../common/utils/stopWatch'; @@ -277,7 +277,14 @@ export class EnvsCollectionService extends PythonEnvsWatcher w.uri), + }, + }; + // + const envs = this.getEnvs(workspaceFolders.length ? query : undefined); const nativeEnvs = []; const executablesFoundByNativeLocator = new Set(); @@ -485,6 +492,7 @@ export class EnvsCollectionService extends PythonEnvsWatcher Date: Thu, 27 Jun 2024 10:37:54 +1000 Subject: [PATCH 2/2] Fix formatting --- .../base/locators/composite/envsCollectionService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts b/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts index 7815be1fda0c..8ede842828a3 100644 --- a/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts +++ b/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts @@ -283,7 +283,7 @@ export class EnvsCollectionService extends PythonEnvsWatcher w.uri), }, }; - // + const envs = this.getEnvs(workspaceFolders.length ? query : undefined); const nativeEnvs = [];