Skip to content

Replace Jedi with Jedi LSP #17273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b4424c1
Remove the experiment
kimadeline Sep 3, 2021
7993e17
News file
kimadeline Sep 3, 2021
560ea71
Fix linting issue
kimadeline Sep 3, 2021
68bb632
Turn JediLSP option into Jedi
kimadeline Sep 7, 2021
185d72e
Remove commented code
kimadeline Sep 7, 2021
0c12ed3
Update comment
kimadeline Sep 8, 2021
34ea029
Always register no LS activator
kimadeline Sep 8, 2021
ca5dbff
Add basic 2.7 LS support (Pylance or None)
kimadeline Sep 8, 2021
c48302d
Skip tests on Python 2.7
kimadeline Sep 8, 2021
0fd8455
Fix unit tests
kimadeline Sep 8, 2021
4f5612c
Default to Pylance
kimadeline Sep 8, 2021
61dad1c
Fix unit tests
kimadeline Sep 8, 2021
ec0db02
Set default LS to Jedi
kimadeline Sep 8, 2021
777680e
Install JediLSP requirements for testing
kimadeline Sep 8, 2021
9044986
Change default back to none
kimadeline Sep 8, 2021
6bf6a24
Typo
kimadeline Sep 8, 2021
4bafd38
Turn condition around to match comment
kimadeline Sep 8, 2021
7f5bb1b
Remove JediLSP requirements
kimadeline Sep 8, 2021
bd91ebe
Default to None
kimadeline Sep 9, 2021
ac36ebd
Install JediLSP requirements
kimadeline Sep 9, 2021
df2841f
Install JediLSP reqs for smoke tests too
kimadeline Sep 9, 2021
f432385
Merge branch 'main' into 11995-use-jedi-lsp-
kimadeline Sep 9, 2021
efdab05
Install JediLSP reqs in coverage step
kimadeline Sep 9, 2021
3733b58
Undo PR check workflow changes
kimadeline Sep 9, 2021
d85d0a9
Turns out it won't run if there's no 'run' keyword
kimadeline Sep 9, 2021
fc85f2a
Change condition order
kimadeline Sep 9, 2021
5418db5
Add activation service unit tests
kimadeline Sep 9, 2021
010d3d4
Remove comment
kimadeline Sep 9, 2021
f38558f
Add NoLanguageServerExtensionActivator check
kimadeline Sep 9, 2021
b1f3819
Delete Jedi tests
kimadeline Sep 9, 2021
54ca6b5
Change condition order
kimadeline Sep 9, 2021
5a3f849
Install Jedi LSP reqs in nightly coverage
kimadeline Sep 10, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/nightly-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt --no-user
# We need to have debugpy so that tests relying on it keep passing, but we don't need install_debugpy's logic in the test phase.
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --no-deps --upgrade -r ./jedils_requirements.txt

- name: Install test requirements
run: python -m pip install --upgrade -r build/test-requirements.txt
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ jobs:
# We need to have debugpy so that tests relying on it keep passing, but we don't need install_debugpy's logic in the test phase.
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy

- name: Install Jedi LSP requirements
run: python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --no-deps --upgrade -r ./jedils_requirements.txt
if: startsWith(matrix.python, 3.)

- name: Install test requirements
run: python -m pip install --upgrade -r build/test-requirements.txt

Expand Down Expand Up @@ -388,6 +392,7 @@ jobs:
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt --no-user
# We need to have debugpy so that tests relying on it keep passing, but we don't need install_debugpy's logic in the test phase.
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --no-deps --upgrade -r ./jedils_requirements.txt

- name: Install test requirements
run: python -m pip install --upgrade -r build/test-requirements.txt
Expand Down
1 change: 1 addition & 0 deletions news/1 Enhancements/11995.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Phase out Jedi 0.17, and use Jedi behind a language server protocol as the Jedi option.
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,6 @@
"pythonDeprecatePythonPath",
"pythonDiscoveryModule",
"pythonDiscoveryModuleWithoutWatcher",
"pythonJediLSP",
"pythonSortEnvs",
"pythonSurveyNotification",
"pythonTensorboardExperiment",
Expand All @@ -666,7 +665,6 @@
"pythonDeprecatePythonPath",
"pythonDiscoveryModule",
"pythonDiscoveryModuleWithoutWatcher",
"pythonJediLSP",
"pythonSortEnvs",
"pythonSurveyNotification",
"pythonTensorboardExperiment",
Expand Down Expand Up @@ -770,13 +768,11 @@
"enum": [
"Default",
"Jedi",
"JediLSP",
"Pylance",
"None"
],
"enumDescriptions": [
"Automatically select a language server: Pylance if installed and available, otherwise fallback to Jedi.",
"Use Jedi as a language server.",
"Use Jedi behind the Language Server Protocol (LSP) as a language server.",
"Use Pylance as a language server.",
"Disable language server capabilities."
Expand Down
54 changes: 35 additions & 19 deletions src/client/activation/activationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import '../common/extensions';

import { inject, injectable } from 'inversify';
import { ConfigurationChangeEvent, Disposable, OutputChannel, Uri } from 'vscode';
import { ConfigurationChangeEvent, ConfigurationTarget, Disposable, OutputChannel, Uri } from 'vscode';

import { LSNotSupportedDiagnosticServiceId } from '../application/diagnostics/checks/lsNotSupported';
import { IDiagnosticsService } from '../application/diagnostics/types';
Expand Down Expand Up @@ -56,6 +56,8 @@ export class LanguageServerExtensionActivationService

private readonly workspaceService: IWorkspaceService;

private readonly configurationService: IConfigurationService;

private readonly output: OutputChannel;

private readonly interpreterService: IInterpreterService;
Expand All @@ -69,6 +71,7 @@ export class LanguageServerExtensionActivationService
@inject(IPersistentStateFactory) private stateFactory: IPersistentStateFactory,
) {
this.workspaceService = this.serviceContainer.get<IWorkspaceService>(IWorkspaceService);
this.configurationService = this.serviceContainer.get<IConfigurationService>(IConfigurationService);
this.interpreterService = this.serviceContainer.get<IInterpreterService>(IInterpreterService);
this.output = this.serviceContainer.get<OutputChannel>(IOutputChannel, STANDARD_OUTPUT_CHANNEL);

Expand All @@ -87,8 +90,8 @@ export class LanguageServerExtensionActivationService
this.serviceContainer.get<IExtensions>(IExtensions),
this.serviceContainer.get<IApplicationShell>(IApplicationShell),
this.serviceContainer.get<ICommandManager>(ICommandManager),
this.serviceContainer.get<IWorkspaceService>(IWorkspaceService),
this.serviceContainer.get<IConfigurationService>(IConfigurationService),
this.workspaceService,
this.configurationService,
);
disposables.push(this.languageServerChangeHandler);
}
Expand Down Expand Up @@ -228,6 +231,9 @@ export class LanguageServerExtensionActivationService
key: string,
): Promise<RefCountedLanguageServer> {
let serverType = this.getCurrentLanguageServerType();

this.updateLanguageServerSetting(resource);

if (serverType === LanguageServerType.Microsoft) {
const lsNotSupportedDiagnosticService = this.serviceContainer.get<IDiagnosticsService>(
IDiagnosticsService,
Expand All @@ -243,22 +249,13 @@ export class LanguageServerExtensionActivationService
}
}

if (serverType === LanguageServerType.JediLSP && interpreter && interpreter.version) {
if (interpreter.version.major < 3 || (interpreter.version.major === 3 && interpreter.version.minor < 6)) {
sendTelemetryEvent(EventName.JEDI_FALLBACK);
serverType = LanguageServerType.Jedi;
}
}

// If Pylance was chosen via the default and the interpreter is Python 2, fall back to
// Jedi. If Pylance was explicitly chosen, continue anyway, even if Pylance won't work
// as expected, matching pre-default behavior.
if (this.getCurrentLanguageServerTypeIsDefault()) {
if (serverType === LanguageServerType.Node && interpreter && interpreter.version) {
if (interpreter.version.major < 3) {
sendTelemetryEvent(EventName.JEDI_FALLBACK);
serverType = LanguageServerType.Jedi;
}
// If the interpreter is Python 2 and the LS setting is explicitly set to Jedi, turn it off.
// If set to Default, use Pylance.
if (interpreter && (interpreter.version?.major ?? 0) < 3) {
if (serverType === LanguageServerType.Jedi) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I have the inner condition the other way around (if default -> node, else if jedi -> none) then the 2.7 debugger tests break 🤷

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting the condition can change the language server as the default LS can be Jedi as well, although not sure how intellisense affects debugger 😂

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting the condition can change the language server as the default LS can be Jedi as well

True!

although not sure how intellisense affects debugger 😂

The debugger tests spawn a VS Code instance, it's something about the extension activating and not finding Pylance (not sure why it causes an activation failure instead of displaying the "Pylance is not installed, do you want to install it" message though)

serverType = LanguageServerType.None;
} else if (this.getCurrentLanguageServerTypeIsDefault()) {
serverType = LanguageServerType.Node;
}
}

Expand Down Expand Up @@ -348,4 +345,23 @@ export class LanguageServerExtensionActivationService
const values = await Promise.all([...this.cache.values()]);
values.forEach((v) => (v.clearAnalysisCache ? v.clearAnalysisCache() : noop()));
}

private updateLanguageServerSetting(resource: Resource): void {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think there's a better spot where this could be done? It feels weird updating the settings.json file here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do similar this in testing too. But we have the code in a separate file. (See updateTestSettings.ts). I don't think we have a convention for this, and it seems ok to do it here.

Ideally we would have a settings manager and we would register this as a change provider with that.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is just for settings migration. We do have a diagnostics convention for stuff like this, ideally updateTestSettings.ts should be a diagnostic too. See

lsNotSupportedDiagnosticService.handle(diagnostic).ignoreErrors();

for example.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is just for settings migration.

Yes, it replaces the JediLSP value of the python.languageServer setting with Jedi.

Looking at the LSNotSupportedDiagnosticService class it seems to only display an information message, and doesn't migrate settings?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to display the "Python 2.7 isn't supported" notification as a diagnostic, so I'm going to move the settings migration there in that PR.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the LSNotSupportedDiagnosticService class it seems to only display an information message, and doesn't migrate settings?

Yes, the point I was making was it could be used for migration.

is probably a better example where we migrate.

I'm going to display the "Python 2.7 isn't supported" notification as a diagnostic, so I'm going to move the settings migration there in that PR.

Great!

// Update settings.json value to Jedi if it's JediLSP.
const settings = this.workspaceService
.getConfiguration('python', resource)
.inspect<LanguageServerType>('languageServer');

let configTarget: ConfigurationTarget;

if (settings?.workspaceValue === LanguageServerType.JediLSP) {
configTarget = ConfigurationTarget.Workspace;
} else if (settings?.globalValue === LanguageServerType.JediLSP) {
configTarget = ConfigurationTarget.Global;
} else {
return;
}

this.configurationService.updateSetting('languageServer', LanguageServerType.Jedi, resource, configTarget);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a good idea to change this? It's no longer a valid enum value but is still accepted by the settings parser.

People may have checked in these settings, so I'd be wary of forcibly changing them to something else at startup, but maybe it won't be too many people.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could leave it to show squiggles for a few releases and later remove it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing it from package.json will effectively do this, so that's okay.

I don't have a strong preference; I know that Pylance has migration code for old MPLS settings, so I guess we're already accepting setting migrations. Have the same thing here already (though in that other test settings migrator thingy).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do migrations like this all the time for launch.json, or other settings like python.unitTest to python.testing, so I don't think this should be a problem.

}
}
15 changes: 4 additions & 11 deletions src/client/activation/common/defaultlanguageServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

import { injectable } from 'inversify';
import { PYLANCE_EXTENSION_ID } from '../../common/constants';
import { JediLSP } from '../../common/experiments/groups';
import { IDefaultLanguageServer, IExperimentService, IExtensions, DefaultLSType } from '../../common/types';
import { IDefaultLanguageServer, IExtensions, DefaultLSType } from '../../common/types';
import { IServiceManager } from '../../ioc/types';
import { ILSExtensionApi } from '../node/languageServerFolderService';
import { LanguageServerType } from '../types';
Expand All @@ -19,26 +18,20 @@ class DefaultLanguageServer implements IDefaultLanguageServer {
}

export async function setDefaultLanguageServer(
experimentService: IExperimentService,
extensions: IExtensions,
serviceManager: IServiceManager,
): Promise<void> {
const lsType = await getDefaultLanguageServer(experimentService, extensions);
const lsType = await getDefaultLanguageServer(extensions);
serviceManager.addSingletonInstance<IDefaultLanguageServer>(
IDefaultLanguageServer,
new DefaultLanguageServer(lsType),
);
}

async function getDefaultLanguageServer(
experimentService: IExperimentService,
extensions: IExtensions,
): Promise<DefaultLSType> {
async function getDefaultLanguageServer(extensions: IExtensions): Promise<DefaultLSType> {
if (extensions.getExtension<ILSExtensionApi>(PYLANCE_EXTENSION_ID)) {
return LanguageServerType.Node;
}

return (await experimentService.inExperiment(JediLSP.experiment))
? LanguageServerType.JediLSP
: LanguageServerType.Jedi;
return LanguageServerType.Jedi;
}
4 changes: 2 additions & 2 deletions src/client/activation/jedi/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class JediLanguageServerManager implements ILanguageServerManager {
constructor(
@inject(IServiceContainer) private readonly serviceContainer: IServiceContainer,
@inject(ILanguageServerAnalysisOptions)
@named(LanguageServerType.JediLSP)
@named(LanguageServerType.Jedi)
private readonly analysisOptions: ILanguageServerAnalysisOptions,
@inject(ICommandManager) commandManager: ICommandManager,
) {
Expand Down Expand Up @@ -144,7 +144,7 @@ export class JediLanguageServerManager implements ILanguageServerManager {
const options = await this.analysisOptions.getAnalysisOptions();
this.middleware = new LanguageClientMiddleware(
this.serviceContainer,
LanguageServerType.JediLSP,
LanguageServerType.Jedi,
() => this.languageServerProxy?.languageClient,
this.lsVersion,
);
Expand Down
2 changes: 1 addition & 1 deletion src/client/activation/languageClientMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class LanguageClientMiddleware extends LanguageClientMiddlewareBase {
) {
super(serviceContainer, serverType, sendTelemetryEvent, serverVersion);

if (serverType === LanguageServerType.None || serverType === LanguageServerType.Jedi) {
if (serverType === LanguageServerType.None) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/client/activation/languageClientMiddlewareBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class LanguageClientMiddlewareBase implements Middleware {
this.eventName = EventName.PYTHON_LANGUAGE_SERVER_REQUEST;
} else if (serverType === LanguageServerType.Node) {
this.eventName = EventName.LANGUAGE_SERVER_REQUEST;
} else if (serverType === LanguageServerType.JediLSP) {
} else if (serverType === LanguageServerType.Jedi) {
this.eventName = EventName.JEDI_LANGUAGE_SERVER_REQUEST;
}
}
Expand Down
5 changes: 1 addition & 4 deletions src/client/activation/languageServer/deprecationPrompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ export class MPLSDeprecationPrompt implements IMPLSDeprecationPrompt {
}

private async switchLanguageServer(lsType: LanguageServerType.Node | LanguageServerType.Jedi): Promise<void> {
let defaultType = this.defaultLanguageServer.defaultLSType;
if (defaultType === LanguageServerType.JediLSP) {
defaultType = LanguageServerType.Jedi;
}
const defaultType = this.defaultLanguageServer.defaultLSType;

// If changing to the default, unset the setting instead of explicitly setting it.
const changeTo = lsType !== defaultType ? lsType : undefined;
Expand Down
20 changes: 7 additions & 13 deletions src/client/activation/serviceRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { DownloadBetaChannelRule, DownloadDailyChannelRule } from './common/down
import { LanguageServerDownloader } from './common/downloader';
import { LanguageServerDownloadChannel } from './common/packageRepository';
import { ExtensionSurveyPrompt } from './extensionSurvey';
import { JediExtensionActivator } from './jedi';
import { JediLanguageServerAnalysisOptions } from './jedi/analysisOptions';
import { JediLanguageClientFactory } from './jedi/languageClientFactory';
import { JediLanguageServerProxy } from './jedi/languageServerProxy';
Expand Down Expand Up @@ -130,34 +129,29 @@ export function registerTypes(serviceManager: IServiceManager, languageServerTyp
ILanguageServerFolderService,
NodeLanguageServerFolderService,
);
} else if (languageServerType === LanguageServerType.JediLSP) {
} else if (languageServerType === LanguageServerType.Jedi) {
serviceManager.add<ILanguageServerActivator>(
ILanguageServerActivator,
JediLanguageServerActivator,
LanguageServerType.JediLSP,
LanguageServerType.Jedi,
);

serviceManager.add<ILanguageServerAnalysisOptions>(
ILanguageServerAnalysisOptions,
JediLanguageServerAnalysisOptions,
LanguageServerType.JediLSP,
LanguageServerType.Jedi,
);

serviceManager.addSingleton<ILanguageClientFactory>(ILanguageClientFactory, JediLanguageClientFactory);
serviceManager.add<ILanguageServerManager>(ILanguageServerManager, JediLanguageServerManager);
serviceManager.add<ILanguageServerProxy>(ILanguageServerProxy, JediLanguageServerProxy);
} else if (languageServerType === LanguageServerType.None) {
serviceManager.add<ILanguageServerActivator>(
ILanguageServerActivator,
NoLanguageServerExtensionActivator,
LanguageServerType.None,
);
}

serviceManager.add<ILanguageServerActivator>(
ILanguageServerActivator,
JediExtensionActivator,
LanguageServerType.Jedi,
); // We fallback to Jedi if for some reason we're unable to use other language servers, hence register this always.
NoLanguageServerExtensionActivator,
LanguageServerType.None,
);

serviceManager.addSingleton<IDownloadChannelRule>(
IDownloadChannelRule,
Expand Down
6 changes: 5 additions & 1 deletion src/client/common/configSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,12 @@ export class PythonSettings implements IPythonSettings {
userLS === 'Default' ||
!Object.values(LanguageServerType).includes(userLS as LanguageServerType)
) {
this.languageServer = this.defaultLS?.defaultLSType ?? LanguageServerType.Jedi;
this.languageServer = this.defaultLS?.defaultLSType ?? LanguageServerType.None;
Copy link
Member

@jakebailey jakebailey Sep 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to remember, but I believe that there was some test that relied on this staying Jedi, some weird case where there can't be a default LS present yet (since the default LS thing is possibly undefined). Maybe after removing old Jedi, this turns out fine.

this.languageServerIsDefault = true;
} else if (userLS === 'JediLSP') {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jakebailey did you mean this settings parser?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly; this is the "untrusted" part where we validate the user's settings before actually casting them to the enum.

// Switch JediLSP option to Jedi.
this.languageServer = LanguageServerType.Jedi;
this.languageServerIsDefault = false;
} else {
this.languageServer = userLS as LanguageServerType;
this.languageServerIsDefault = false;
Expand Down
4 changes: 0 additions & 4 deletions src/client/common/experiments/groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ export enum DeprecatePythonPath {
experiment = 'pythonDeprecatePythonPath',
}

// Experiment to switch Jedi to use an LSP instead of direct providers
export enum JediLSP {
experiment = 'pythonJediLSP',
}
// Experiment to show a prompt asking users to join python mailing list.
export enum JoinMailingListPromptVariants {
variant1 = 'pythonJoinMailingListVar1',
Expand Down
2 changes: 1 addition & 1 deletion src/client/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ export interface IInterpreterPathProxyService {
get(resource: Resource): string;
}

export type DefaultLSType = LanguageServerType.Jedi | LanguageServerType.JediLSP | LanguageServerType.Node;
export type DefaultLSType = LanguageServerType.Jedi | LanguageServerType.Node;

/**
* Interface used to retrieve the default language server.
Expand Down
12 changes: 2 additions & 10 deletions src/client/extensionActivation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@ import { IApplicationEnvironment, ICommandManager } from './common/application/t
import { Commands, PYTHON, PYTHON_LANGUAGE, STANDARD_OUTPUT_CHANNEL, UseProposedApi } from './common/constants';
import { registerTypes as installerRegisterTypes } from './common/installer/serviceRegistry';
import { IFileSystem } from './common/platform/types';
import {
IConfigurationService,
IDisposableRegistry,
IExperimentService,
IExtensions,
IOutputChannel,
} from './common/types';
import { IConfigurationService, IDisposableRegistry, IExtensions, IOutputChannel } from './common/types';
import { noop } from './common/utils/misc';
import { DebuggerTypeName } from './debugger/constants';
import { DebugSessionEventDispatcher } from './debugger/extension/hooks/eventHandlerDispatcher';
Expand Down Expand Up @@ -117,10 +111,8 @@ async function activateLegacy(ext: ExtensionState): Promise<ActivationResult> {
debugConfigurationRegisterTypes(serviceManager);
tensorBoardRegisterTypes(serviceManager);

const experimentService = serviceContainer.get<IExperimentService>(IExperimentService);

const extensions = serviceContainer.get<IExtensions>(IExtensions);
await setDefaultLanguageServer(experimentService, extensions, serviceManager);
await setDefaultLanguageServer(extensions, serviceManager);

const configuration = serviceManager.get<IConfigurationService>(IConfigurationService);
// We should start logging using the log level as soon as possible, so set it as soon as we can access the level.
Expand Down
2 changes: 1 addition & 1 deletion src/client/jupyter/jupyterIntegration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export class JupyterExtensionIntegration {
const interpreter = !isResource(r) ? r : undefined;
const client = await this.languageServerCache.get(resource, interpreter);

// Some language servers don't support the connection yet. (like Jedi until we switch to LSP)
// Some language servers don't support the connection yet.
if (client && client.connection && client.capabilities) {
return {
connection: client.connection,
Expand Down
Loading