Skip to content

Commit edc6ce5

Browse files
committed
Move IPersistentStateFactory registration to registerForIOC
1 parent 85adf80 commit edc6ce5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/client/common/serviceRegistry.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ import { FileDownloader } from './net/fileDownloader';
6565
import { HttpClient } from './net/httpClient';
6666
import { NugetService } from './nuget/nugetService';
6767
import { INugetService } from './nuget/types';
68-
import { PersistentStateFactory } from './persistentState';
6968
import { IS_WINDOWS } from './platform/constants';
7069
import { PathUtils } from './platform/pathUtils';
7170
import { CurrentProcess } from './process/currentProcess';
@@ -105,7 +104,6 @@ import {
105104
IFeatureDeprecationManager,
106105
IInstaller,
107106
IPathUtils,
108-
IPersistentStateFactory,
109107
IRandom,
110108
IsWindows
111109
} from './types';
@@ -120,7 +118,6 @@ export function registerTypes(serviceManager: IServiceManager) {
120118
serviceManager.addSingleton<IInterpreterPathService>(IInterpreterPathService, InterpreterPathService);
121119
serviceManager.addSingleton<IExtensions>(IExtensions, Extensions);
122120
serviceManager.addSingleton<IRandom>(IRandom, Random);
123-
serviceManager.addSingleton<IPersistentStateFactory>(IPersistentStateFactory, PersistentStateFactory);
124121
serviceManager.addSingleton<ITerminalServiceFactory>(ITerminalServiceFactory, TerminalServiceFactory);
125122
serviceManager.addSingleton<IPathUtils>(IPathUtils, PathUtils);
126123
serviceManager.addSingleton<IApplicationShell>(IApplicationShell, ApplicationShell);

src/client/pythonEnvironments/legacyIOC.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
import { injectable } from 'inversify';
55
import * as vscode from 'vscode';
6+
import { PersistentStateFactory } from '../common/persistentState';
7+
import { IPersistentStateFactory } from '../common/types';
68
import { getVersionString, parseVersion } from '../common/utils/version';
79
import {
810
CONDA_ENV_FILE_SERVICE,
@@ -367,5 +369,8 @@ export function registerForIOC(
367369
serviceManager.addSingleton<IInterpreterWatcherBuilder>(IInterpreterWatcherBuilder, InterpreterWatcherBuilder);
368370

369371
serviceManager.addSingletonInstance<IEnvironmentInfoService>(IEnvironmentInfoService, new EnvironmentInfoService());
372+
373+
serviceManager.addSingleton<IPersistentStateFactory>(IPersistentStateFactory, PersistentStateFactory);
374+
370375
initializeExternalDependencies(serviceContainer);
371376
}

0 commit comments

Comments
 (0)