Skip to content

Commit 182f449

Browse files
Kartik Rajwesm
Kartik Raj
authored andcommitted
Remove unwanted properties (microsoft/vscode-python#20045)
Follow-up to microsoft/vscode-python#20024
1 parent 7139da1 commit 182f449

File tree

7 files changed

+9
-21
lines changed

7 files changed

+9
-21
lines changed

extensions/positron-python/package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,12 +1605,6 @@
16051605
"title": "%python.command.python.execSelectionInTerminal.title%",
16061606
"when": "!virtualWorkspace && shellExecutionSupported"
16071607
},
1608-
{
1609-
"category": "Python",
1610-
"command": "python.goToPythonObject",
1611-
"title": "%python.command.python.goToPythonObject.title%",
1612-
"when": "!virtualWorkspace && shellExecutionSupported"
1613-
},
16141608
{
16151609
"category": "Python",
16161610
"command": "python.launchTensorBoard",

extensions/positron-python/package.nls.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"python.command.testing.rerunFailedTests.title": "Rerun Failed Tests",
1616
"python.command.python.execSelectionInTerminal.title": "Run Selection/Line in Python Terminal",
1717
"python.command.python.execSelectionInDjangoShell.title": "Run Selection/Line in Django Shell",
18-
"python.command.python.goToPythonObject.title": "Go to Python Object",
1918
"python.command.python.reportIssue.title": "Report Issue...",
2019
"python.command.python.setLinter.title": "Select Linter",
2120
"python.command.python.enableLinting.title": "Enable/Disable Linting",

extensions/positron-python/src/client/activation/jedi/languageServerProxy.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,15 @@ export class JediLanguageServerProxy implements ILanguageServerProxy {
5252
(options.middleware ? (<JediLanguageClientMiddleware>options.middleware).serverVersion : undefined) ??
5353
'0.19.3';
5454

55-
const client = await this.factory.createLanguageClient(resource, interpreter, options);
56-
this.registerHandlers(client);
57-
58-
await client.start();
59-
60-
this.languageClient = client;
55+
try {
56+
const client = await this.factory.createLanguageClient(resource, interpreter, options);
57+
this.registerHandlers(client);
58+
await client.start();
59+
this.languageClient = client;
60+
} catch (ex) {
61+
traceError('Failed to start language server:', ex);
62+
throw new Error('Launching Jedi language server using python failed, see output.');
63+
}
6164
}
6265

6366
@traceDecoratorVerbose('Stopping language server')

extensions/positron-python/src/client/browser/extension.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ function sendTelemetryEventBrowser(
194194
if (ex) {
195195
const errorProps = {
196196
errorName: ex.name,
197-
errorMessage: ex.message,
198197
errorStack: ex.stack ?? '',
199198
};
200199
Object.assign(customProperties, errorProps);

extensions/positron-python/src/client/interpreter/activation/service.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,10 @@ export class EnvironmentActivationService implements IEnvironmentActivationServi
159159
return vars;
160160
})
161161
.catch((ex) => {
162-
let excString = (ex as Error).toString();
163-
if (interpreter?.envName) {
164-
excString = excString.replaceAll(interpreter.envName, '<env name>');
165-
}
166162
sendTelemetryEvent(
167163
EventName.PYTHON_INTERPRETER_ACTIVATION_ENVIRONMENT_VARIABLES,
168164
stopWatch.elapsedTime,
169165
{ failed: true },
170-
new Error(excString),
171166
);
172167
throw ex;
173168
});

extensions/positron-python/src/client/telemetry/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ export function sendTelemetryEvent<P extends IEventNamePropertyMapping, E extend
150150
if (ex) {
151151
const errorProps = {
152152
errorName: ex.name,
153-
errorMessage: ex.message,
154153
errorStack: ex.stack ?? '',
155154
};
156155
Object.assign(customProperties, errorProps);

extensions/positron-python/src/test/telemetry/index.unit.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ suite('Telemetry', () => {
166166
const expectedProperties = {
167167
...properties,
168168
errorName: error.name,
169-
errorMessage: error.message,
170169
errorStack: error.stack,
171170
};
172171

0 commit comments

Comments
 (0)