From f987b91de63c2f8eb7b3fa25acaa8b505eb85ae9 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 23 Feb 2023 15:48:37 -0800 Subject: [PATCH] Update proposed APIs --- package.json | 1 + src/client/interpreter/activation/service.ts | 2 +- types/vscode.proposed.envShellEvent.d.ts | 16 ++++++++++++++++ types/vscode.proposed.testObserver.d.ts | 18 ------------------ 4 files changed, 18 insertions(+), 19 deletions(-) create mode 100644 types/vscode.proposed.envShellEvent.d.ts diff --git a/package.json b/package.json index 5e07893bf3d8..d81292db9e17 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "publisher": "ms-python", "enabledApiProposals": [ "quickPickSortByLabel", + "envShellEvent", "testObserver" ], "author": { diff --git a/src/client/interpreter/activation/service.ts b/src/client/interpreter/activation/service.ts index f8c7e7727cac..f4f8e135f348 100644 --- a/src/client/interpreter/activation/service.ts +++ b/src/client/interpreter/activation/service.ts @@ -248,7 +248,7 @@ export class EnvironmentActivationService args[i] = arg.toCommandArgumentForPythonExt(); }); if (interpreter?.envType === EnvironmentType.Conda) { - const conda = await Conda.getConda(); + const conda = await Conda.getConda(shell); const pythonArgv = await conda?.getRunPythonArgs({ name: interpreter.envName, prefix: interpreter.envPath ?? '', diff --git a/types/vscode.proposed.envShellEvent.d.ts b/types/vscode.proposed.envShellEvent.d.ts new file mode 100644 index 000000000000..8fed971ef711 --- /dev/null +++ b/types/vscode.proposed.envShellEvent.d.ts @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +declare module 'vscode' { + + // See https://github.com/microsoft/vscode/issues/160694 + export namespace env { + + /** + * An {@link Event} which fires when the default shell changes. + */ + export const onDidChangeShell: Event; + } +} diff --git a/types/vscode.proposed.testObserver.d.ts b/types/vscode.proposed.testObserver.d.ts index 2bdb21d74732..d4465affbf2f 100644 --- a/types/vscode.proposed.testObserver.d.ts +++ b/types/vscode.proposed.testObserver.d.ts @@ -68,24 +68,6 @@ declare module 'vscode' { readonly removed: ReadonlyArray; } - /** - * A test item is an item shown in the "test explorer" view. It encompasses - * both a suite and a test, since they have almost or identical capabilities. - */ - export interface TestItem { - /** - * Marks the test as outdated. This can happen as a result of file changes, - * for example. In "auto run" mode, tests that are outdated will be - * automatically rerun after a short delay. Invoking this on a - * test with children will mark the entire subtree as outdated. - * - * Extensions should generally not override this method. - */ - // todo@api still unsure about this - invalidateResults(): void; - } - - /** * TestResults can be provided to the editor in {@link tests.publishTestResult}, * or read from it in {@link tests.testResults}.