|
8 | 8 | import { CodeActionKind, debug, DebugConfigurationProvider, languages, OutputChannel, window } from 'vscode';
|
9 | 9 |
|
10 | 10 | import { registerTypes as activationRegisterTypes } from './activation/serviceRegistry';
|
11 |
| -import { IExtensionActivationManager, ILanguageServerExtension } from './activation/types'; |
| 11 | +import { |
| 12 | + IExtensionActivationManager, |
| 13 | + IExtensionSingleActivationService, |
| 14 | + ILanguageServerExtension |
| 15 | +} from './activation/types'; |
12 | 16 | import { registerTypes as appRegisterTypes } from './application/serviceRegistry';
|
13 | 17 | import { IApplicationDiagnostics } from './application/types';
|
14 | 18 | import { DebugService } from './common/application/debugService';
|
@@ -38,6 +42,7 @@ import { registerTypes as debugConfigurationRegisterTypes } from './debugger/ext
|
38 | 42 | import { IDebugConfigurationService, IDebuggerBanner } from './debugger/extension/types';
|
39 | 43 | import { registerTypes as formattersRegisterTypes } from './formatters/serviceRegistry';
|
40 | 44 | import {
|
| 45 | + IComponentAdapter, |
41 | 46 | IInterpreterLocatorProgressHandler,
|
42 | 47 | IInterpreterLocatorProgressService,
|
43 | 48 | IInterpreterService
|
@@ -153,6 +158,11 @@ async function activateLegacy(ext: ExtensionState): Promise<ActivationResult> {
|
153 | 158 |
|
154 | 159 | // "initialize" "services"
|
155 | 160 |
|
| 161 | + // There's a bug now due to which IExtensionSingleActivationService is only activated in background. |
| 162 | + // However for some cases particularly IComponentAdapter we need to block on activation before rest |
| 163 | + // of the extension is activated. Hence explicitly activate it for now. |
| 164 | + await serviceContainer.get<IExtensionSingleActivationService>(IComponentAdapter).activate(); |
| 165 | + |
156 | 166 | const interpreterManager = serviceContainer.get<IInterpreterService>(IInterpreterService);
|
157 | 167 | interpreterManager.initialize();
|
158 | 168 |
|
|
0 commit comments