Skip to content

Commit

Permalink
Log best effort versions calculated for an environment (#22980)
Browse files Browse the repository at this point in the history
For #22877
  • Loading branch information
Kartik Raj authored Feb 27, 2024
1 parent f1d7799 commit d0a07de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/client/pythonEnvironments/common/commonUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as fs from 'fs';
import * as path from 'path';
import { convertFileType, DirEntry, FileType, getFileFilter, getFileType } from '../../common/utils/filesystem';
import { getOSType, OSType } from '../../common/utils/platform';
import { traceError } from '../../logging';
import { traceError, traceVerbose } from '../../logging';
import { PythonVersion, UNKNOWN_PYTHON_VERSION } from '../base/info';
import { comparePythonVersionSpecificity } from '../base/info/env';
import { parseVersion } from '../base/info/pythonVersion';
Expand Down Expand Up @@ -246,8 +246,11 @@ export async function getPythonVersionFromPath(interpreterPath: string, hint?: s
versionA = UNKNOWN_PYTHON_VERSION;
}
const versionB = interpreterPath ? await getPythonVersionFromNearByFiles(interpreterPath) : UNKNOWN_PYTHON_VERSION;
traceVerbose('Best effort version B for', interpreterPath, JSON.stringify(versionB));
const versionC = interpreterPath ? await getPythonVersionFromPyvenvCfg(interpreterPath) : UNKNOWN_PYTHON_VERSION;
traceVerbose('Best effort version C for', interpreterPath, JSON.stringify(versionC));
const versionD = interpreterPath ? await getPythonVersionFromConda(interpreterPath) : UNKNOWN_PYTHON_VERSION;
traceVerbose('Best effort version D for', interpreterPath, JSON.stringify(versionD));

let version = UNKNOWN_PYTHON_VERSION;
for (const v of [versionA, versionB, versionC, versionD]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export class ShellIntegrationService implements IShellIntegrationService {
}
this.appShell.onDidWriteTerminalData(
(e) => {
traceVerbose(e.data); // Log this temporarily for analysis
if (e.data.includes('\x1b]633;A\x07') || e.data.includes('\x1b]133;A\x07')) {
let { shell } = this.appEnvironment;
if ('shellPath' in e.terminal.creationOptions && e.terminal.creationOptions.shellPath) {
Expand Down

0 comments on commit d0a07de

Please sign in to comment.