Skip to content

Commit

Permalink
Try runnung jedi
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig committed Jan 31, 2023
1 parent 5736fa0 commit 6cd17b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
matrix:
# We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used,
# macOS runners are expensive, and we assume that Ubuntu is enough to cover the UNIX case.
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]
steps:
# Need the source to have the tests available.
- name: Checkout
Expand Down
9 changes: 9 additions & 0 deletions src/client/activation/jedi/languageClientFactory.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

import { exec } from 'child_process';
import * as path from 'path';
import { LanguageClient, LanguageClientOptions, ServerOptions } from 'vscode-languageclient/node';

import { EXTENSION_ROOT_DIR, PYTHON_LANGUAGE } from '../../common/constants';
import { Resource } from '../../common/types';
import { sleep } from '../../common/utils/async';
import { IInterpreterService } from '../../interpreter/contracts';
import { PythonEnvironment } from '../../pythonEnvironments/info';
import { ILanguageClientFactory } from '../types';
Expand All @@ -29,6 +31,13 @@ export class JediLanguageClientFactory implements ILanguageClientFactory {
};

console.log(`Jedi Language Server options: ${JSON.stringify(serverOptions)}`);
const child = exec(`${serverOptions.command} ${lsScriptPath}`, (error, stdout, stderr) => {
console.log(`stdout: ${stdout}`);
console.log(`stderr: ${stderr}`);
console.log(`ERROR:`, error);
});
await sleep(5000);
child.kill();

return new LanguageClient(PYTHON_LANGUAGE, languageClientName, serverOptions, clientOptions);
}
Expand Down

0 comments on commit 6cd17b3

Please sign in to comment.