Skip to content
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

Split up the extension activation code into phases. #10454

Closed
ericsnowcurrently opened this issue Mar 6, 2020 · 3 comments
Closed

Split up the extension activation code into phases. #10454

ericsnowcurrently opened this issue Mar 6, 2020 · 3 comments
Labels
area-internal Label for non-user facing issues debt Covers everything internal: CI, testing, refactoring of the codebase, etc. verified Verification succeeded
Milestone

Comments

@ericsnowcurrently
Copy link
Member

ericsnowcurrently commented Mar 6, 2020

Context

The extension's activation hook (per package.json) is the activate() function in src/client/extension.ts. However, it's difficult to tell what is happening there and when. Basically, this function does quite a few things, in roughly the following order:

  1. track startup time
  2. set up the trivial state of the extension
    • globals tracking extension lifecycle
    • DI objects (e.g. ServiceManager)
    • registration of objects with the DI framework
    • simple initialization of the state of those objects (complexity limited to doing things in the right order such that the dependency tree is satisfied)
  3. "activate" some of the objects
    • represents the actual work done during extension activation
    • includes anything more than simple initialization of the state of the extension's objects
    • kinds:
      • synchronous (blocks everything else during ext activation but usually quick)
      • async but must complete before activation is done
      • started in the background (consumers can later wait for the resource to become ready before using it)
      • set up to activate lazily later
    • examples: register VS Code hooks, start background services
  4. send telemetry
  5. set up the extension's public API

The main problems with the status quo are:

  • activate() (and it's subordinates) isn't clearly structured along those lines
  • steps 2 and 3 are quite tangled together
  • a lot of the work is spread out in many different files (making it hard to identify what is actually happening)

Fixing this will help the project in a variety of ways, including making it easier to reduce the extension's startup time.

Solution

We should restructure activate() and the rest of extension.ts along lines of the steps above. At a high-level the following would happen during activation:

  1. start displaying "progress" in the status bar
  2. start a timer
  3. initialize (simple) extension globals
  4. initialize (simple) all our objects
    • initialize DI (e.g. ServiceManager, ServiceContainer)
    • register the objects with DI
      • this could be grouped by sub-graph (e.g. by component)
    • initialize the objects
      • this could be grouped by sub-graph (e.g. by component)
      • this could be done either via registration with DI or separately after
      • the benefit of "separately" is that it makes a clearer distinction between what is relevant to the object graph and what isn't (it would also make it easier to wean the extension off using a DI framework)
  5. activation
  6. stop the timer
  7. stop displaying "progress"
  8. send telemetry
  9. set up the extension's public API

The top-level code would be straightforward and look something like this:

function activate(...) {
    displayProgress(activationDeferred.promise);
    startTimer();

    const ... = initializeExtension(...);
    const ... = await activateComponents(...);

    stopTimer();
    activationDeferred.resolve();

    await sendTelemetry();

    return buildAPI(...);
}

function initializeExtension(...) {
    initializeGlobals(...);
    const ... = initializeDI(...);
    initializeComponents(...);
    return ...;
}

function initializeComponents(...) {
    ...
}

async function activateComponents(...) {
    // XXX Adjust to accomodate dependencies between components?
    return Promise.All(
        ...
        activateEnvs(...),
        ...
        activateLinters(...),
        ...
    );
}

To get there the following must happen in this order:

A. refactor extension.ts as above, with initializeComponents() initially empty and activateComponents() basically the init/activation code currently in activateUnsafe()
B. identify the objects currently involved in activation and where:

  • where are "primary" objects instantiated and injected into DI, relative to current extension activation
  • which of those objects have non-trivial constructors?
  • what other activation is happening, if any, and where?

C. factor DI registration & object init out of existing "activation" code, putting it into initializeComponents()

  • this can be split up into many parallel tasks (by-component, by-file, etc.)
  • requires that no constructors have side effects or do any work (a good idea regardless)
  • will involve digging down through our whole object graph
  • will be a lot easier if we consolidate all the DI registration and simple object init into one module
  • it will probably make sense to organize this by component
  • in some cases it will make sense to pull some of the "activation" code up into extension.ts at the same time

D. (maybe) separate DI registration from object init
E. pull remaining activation code up into extension.ts

  • this can be split up into many parallel tasks (by-component, by-file, etc.)

Open Questions

  • how much code do we pull up into extension.ts (or cohorts)? We want to be sure it's crystal clear what is going on during activation...
  • further split things up?
    • scope:
      • necessary
      • support
      • on-demand
    • components:
      • low-level resources
      • horizontal layers (cross-cutting concerns like Python env mgmt)
      • vertical layers (e.g. linters, debugging)
@ericsnowcurrently ericsnowcurrently added needs PR debt Covers everything internal: CI, testing, refactoring of the codebase, etc. labels Mar 6, 2020
@ericsnowcurrently
Copy link
Member Author

ericsnowcurrently commented Mar 10, 2020

For step B:

Initialization and DI Registration

src/client/extension-init.ts (in initializeGlobals()):

  • IServiceContainer
  • IServiceManager
  • IDisposableRegistry
  • IExtensionContext
  • vscode.Memento (x2)

src/client/extension-activation.ts (in "activateLegacy()"):

  • OutputChannel (x3)
  • external registerTypes() (371)
    • src/client/datascience/serviceRegistry.ts (81)
    • src/client/common/serviceRegistry.ts (54)
    • src/client/interpreter/serviceRegistry.ts (50)
    • src/client/testing/serviceRegistry.ts (44)
    • src/client/activation/serviceRegistry.ts (39)
    • src/client/debugger/extension/serviceRegistry.ts (23)
    • src/client/common/installer/serviceRegistry.ts (15)
    • (indirectly) src/client/application/diagnostics/serviceRegistry.ts (11)
    • src/client/terminals/serviceRegistry.ts (7)
    • src/client/extension-init.ts (6)
    • (indirectly) src/client/testing/navigation/serviceRegistry.ts (6)
    • (indirectly) src/client/common/dotnet/serviceRegistry.ts (5)
    • src/client/common/process/serviceRegistry.ts (4)
    • src/client/linters/serviceRegistry.ts (4)
    • src/client/extension-activation.ts (3)
    • src/client/common/platform/serviceRegistry.ts (3)
    • src/client/common/variables/serviceRegistry.ts (2)
    • src/client/providers/serviceRegistry.ts (2)
    • src/client/application/serviceRegistry.ts (1)
    • src/client/formatters/serviceRegistry.ts (1)
Specifics
  • src/client/extension-activation.ts
    • (jupyterOutputChannel) as IOutputChannel (JUPYTER_OUTPUT_CHANNEL)
    • (standardOutputChannel) as IOutputChannel (STANDARD_OUTPUT_CHANNEL)
    • (unitTestOutChannel) as IOutputChannel (TEST_OUTPUT_CHANNEL)
  • src/client/extension-init.ts
    • (context.subscriptions) as IDisposableRegistry
    • (context) as IExtensionContext
    • (serviceContainer) as IServiceContainer
    • (serviceManager) as IServiceManager
    • (context.globalState) as IMemento (GLOBAL_MEMENTO)
    • (context.workspaceState) as IMemento (WORKSPACE_MEMENTO)
  • src/client/activation/serviceRegistry.ts
    • ExtensionActivationManager (not singleton) as IExtensionActivationManager
    • DotNetLanguageServerActivator (not singleton) as ILanguageServerActivator (LanguageServerType.Microsoft)
    • JediExtensionActivator (not singleton) as ILanguageServerActivator (LanguageServerType.Jedi)
    • NoLanguageServerExtensionActivator (not singleton) as ILanguageServerActivator (LanguageServerType.None)
    • NodeLanguageServerActivator (not singleton) as ILanguageServerActivator (LanguageServerType.Node)
    • LanguageServerAnalysisOptions (not singleton) as ILanguageServerAnalysisOptions
    • DotNetLanguageServerManager (not singleton) as ILanguageServerManager
    • NodeLanguageServerManager (not singleton) as ILanguageServerManager
    • DotNetLanguageServerProxy (not singleton) as ILanguageServerProxy
    • NodeLanguageServerProxy (not singleton) as ILanguageServerProxy
    • ActiveResourceService as IActiveResourceService
    • DownloadBetaChannelRule as IDownloadChannelRule (LanguageServerDownloadChannel.beta)
    • DownloadBetaChannelRule as IDownloadChannelRule (LanguageServerDownloadChannel.stable)
    • DownloadDailyChannelRule as IDownloadChannelRule (LanguageServerDownloadChannel.daily)
    • AATesting as IExtensionSingleActivationService
    • ExtensionSurveyPrompt as IExtensionSingleActivationService
    • DotNetLanguageClientFactory as ILanguageClientFactory
    • NodeLanguageClientFactory as ILanguageClientFactory
    • LanguageServerExtensionActivationService as ILanguageServerCache
    • LanguageServerCompatibilityService as ILanguageServerCompatibilityService
    • LanguageServerDownloader as ILanguageServerDownloader
    • LanguageServerExtension as ILanguageServerExtension
    • DotNetLanguageServerFolderService as ILanguageServerFolderService
    • NodeLanguageServerFolderService as ILanguageServerFolderService
    • LanguageServerOutputChannel as ILanguageServerOutputChannel
    • DotNetLanguageServerPackageService as ILanguageServerPackageService
    • NodeLanguageServerPackageService as ILanguageServerPackageService
    • BetaDotNetLanguageServerPackageRepository as INugetRepository (LanguageServerDownloadChannel.beta)
    • BetaNodeLanguageServerPackageRepository as INugetRepository (LanguageServerDownloadChannel.beta)
    • DailyDotNetLanguageServerPackageRepository as INugetRepository (LanguageServerDownloadChannel.daily)
    • DailyNodeLanguageServerPackageRepository as INugetRepository (LanguageServerDownloadChannel.daily)
    • StableDotNetLanguageServerPackageRepository as INugetRepository (LanguageServerDownloadChannel.stable)
    • StableNodeLanguageServerPackageRepository as INugetRepository (LanguageServerDownloadChannel.stable)
    • PlatformData as IPlatformData
    • DataScienceSurveyBanner as IPythonExtensionBanner (BANNER_NAME_DS_SURVEY)
    • InteractiveShiftEnterBanner as IPythonExtensionBanner (BANNER_NAME_INTERACTIVE_SHIFTENTER)
    • LanguageServerSurveyBanner as IPythonExtensionBanner (BANNER_NAME_LS_SURVEY)
    • ProposeLanguageServerBanner as IPythonExtensionBanner (BANNER_NAME_PROPOSE_LS)
  • src/client/application/diagnostics/serviceRegistry.ts
    • ApplicationDiagnostics as IApplicationDiagnostics
    • DiagnosticFilterService as IDiagnosticFilterService
    • DiagnosticCommandPromptHandlerService as IDiagnosticHandlerService (DiagnosticCommandPromptHandlerServiceId)
    • DiagnosticsCommandFactory as IDiagnosticsCommandFactory
    • EnvironmentPathVariableDiagnosticsService as IDiagnosticsService (EnvironmentPathVariableDiagnosticsServiceId)
    • InvalidLaunchJsonDebuggerService as IDiagnosticsService (InvalidLaunchJsonDebuggerServiceId)
    • InvalidMacPythonInterpreterService as IDiagnosticsService (InvalidMacPythonInterpreterServiceId)
    • InvalidPythonInterpreterService as IDiagnosticsService (InvalidPythonInterpreterServiceId)
    • InvalidPythonPathInDebuggerService as IDiagnosticsService (InvalidPythonPathInDebuggerServiceId)
    • LSNotSupportedDiagnosticService as IDiagnosticsService (LSNotSupportedDiagnosticServiceId)
    • PowerShellActivationHackDiagnosticsService as IDiagnosticsService (PowerShellActivationHackDiagnosticsServiceId)
  • src/client/application/serviceRegistry.ts
    • SourceMapSupportService as ISourceMapSupportService
  • src/client/common/dotnet/serviceRegistry.ts
    • DotNetCompatibilityService as IDotNetCompatibilityService
    • LinuxDotNetCompatibilityService as IOSDotNetCompatibilityService (OSType.Linux)
    • MacDotNetCompatibilityService as IOSDotNetCompatibilityService (OSType.OSX)
    • UnknownOSDotNetCompatibilityService as IOSDotNetCompatibilityService (OSType.Unknown)
    • WindowsDotNetCompatibilityService as IOSDotNetCompatibilityService (OSType.Windows)
  • src/client/common/installer/serviceRegistry.ts
    • InsidersBuildInstaller as IExtensionBuildInstaller (INSIDERS_INSTALLER)
    • StableBuildInstaller as IExtensionBuildInstaller (STABLE_INSTALLER)
    • InstallationChannelManager as IInstallationChannelManager
    • CondaInstaller as IModuleInstaller
    • PipEnvInstaller as IModuleInstaller
    • PipInstaller as IModuleInstaller
    • PoetryInstaller as IModuleInstaller
    • CTagsProductPathService as IProductPathService (ProductType.WorkspaceSymbols)
    • DataScienceProductPathService as IProductPathService (ProductType.DataScience)
    • FormatterProductPathService as IProductPathService (ProductType.Formatter)
    • LinterProductPathService as IProductPathService (ProductType.Linter)
    • RefactoringLibraryProductPathService as IProductPathService (ProductType.RefactoringLibrary)
    • TestFrameworkProductPathService as IProductPathService (ProductType.TestFramework)
    • ProductService as IProductService
    • WebPanelProvider as IWebPanelProvider
  • src/client/common/platform/serviceRegistry.ts
    • FileSystem as IFileSystem
    • PlatformService as IPlatformService
    • RegistryImplementation as IRegistry
  • src/client/common/process/serviceRegistry.ts
    • BufferDecoder as IBufferDecoder
    • ProcessServiceFactory as IProcessServiceFactory
    • PythonExecutionFactory as IPythonExecutionFactory
    • PythonToolExecutionService as IPythonToolExecutionService
  • src/client/common/serviceRegistry.ts
    • ApplicationEnvironment as IApplicationEnvironment
    • ApplicationShell as IApplicationShell
    • AsyncDisposableRegistry as IAsyncDisposableRegistry
    • BrowserService as IBrowserService
    • ClipboardService as IClipboard
    • CommandManager as ICommandManager
    • ConfigurationService as IConfigurationService
    • CryptoUtils as ICryptoUtils
    • CurrentProcess as ICurrentProcess
    • CustomEditorService as ICustomEditorService
    • DebugService as IDebugService
    • DocumentManager as IDocumentManager
    • EditorUtils as IEditorUtils
    • ExperimentsManager as IExperimentsManager
    • ExtensionInsidersDailyChannelRule as IExtensionChannelRule (ExtensionChannel.daily)
    • ExtensionInsidersOffChannelRule as IExtensionChannelRule (ExtensionChannel.off)
    • ExtensionInsidersWeeklyChannelRule as IExtensionChannelRule (ExtensionChannel.weekly)
    • ExtensionChannelService as IExtensionChannelService
    • DebugSessionTelemetry as IExtensionSingleActivationService
    • InsidersExtensionService as IExtensionSingleActivationService
    • ReloadVSCodeCommandHandler as IExtensionSingleActivationService
    • Extensions as IExtensions
    • FeatureDeprecationManager as IFeatureDeprecationManager
    • FileDownloader as IFileDownloader
    • HttpClient as IHttpClient
    • ImportTracker as IImportTracker
    • InsidersExtensionPrompt as IInsiderExtensionPrompt
    • ProductInstaller as IInstaller
    • LanguageService as ILanguageService
    • LiveShareApi as ILiveShareApi
    • MultiStepInputFactory as IMultiStepInputFactory
    • NugetService as INugetService
    • PathUtils as IPathUtils
    • PersistentStateFactory as IPersistentStateFactory
    • ProcessLogger as IProcessLogger
    • Random as IRandom
    • SettingsShellDetector as IShellDetector
    • TerminalNameShellDetector as IShellDetector
    • UserEnvironmentShellDetector as IShellDetector
    • VSCEnvironmentShellDetector as IShellDetector
    • Bash as ITerminalActivationCommandProvider (TerminalActivationProviders.bashCShellFish)
    • CommandPromptAndPowerShell as ITerminalActivationCommandProvider (TerminalActivationProviders.commandPromptAndPowerShell)
    • CondaActivationCommandProvider as ITerminalActivationCommandProvider (TerminalActivationProviders.conda)
    • PipEnvActivationCommandProvider as ITerminalActivationCommandProvider (TerminalActivationProviders.pipenv)
    • PyEnvActivationCommandProvider as ITerminalActivationCommandProvider (TerminalActivationProviders.pyenv)
    • PowershellTerminalActivationFailedHandler as ITerminalActivationHandler
    • TerminalActivator as ITerminalActivator
    • TerminalHelper as ITerminalHelper
    • TerminalManager as ITerminalManager
    • TerminalServiceFactory as ITerminalServiceFactory
    • WorkspaceService as IWorkspaceService
    • (IS_WINDOWS) as IsWindows
  • src/client/common/variables/serviceRegistry.ts
    • EnvironmentVariablesProvider as IEnvironmentVariablesProvider
    • EnvironmentVariablesService as IEnvironmentVariablesService
  • src/client/datascience/serviceRegistry.ts
    • CellHashLogger (not singleton) as ICellHashLogger (undefined)
    • CellHashProvider (not singleton) as ICellHashProvider
    • CodeWatcher (not singleton) as ICodeWatcher
    • DataScienceErrorHandler (not singleton) as IDataScienceErrorHandler
    • DataViewer (not singleton) as IDataViewer
    • GatherLogger (not singleton) as IGatherLogger (undefined)
    • gather.GatherProvider (not singleton) as IGatherProvider
    • InteractiveWindow (not singleton) as IInteractiveWindow
    • AutoSaveService (not singleton) as IInteractiveWindowListener
    • DebugListener (not singleton) as IInteractiveWindowListener
    • GatherListener (not singleton) as IInteractiveWindowListener
    • IntellisenseProvider (not singleton) as IInteractiveWindowListener
    • LinkProvider (not singleton) as IInteractiveWindowListener
    • ShowPlotListener (not singleton) as IInteractiveWindowListener
    • JupyterCommandFactory (not singleton) as IJupyterCommandFactory
    • NativeEditor (not singleton) as INotebookEditor
    • NativeEditorOldWebView (not singleton) as INotebookEditor
    • JupyterExporter (not singleton) as INotebookExporter
    • JupyterImporter (not singleton) as INotebookImporter
    • JupyterServerWrapper (not singleton) as INotebookServer
    • NativeEditorStorage (not singleton) as INotebookStorage
    • PlotViewer (not singleton) as IPlotViewer
    • ActiveEditorContextService as ActiveEditorContextService
    • CellOutputMimeTypeTracker as CellOutputMimeTypeTracker (undefined)
    • CommandRegistry as CommandRegistry
    • DataViewerDependencyService as DataViewerDependencyService
    • CodeCssGenerator as ICodeCssGenerator
    • CodeLensFactory as ICodeLensFactory (undefined)
    • DataScience as IDataScience
    • DataScienceCodeLensProvider as IDataScienceCodeLensProvider
    • InteractiveWindowCommandListener as IDataScienceCommandListener
    • NativeEditorCommandListener as IDataScienceCommandListener
    • DataViewerProvider as IDataViewerProvider
    • DebugLocationTrackerFactory as IDebugLocationTracker
    • Activation as IExtensionSingleActivationService
    • Decorator as IExtensionSingleActivationService
    • JupyterInterpreterSelectionCommand as IExtensionSingleActivationService
    • PreWarmActivatedJupyterEnvironmentVariables as IExtensionSingleActivationService
    • ServerPreload as IExtensionSingleActivationService
    • ServerPreload as IExtensionSingleActivationService
    • ServerPreload as IExtensionSingleActivationService
    • DataScienceSurveyBannerLogger as IInteractiveWindowListener
    • InteractiveWindowProvider as IInteractiveWindowProvider
    • JupyterDebugger as IJupyterDebugger (undefined)
    • JupyterExecutionFactory as IJupyterExecution
    • JupyterCommandInterpreterDependencyService as IJupyterInterpreterDependencyManager
    • JupyterInterpreterSubCommandExecutionService as IJupyterInterpreterDependencyManager
    • JupyterPasswordConnect as IJupyterPasswordConnect
    • JupyterSessionManagerFactory as IJupyterSessionManagerFactory
    • JupyterCommandFinderInterpreterExecutionService as IJupyterSubCommandExecutionService
    • JupyterInterpreterSubCommandExecutionService as IJupyterSubCommandExecutionService
    • JupyterVariables as IJupyterVariables
    • NativeEditorProvider as INotebookEditorProvider
    • NativeEditorProviderOld as INotebookEditorProvider
    • PlotViewerProvider as IPlotViewerProvider
    • StatusProvider as IStatusProvider
    • ThemeFinder as IThemeFinder
    • JupyterCommandFinder as JupyterCommandFinder
    • JupyterCommandLineSelector as JupyterCommandLineSelector
    • JupyterCommandLineSelectorCommand as JupyterCommandLineSelectorCommand
    • JupyterInterpreterDependencyService as JupyterInterpreterDependencyService
    • JupyterInterpreterOldCacheStateStore as JupyterInterpreterOldCacheStateStore
    • JupyterInterpreterSelector as JupyterInterpreterSelector
    • JupyterInterpreterService as JupyterInterpreterService
    • JupyterInterpreterStateStore as JupyterInterpreterStateStore
    • JupyterServerSelector as JupyterServerSelector
    • JupyterServerSelectorCommand as JupyterServerSelectorCommand
    • KernelSelectionProvider as KernelSelectionProvider
    • KernelSelector as KernelSelector
    • KernelService as KernelService
    • KernelSwitcher as KernelSwitcher
    • KernelSwitcherCommand as KernelSwitcherCommand
    • NotebookStarter as NotebookStarter
    • ProgressReporter as ProgressReporter
    • (useCustomEditorApi) as UseCustomEditorApi
  • src/client/debugger/debugAdapter/serviceRegistry.ts
    • ProtocolParser (not singleton) as IProtocolParser
    • BufferDecoder as IBufferDecoder
    • CurrentProcess as ICurrentProcess
    • DebugStreamProvider as IDebugStreamProvider
    • DebuggerProcessServiceFactory as IProcessServiceFactory
    • ProtocolLogger as IProtocolLogger
    • ProtocolMessageWriter as IProtocolMessageWriter
    • SocketServer as ISocketServer
    • ([]) as IDisposableRegistry
    • (serviceContainer) as IServiceContainer
  • src/client/debugger/extension/serviceRegistry.ts
    • AttachProcessProviderFactory as IAttachProcessProviderFactory
    • ChildProcessAttachService as IChildProcessAttachService
    • DebugAdapterDescriptorFactory as IDebugAdapterDescriptorFactory
    • DjangoLaunchDebugConfigurationProvider as IDebugConfigurationProvider (DebugConfigurationType.launchDjango)
    • FileLaunchDebugConfigurationProvider as IDebugConfigurationProvider (DebugConfigurationType.launchFile)
    • FlaskLaunchDebugConfigurationProvider as IDebugConfigurationProvider (DebugConfigurationType.launchFlask)
    • ModuleLaunchDebugConfigurationProvider as IDebugConfigurationProvider (DebugConfigurationType.launchModule)
    • PidAttachDebugConfigurationProvider as IDebugConfigurationProvider (DebugConfigurationType.pidAttach)
    • PyramidLaunchDebugConfigurationProvider as IDebugConfigurationProvider (DebugConfigurationType.launchPyramid)
    • RemoteAttachDebugConfigurationProvider as IDebugConfigurationProvider (DebugConfigurationType.remoteAttach)
    • DebugConfigurationProviderFactory as IDebugConfigurationProviderFactory
    • AttachConfigurationResolver as IDebugConfigurationResolver ('attach')
    • LaunchConfigurationResolver as IDebugConfigurationResolver ('launch')
    • PythonDebugConfigurationService as IDebugConfigurationService
    • DebugEnvironmentVariablesHelper as IDebugEnvironmentVariablesService
    • ChildProcessAttachEventHandler as IDebugSessionEventHandlers
    • DebugSessionLoggingFactory as IDebugSessionLoggingFactory
    • DebuggerBanner as IDebuggerBanner
    • DebugAdapterActivator as IExtensionSingleActivationService
    • LaunchJsonCompletionProvider as IExtensionSingleActivationService
    • LaunchJsonUpdaterService as IExtensionSingleActivationService
    • LaunchDebugConfigurationExperiment as ILaunchDebugConfigurationResolverExperiment
    • OutdatedDebuggerPromptFactory as IOutdatedDebuggerPromptFactory
  • src/client/formatters/serviceRegistry.ts
    • FormatterHelper as IFormatterHelper
  • src/client/interpreter/serviceRegistry.ts
    • WorkspaceVirtualEnvWatcherService (not singleton) as IInterpreterWatcher (WORKSPACE_VIRTUAL_ENV_SERVICE)
    • CondaService as ICondaService
    • EnvironmentActivationService as EnvironmentActivationService
    • EnvironmentActivationService as IEnvironmentActivationService
    • TerminalEnvironmentActivationService as TerminalEnvironmentActivationService
    • CondaInheritEnvPrompt as IExtensionActivationService
    • VirtualEnvironmentPrompt as IExtensionActivationService
    • InterpreterSelectionTip as IExtensionSingleActivationService
    • PreWarmActivatedEnvironmentVariables as IExtensionSingleActivationService
    • CachedInterpretersAutoSelectionRule as IInterpreterAutoSelectionRule (AutoSelectionRule.cachedInterpreters)
    • CurrentPathInterpretersAutoSelectionRule as IInterpreterAutoSelectionRule (AutoSelectionRule.currentPath)
    • SettingsInterpretersAutoSelectionRule as IInterpreterAutoSelectionRule (AutoSelectionRule.settings)
    • SystemWideInterpretersAutoSelectionRule as IInterpreterAutoSelectionRule (AutoSelectionRule.systemWide)
    • WindowsRegistryInterpretersAutoSelectionRule as IInterpreterAutoSelectionRule (AutoSelectionRule.windowsRegistry)
    • WorkspaceVirtualEnvInterpretersAutoSelectionRule as IInterpreterAutoSelectionRule (AutoSelectionRule.workspaceVirtualEnvs)
    • InterpreterAutoSelectionService as IInterpreterAutoSelectionService
    • InterpreterAutoSeletionProxyService as IInterpreterAutoSeletionProxyService
    • InterpreterComparer as IInterpreterComparer
    • InterpreterDisplay as IInterpreterDisplay
    • InterpreterHelper as IInterpreterHelper
    • InterpreterLocatorHelper as IInterpreterLocatorHelper
    • InterpreterLocatorProgressStatubarHandler as IInterpreterLocatorProgressHandler
    • InterpreterLocatorProgressService as IInterpreterLocatorProgressService
    • CondaEnvFileService as IInterpreterLocatorService (CONDA_ENV_FILE_SERVICE)
    • CondaEnvService as IInterpreterLocatorService (CONDA_ENV_SERVICE)
    • CurrentPathService as IInterpreterLocatorService (CURRENT_PATH_SERVICE)
    • GlobalVirtualEnvService as IInterpreterLocatorService (GLOBAL_VIRTUAL_ENV_SERVICE)
    • KnownPathsService as IInterpreterLocatorService (KNOWN_PATH_SERVICE)
    • PipEnvService as IInterpreterLocatorService (PIPENV_SERVICE)
    • PythonInterpreterLocatorService as IInterpreterLocatorService (INTERPRETER_LOCATOR_SERVICE)
    • WindowsRegistryService as IInterpreterLocatorService (WINDOWS_REGISTRY_SERVICE)
    • WorkspaceVirtualEnvService as IInterpreterLocatorService (WORKSPACE_VIRTUAL_ENV_SERVICE)
    • PipEnvService as IPipEnvService
    • InterpreterSelector as IInterpreterSelector
    • InterpreterService as IInterpreterService
    • InterpreterVersionService as IInterpreterVersionService
    • InterpreterWatcherBuilder as IInterpreterWatcherBuilder
    • KnownSearchPathsForInterpreters as IKnownSearchPathsForInterpreters
    • PipEnvServiceHelper as IPipEnvServiceHelper
    • PythonInPathCommandProvider as IPythonInPathCommandProvider
    • PythonPathUpdaterServiceFactory as IPythonPathUpdaterServiceFactory
    • PythonPathUpdaterService as IPythonPathUpdaterServiceManager
    • ShebangCodeLensProvider as IShebangCodeLensProvider
    • VirtualEnvironmentManager as IVirtualEnvironmentManager
    • GlobalVirtualEnvironmentsSearchPathProvider as IVirtualEnvironmentsSearchPathProvider ('global')
    • WorkspaceVirtualEnvironmentsSearchPathProvider as IVirtualEnvironmentsSearchPathProvider ('workspace')
    • InterpeterHashProviderFactory as InterpeterHashProviderFactory
    • InterpreterFilter as InterpreterFilter
    • InterpreterHashProvider as InterpreterHashProvider
    • WindowsStoreInterpreter as WindowsStoreInterpreter
  • src/client/linters/serviceRegistry.ts
    • AvailableLinterActivator (not singleton) as IAvailableLinterActivator
    • LinterProvider as IExtensionActivationService
    • LinterManager as ILinterManager
    • LintingEngine as ILintingEngine
  • src/client/providers/serviceRegistry.ts
    • CodeActionProviderService as IExtensionSingleActivationService
    • SortImportsEditingProvider as ISortImportsEditingProvider
  • src/client/terminals/serviceRegistry.ts
    • CodeExecutionHelper as ICodeExecutionHelper
    • CodeExecutionManager as ICodeExecutionManager
    • DjangoShellCodeExecutionProvider as ICodeExecutionService ('djangoShell')
    • ReplProvider as ICodeExecutionService ('repl')
    • TerminalCodeExecutionProvider as ICodeExecutionService ('standard')
    • ExtensionActivationForTerminalActivation as IExtensionSingleActivationService
    • TerminalAutoActivation as ITerminalAutoActivation
  • src/client/testing/navigation/serviceRegistry.ts
    • TestFileSymbolProvider as IDocumentSymbolProvider ('test')
    • TestFileCodeNavigator as ITestCodeNavigator (NavigableItemType.testFile)
    • TestFunctionCodeNavigator as ITestCodeNavigator (NavigableItemType.testFunction)
    • TestSuiteCodeNavigator as ITestCodeNavigator (NavigableItemType.testSuite)
    • TestCodeNavigatorCommandHandler as ITestCodeNavigatorCommandHandler
    • TestNavigatorHelper as ITestNavigatorHelper
  • src/client/testing/serviceRegistry.ts
    • ArgumentsHelper (not singleton) as IArgumentsHelper
    • NoseTestArgumentsService (not singleton) as IArgumentsService (NOSETEST_PROVIDER)
    • PyTestArgumentsService (not singleton) as IArgumentsService (PYTEST_PROVIDER)
    • UnitTestArgumentsService (not singleton) as IArgumentsService (UNITTEST_PROVIDER)
    • TestDiscoveredTestParser (not singleton) as ITestDiscoveredTestParser
    • NoseTestDiscoveryService (not singleton) as ITestDiscoveryService (NOSETEST_PROVIDER)
    • PytestTestDiscoveryService (not singleton) as ITestDiscoveryService (PYTEST_PROVIDER)
    • TestsDiscoveryService (not singleton) as ITestDiscoveryService ('common')
    • UnitTestTestDiscoveryService (not singleton) as ITestDiscoveryService (UNITTEST_PROVIDER)
    • NoseTestManagerRunner (not singleton) as ITestManagerRunner (NOSETEST_PROVIDER)
    • PytestManagerRunner (not singleton) as ITestManagerRunner (PYTEST_PROVIDER)
    • UnitTestTestManagerRunner (not singleton) as ITestManagerRunner (UNITTEST_PROVIDER)
    • TestResultsService (not singleton) as ITestResultsService
    • TestRunner (not singleton) as ITestRunner
    • TestFlatteningVisitor (not singleton) as ITestVisitor ('TestFlatteningVisitor')
    • TestResultResetVisitor (not singleton) as ITestVisitor ('TestResultResetVisitor')
    • TestsHelper (not singleton) as ITestsHelper
    • NoseTestTestsParser (not singleton) as ITestsParser (NOSETEST_PROVIDER)
    • UnitTestTestsParser (not singleton) as ITestsParser (UNITTEST_PROVIDER)
    • UnitTestHelper (not singleton) as IUnitTestHelper
    • UnitTestSocketServer (not singleton) as IUnitTestSocketServer
    • XUnitParser (not singleton) as IXUnitParser
    • => ITestManager
    • => ITestManagerService
    • UpdateTestSettingService as IExtensionActivationService
    • EnablementTracker as IExtensionSingleActivationService
    • FailedTestHandler as IExtensionSingleActivationService
    • TreeViewService as IExtensionSingleActivationService
    • TestCollectionStorageService as ITestCollectionStorageService
    • TestConfigSettingsService as ITestConfigSettingsService
    • TestConfigurationManagerFactory as ITestConfigurationManagerFactory
    • UnitTestConfigurationService as ITestConfigurationService
    • TestContextService as ITestContextService
    • TestTreeViewProvider as ITestDataItemResource
    • DebugLauncher as ITestDebugLauncher
    • UnitTestDiagnosticService as ITestDiagnosticService
    • TestDisplay as ITestDisplay
    • TestExplorerCommandHandler as ITestExplorerCommandHandler
    • UnitTestManagementService as ITestManagementService
    • TestMessageService as ITestMessageService (PYTEST_PROVIDER)
    • TestResultDisplay as ITestResultDisplay
    • TestTreeViewProvider as ITestTreeViewProvider
    • TestsStatusUpdaterService as ITestsStatusUpdaterService
    • WorkspaceTestManagerService as IWorkspaceTestManagerService

Initialization Only

src/client/extension-activation.ts (in "activateLegacy()"):

  • DebugSessionEventDispatcher
  • LinterCommands
  • PythonFormattingEditProvider
  • ReplProvider
  • TerminalProvider
  • PythonCodeActionProvider

Non-Trivial Constructors

See the next comment.

Other Activation

src/client/extension-activation.ts (in "activateLegacy()"):

  • ExperimentsManager.activate()
  • IInterpreterSelector.initialize()
  • IInterpreterService.initialize()
  • DebugSessionEventDispatcher.registerEventHandlers()
  • ICommandManager.registerCommand()
  • IInterpreterLocatorProgressHandler.register()
  • IInterpreterLocatorProgressService.register()
  • IApplicationDiagnostics.register()
  • ITestCodeNavigatorCommandHandler.register()
  • ITestExplorerCommandHandler.register()
  • ILanguageServerExtension.register()
  • ITestContextService.register()
  • IExtensionActivationManager.activate()
  • ITerminalAutoActivation.register()
  • activateSimplePythonRefactorProvider() (from src/client/providers/simpleRefactorProvider)
  • ISortImportsEditingProvider.registerCommands()
  • ICodeExecutionManager.registerCommands()
  • IInterpreterService.refresh()
  • IDataScience.activate()
  • new LinterCommands()
  • languages.setLanguageConfiguration()
  • languages.registerDocumentFormattingEditProvider()
  • languages.registerDocumentRangeFormattingEditProvider()
  • IFeatureDeprecationManager.initialize()
  • new ReplProvider()
  • TerminalProvider.initialize()
  • languages.registerCodeActionsProvider()
  • debug.registerDebugConfigurationProvider()
  • IDebuggerBanner.initialize()

ericsnowcurrently added a commit that referenced this issue Mar 11, 2020
(for #10454)

This is the basic prep work for making the flow of extension activation more clear.
@ericsnowcurrently
Copy link
Member Author

non-trivial constructors:

~96 total, grouped very roughly:

  • only registers disposable
    • src/client/application/diagnostics/base.ts
      • BaseDiagnosticsService
    • src/client/terminals/activation.ts
      • TerminalAutoActivation
    • src/client/testing/common/services/storageService.ts
      • TestCollectionStorageService
    • src/client/testing/common/services/workspaceTestManagerService.ts
      • WorkspaceTestManagerService
    • src/client/testing/explorer/failedTestHandler.ts
      • FailedTestHandler
    • src/client/testing/explorer/treeView.ts
      • TreeViewService
    • src/client/testing/main.ts
      • UnitTestManagementService
    • src/client/testing/navigation/commandHandler.ts
      • TestCodeNavigatorCommandHandler
    • src/client/testing/unittest/runner.ts
      • TestManagerRunner
    • src/client/common/terminal/service.ts
      • TerminalService
  • only creates deferred
    • src/client/activation/languageServer/languageServerProxy.ts
      • DotNetLanguageServerProxy
    • src/client/activation/node/languageServerProxy.ts
      • NodeLanguageServerProxy
    • src/client/interpreter/locators/index.ts
      • PythonInterpreterLocatorService
    • src/client/interpreter/locators/services/cacheableLocatorService.ts
      • CacheableLocatorService
    • src/client/common/net/socket/socketServer.ts
      • SocketServer
  • small ops (incl. register hooks)
    • src/client/activation/activationService.ts
      • LanguageServerExtensionActivationService
    • src/client/activation/common/downloader.ts
      • LanguageServerDownloader
    • src/client/activation/languageServer/analysisOptions.ts
      • LanguageServerAnalysisOptions
    • src/client/application/diagnostics/checks/macPythonInterpreter.ts
      • InvalidMacPythonInterpreterService
    • src/client/telemetry/importTracker.ts
      • ImportTracker
    • src/client/terminals/activation.ts
      • ExtensionActivationForTerminalActivation
    • src/client/interpreter/activation/service.ts
      • EnvironmentActivationService
    • src/client/interpreter/activation/wrapperEnvironmentActivationService.ts
      • WrapperEnvironmentActivationService
    • src/client/interpreter/display/shebangCodeLensProvider.ts
      • ShebangCodeLensProvider
    • src/client/interpreter/locators/services/condaService.ts
      • CondaService
    • src/client/interpreter/locators/services/workspaceVirtualEnvWatcherService.ts
      • WorkspaceVirtualEnvWatcherService
    • src/client/common/application/debugSessionTelemetry.ts
      • DebugSessionTelemetry
    • src/client/common/insidersBuild/downloadChannelService.ts
      • ExtensionChannelService
    • src/client/common/platform/fileSystem.ts
      • FileSystem
    • src/client/common/terminal/helper.ts
      • TerminalHelper
  • "big" ops
    • src/client/activation/node/languageServerPackageRepository.ts
      • StableNodeLanguageServerPackageRepository
      • BetaNodeLanguageServerPackageRepository
      • DailyNodeLanguageServerPackageRepository
    • src/client/languageServices/languageServerSurveyBanner.ts
      • LanguageServerSurveyBanner
    • src/client/languageServices/proposeLanguageServerBanner.ts
      • ProposeLanguageServerBanner
    • src/client/linters/linterManager.ts
      • LinterManager
    • src/client/linters/lintingEngine.ts
      • LintingEngine
    • src/client/terminals/codeExecution/djangoContext.ts
      • DjangoContextInitializer
    • src/client/terminals/codeExecution/djangoShellCodeExecution.ts
      • DjangoShellCodeExecutionProvider
    • src/client/debugger/extension/adapter/outdatedDebuggerPrompt.ts
      • OutdatedDebuggerPromptFactory
    • src/client/interpreter/autoSelection/index.ts
      • InterpreterAutoSelectionService
    • src/client/interpreter/autoSelection/rules/baseRule.ts
      • BaseRuleService
    • src/client/interpreter/display/index.ts
      • InterpreterDisplay
    • src/client/interpreter/display/interpreterSelectionTip.ts
      • InterpreterSelectionTip
    • src/client/interpreter/locators/services/pipEnvServiceHelper.ts
      • PipEnvServiceHelper
    • src/client/testing/display/main.ts
      • TestResultDisplay
    • src/client/testing/explorer/testTreeViewProvider.ts
      • TestTreeViewProvider
    • src/client/common/insidersBuild/insidersExtensionPrompt.ts
      • InsidersExtensionPrompt
    • src/client/common/net/httpClient.ts
      • HttpClient
    • src/client/common/platform/platformService.ts
      • PlatformService
Details
#################################################

src/client/activation/aaTesting.ts
   + AATesting
      * .activate() - send telemetry
src/client/activation/activationManager.ts
   + ExtensionActivationManager
      * .activate()
         * register "onWorkspaceFoldersChanged" handler
         * register "onDidOpenTextDocument" handler
         * call ".activate()" on each registered IExtensionSingleActivationService
         * "activate" the workspace
         * auto-select the interpreter
         * register disposables
src/client/activation/activationService.ts
   - LanguageServerExtensionActivationService
      * constructor
         * register "ws.onDidChangeConfiguration" handler
         * register "onDidChangeWorkspaceFolders" handler
         * register "onDidChangeInterpreter" handler
         * register "ClearAnalysisCache" command
         * register disposables
      * .activate()
         * deactivate any lingering old server
         * start language server
         * force a reconnect
#src/client/activation/common/activatorBase.ts
#   + LanguageServerActivatorBase
#      * .activate()
#         * connect to the manager
#      * .start()
#         * check availability
#         * start the manager
src/client/activation/common/downloadChannelRules.ts
   + DownloadDailyChannelRule
   + DownloadStableChannelRule
   + DownloadBetaChannelRule
src/client/activation/common/downloader.ts
   - LanguageServerDownloader
      * constructor
         * looks up the raw output channel
src/client/activation/common/languageServerFolderService.ts
   + LanguageServerFolderService
src/client/activation/common/languageServerPackageService.ts
   + LanguageServerPackageService
src/client/activation/common/packageRepository.ts
   + StableLanguageServerPackageRepository
   + BetaLanguageServerPackageRepository
   + DailyLanguageServerPackageRepository
src/client/activation/extensionSurvey.ts
   + ExtensionSurveyPrompt
      * .activate()
         * send telemetry
         * show banner
src/client/activation/jedi.ts
   + JediExtensionActivator
      * .start()
         * create JediFactory
         * create providers
         * activate ITestManagementService
      * .activate()
         * register goToPythonObject command
         * register VS Code hooks (providers)
src/client/activation/languageServer/activator.ts
   + DotNetLanguageServerActivator
src/client/activation/languageServer/analysisOptions.ts
   - LanguageServerAnalysisOptions
      * constructor
         * looks up the raw output channel
src/client/activation/languageServer/languageClientFactory.ts
   + DotNetLanguageClientFactory
src/client/activation/languageServer/languageServerCompatibilityService.ts
   + LanguageServerCompatibilityService
src/client/activation/languageServer/languageServerExtension.ts
   + LanguageServerExtension
      * .register()
         * register "load extension" command
src/client/activation/languageServer/languageServerFolderService.ts
   + DotNetLanguageServerFolderService
src/client/activation/languageServer/languageServerPackageRepository.ts
   + StableDotNetLanguageServerPackageRepository
   + BetaDotNetLanguageServerPackageRepository
   + DailyDotNetLanguageServerPackageRepository
src/client/activation/languageServer/languageServerPackageService.ts
   + DotNetLanguageServerPackageService
src/client/activation/languageServer/languageServerProxy.ts
   - DotNetLanguageServerProxy
      * constructor
         * creates a deferred
      * .start()
         * create LS client
         * start LS client
         * wait for server
         * show progress
         * send telemetry
         * register "test" services
src/client/activation/languageServer/manager.ts
   + DotNetLanguageServerManager
      * .start()
         * register "the" command handler
         * register "analysisOptions.onDidChange" handler
         * "initialize analysisOptions
         * start language server
src/client/activation/languageServer/outputChannel.ts
   + LanguageServerOutputChannel
src/client/activation/languageServer/platformData.ts
   + PlatformData
src/client/activation/node/activator.ts
   + NodeLanguageServerActivator
src/client/activation/node/languageClientFactory.ts
   + NodeLanguageClientFactory
src/client/activation/node/languageServerFolderService.ts
   + NodeLanguageServerFolderService
src/client/activation/node/languageServerPackageRepository.ts
   - StableNodeLanguageServerPackageRepository
      * constructor
         * get config
   - BetaNodeLanguageServerPackageRepository
      * constructor
         * get config
   - DailyNodeLanguageServerPackageRepository
      * constructor
         * get config
src/client/activation/node/languageServerPackageService.ts
   + NodeLanguageServerPackageService
src/client/activation/node/languageServerProxy.ts
   - NodeLanguageServerProxy
      * constructor
         * creates a deferred
      * .start()
         * create LS client
         * start LS client
         * wait for server
         * show progress
         * send telemetry
         * register "test" services
src/client/activation/node/manager.ts
   + NodeLanguageServerManager
      * .start()
         * register "analysisOptions.onDidChange" handler
         * "initialize analysisOptions
         * start language server
src/client/activation/none/activator.ts
   + NoLanguageServerExtensionActivator
      * .start() (noop)
      * .activate() (noop)


#################################################

src/client/application/diagnostics/applicationDiagnostics.ts
   + ApplicationDiagnostics
      * .register()
         * ISourceMapSupportService.register()
src/client/application/diagnostics/base.ts
   + BaseDiagnostic
   - BaseDiagnosticsService
      * constructor
         * register disposable
src/client/application/diagnostics/checks/envPathVariable.ts
   + EnvironmentPathVariableDiagnosticsService
src/client/application/diagnostics/checks/invalidLaunchJsonDebugger.ts
   + InvalidLaunchJsonDebuggerService
src/client/application/diagnostics/checks/invalidPythonPathInDebugger.ts
   + InvalidPythonPathInDebuggerService
src/client/application/diagnostics/checks/macPythonInterpreter.ts
   - InvalidMacPythonInterpreterService
      * constructor
         * add onChange handler for "python.pythonPath"
src/client/application/diagnostics/checks/powerShellActivation.ts
   + PowerShellActivationHackDiagnosticsService
src/client/application/diagnostics/checks/pythonInterpreter.ts
   + InvalidPythonInterpreterService
src/client/application/diagnostics/commands/factory.ts
   + DiagnosticsCommandFactory
src/client/application/diagnostics/filter.ts
   + DiagnosticFilterService
src/client/application/diagnostics/promptHandler.ts
   + DiagnosticCommandPromptHandlerService
src/client/application/diagnostics/surceMapSupportService.ts
   + SourceMapSupportService
      * .register()
         * register command


#################################################

src/client/formatters/helper.ts
   + FormatterHelper


#################################################

src/client/languageServices/languageServerSurveyBanner.ts
   - LanguageServerSurveyBanner
      * constructor
         * maybe disable
      * .initialize()
         * maybe disable
src/client/languageServices/proposeLanguageServerBanner.ts
   - ProposeLanguageServerBanner
      * constructor
         * maybe disable
      * .initialize()
         * maybe disable


#################################################

src/client/linters/linterAvailability.ts
   + AvailableLinterActivator
src/client/linters/linterManager.ts
   - LinterManager
      * constructor
         * build a bunch of LinterInfo objects (which use the config)
src/client/linters/lintingEngine.ts
   - LintingEngine
      * constructor
         * build diagnostic collection


#################################################

src/client/providers/codeActionProvider/main.ts
   + CodeActionProviderService
      * .activate()
         * languages.registerCodeActionsProvider()
src/client/providers/importSortProvider.ts
   + SortImportsEditingProvider
src/client/providers/linterProvider.ts
   + LinterProvider
      * .activate()
         * register onDidChangeInterpreter handler
         * register onDidOpenTextDocument handler
         * register onDidCloseTextDocument handler
         * register onDidSaveTextDocument handler
         * register onDidChangeConfiguration handler
         * register disposables
         * schedule an initial linting pass


#################################################

src/client/telemetry/importTracker.ts
   - ImportTracker
      * constructor
         * register onDidOpenTextDocument handler
         * register onDidSaveTextDocument handler
         * register onDidOpenNotebookEditor handler
         * register onDidCloseNotebookEditor handler
      * .activate()
         * trigger onDidOpen() for all open editors


#################################################

src/client/terminals/activation.ts
   - ExtensionActivationForTerminalActivation
      * constructor
         * register extensions.onDidChange handler
         * register disposables
      * .activate()
         * check code runner extension
         * set "python.showPlayIcon" context
         * send telemetry
   - TerminalAutoActivation
      * constructor
         * register disposables
      * .register()
         * register onDidOpenTerminal handler
src/client/terminals/codeExecution/codeExecutionManager.ts
   + CodeExecutionManager
      * .registerCommands()
         * register exec-in-terminal command
         * register exec-in-terminal-icon command
         * register exec-selection-in-terminal command
         * register exec-selection-in-django-shell command
         * register disposables
src/client/terminals/codeExecution/djangoContext.ts
   - DjangoContextInitializer
      * constructor
         * ensure context state
         * register onDidChangeWorkspaceFolders handler
         * register disposables
src/client/terminals/codeExecution/djangoShellCodeExecution.ts
   - DjangoShellCodeExecutionProvider
      * constructor
         * create DjangoContextInitializer
         * register disposables
src/client/terminals/codeExecution/helper.ts
   + CodeExecutionHelper
src/client/terminals/codeExecution/repl.ts
   + ReplProvider
src/client/terminals/codeExecution/terminalCodeExecution.ts
   + TerminalCodeExecutionProvider


#################################################

src/client/debugger/extension/adapter/activator.ts
   + DebugAdapterActivator
      * .activate()
         * register commands
         * register debug adapter tracker factory (x2)
         * register debug adapter descriptor factory
         * register disposables
src/client/debugger/extension/adapter/factory.ts
   + DebugAdapterDescriptorFactory
src/client/debugger/extension/adapter/logging.ts
   + DebugSessionLoggingFactory
src/client/debugger/extension/adapter/outdatedDebuggerPrompt.ts
   - OutdatedDebuggerPromptFactory
      * constructor
         * checks DebugAdapterNewPtvsd experiment
src/client/debugger/extension/attachQuickPick/factory.ts
   + AttachProcessProviderFactory
      * .registerCommands()
         * creates AttachPicker
         * registers pick-local-process command
         * register disposables
src/client/debugger/extension/attachQuickPick/picker.ts
   + AttachPicker
src/client/debugger/extension/attachQuickPick/provider.ts
   + AttachProcessProvider
src/client/debugger/extension/banner.ts
   + DebuggerBanner
      * .initialize()
         * add onDidTerminateDebugSession handler
         * register disposables
src/client/debugger/extension/configuration/debugConfigurationService.ts
   + PythonDebugConfigurationService
src/client/debugger/extension/configuration/launch.json/completionProvider.ts
   + LaunchJsonCompletionProvider
src/client/debugger/extension/configuration/launch.json/updaterService.ts
   + LaunchJsonUpdaterService
      * .activate()
         * create helper
         * register select-and-insert-debug-config command
         * register disposables
src/client/debugger/extension/configuration/providers/djangoLaunch.ts
   + DjangoLaunchDebugConfigurationProvider
src/client/debugger/extension/configuration/providers/fileLaunch.ts
   + FileLaunchDebugConfigurationProvider
src/client/debugger/extension/configuration/providers/flaskLaunch.ts
   + FlaskLaunchDebugConfigurationProvider
src/client/debugger/extension/configuration/providers/moduleLaunch.ts
   + ModuleLaunchDebugConfigurationProvider
src/client/debugger/extension/configuration/providers/pidAttach.ts
   + PidAttachDebugConfigurationProvider
src/client/debugger/extension/configuration/providers/providerFactory.ts
   + DebugConfigurationProviderFactory
src/client/debugger/extension/configuration/providers/pyramidLaunch.ts
   + PyramidLaunchDebugConfigurationProvider
src/client/debugger/extension/configuration/providers/remoteAttach.ts
   + RemoteAttachDebugConfigurationProvider
src/client/debugger/extension/configuration/resolvers/attach.ts
   + AttachConfigurationResolver
src/client/debugger/extension/configuration/resolvers/base.ts
   + BaseConfigurationResolver
src/client/debugger/extension/configuration/resolvers/helper.ts
   + DebugEnvironmentVariablesHelper
src/client/debugger/extension/configuration/resolvers/launchConfigExperiment.ts
   + LaunchDebugConfigurationExperiment
src/client/debugger/extension/configuration/resolvers/launch.ts
   + LaunchConfigurationResolver
src/client/debugger/extension/hooks/childProcessAttachHandler.ts
   + ChildProcessAttachEventHandler
src/client/debugger/extension/hooks/childProcessAttachService.ts
   + ChildProcessAttachService


#################################################

src/client/interpreter/activation/preWarmVariables.ts
   + PreWarmActivatedEnvironmentVariables
      * .activate()
         * register onDidChangeInterpreter handler
         * get activated envvars
src/client/interpreter/activation/service.ts
   - EnvironmentActivationService
      * constructor
         * register onDidEnvironmentVariablesChange handler
         * register onDidChangeInterpreter handler
src/client/interpreter/activation/terminalEnvironmentActivationService.ts
   + TerminalEnvironmentActivationService
src/client/interpreter/activation/wrapperEnvironmentActivationService.ts
   - WrapperEnvironmentActivationService
      * constructor
         * register onDidEnvironmentVariablesChange handler
         * register disposables
src/client/interpreter/autoSelection/index.ts
   - InterpreterAutoSelectionService
      * constructor
         * set rules
         * register with proxy
src/client/interpreter/autoSelection/proxy.ts
   + InterpreterAutoSeletionProxyService
src/client/interpreter/autoSelection/rules/baseRule.ts
   - BaseRuleService
      * constructor
         * create persistent state
src/client/interpreter/autoSelection/rules/cached.ts
   + CachedInterpretersAutoSelectionRule
src/client/interpreter/autoSelection/rules/currentPath.ts
   + CurrentPathInterpretersAutoSelectionRule
src/client/interpreter/autoSelection/rules/settings.ts
   + SettingsInterpretersAutoSelectionRule
src/client/interpreter/autoSelection/rules/system.ts
   + SystemWideInterpretersAutoSelectionRule
src/client/interpreter/autoSelection/rules/winRegistry.ts
   + WindowsRegistryInterpretersAutoSelectionRule
src/client/interpreter/autoSelection/rules/workspaceEnv.ts
   + WorkspaceVirtualEnvInterpretersAutoSelectionRule
src/client/interpreter/configuration/interpreterComparer.ts
   + InterpreterComparer
src/client/interpreter/configuration/interpreterSelector.ts
   + InterpreterSelector
      * .initialize()
         * register set-interpreter command
         * register set-shebang-interpreter command
         * register disposables
src/client/interpreter/configuration/pythonPathUpdaterServiceFactory.ts
   + PythonPathUpdaterServiceFactory
src/client/interpreter/configuration/pythonPathUpdaterService.ts
   + PythonPathUpdaterService
src/client/interpreter/display/index.ts
   - InterpreterDisplay
      * constructor
         * create status bar item
         * register onDidChangeInterpreter handler
         * register disposables
src/client/interpreter/display/interpreterSelectionTip.ts
   - InterpreterSelectionTip
      * constructor
         * create persistent state
      * .activate()
         * show notification
src/client/interpreter/display/progressDisplay.ts
   + InterpreterLocatorProgressStatubarHandler
      * .register()
         * register onRefreshing handler
         * register onRefreshed handler
src/client/interpreter/display/shebangCodeLensProvider.ts
   - ShebangCodeLensProvider
      * constructor
         * register onDidChangeConfiguration handler
src/client/interpreter/helpers.ts
   + InterpreterHelper
src/client/interpreter/interpreterService.ts
   + InterpreterService
      * .initialize()
         * register onDidChangeActiveTextEditor handler
         * register onDidChangeConfiguration handler
src/client/interpreter/interpreterVersion.ts
   + InterpreterVersionService
src/client/interpreter/locators/helpers.ts
   + InterpreterLocatorHelper
src/client/interpreter/locators/index.ts
   - PythonInterpreterLocatorService
      * constructor
         * creates deferred
         * registers disposables
src/client/interpreter/locators/progressService.ts
   + InterpreterLocatorProgressService
      * .register()
         * register onLocating handlers
src/client/interpreter/locators/services/baseVirtualEnvService.ts
   + BaseVirtualEnvService
src/client/interpreter/locators/services/cacheableLocatorService.ts
   - CacheableLocatorService
      * constructor
         * creates deferred
src/client/interpreter/locators/services/condaEnvFileService.ts
   + CondaEnvFileService
src/client/interpreter/locators/services/condaEnvService.ts
   + CondaEnvService
src/client/interpreter/locators/services/condaService.ts
   - CondaService
      * constructor
         * register onDidChangeConfiguration handler
         * registers disposables
src/client/interpreter/locators/services/currentPathService.ts
   + CurrentPathService
   + PythonInPathCommandProvider
src/client/interpreter/locators/services/globalVirtualEnvService.ts
   + GlobalVirtualEnvService
   + GlobalVirtualEnvironmentsSearchPathProvider
src/client/interpreter/locators/services/hashProviderFactory.ts
   + InterpeterHashProviderFactory
src/client/interpreter/locators/services/hashProvider.ts
   + InterpreterHashProvider
src/client/interpreter/locators/services/interpreterFilter.ts
   + InterpreterFilter
src/client/interpreter/locators/services/interpreterWatcherBuilder.ts
   + InterpreterWatcherBuilder
src/client/interpreter/locators/services/KnownPathsService.ts
   + KnownPathsService
   + KnownSearchPathsForInterpreters
src/client/interpreter/locators/services/pipEnvServiceHelper.ts
   - PipEnvServiceHelper
      * constructor
         * create persistent state
src/client/interpreter/locators/services/pipEnvService.ts
   + PipEnvService
src/client/interpreter/locators/services/windowsRegistryService.ts
   + WindowsRegistryService
src/client/interpreter/locators/services/windowsStoreInterpreter.ts
   + WindowsStoreInterpreter
src/client/interpreter/locators/services/workspaceVirtualEnvService.ts
   + WorkspaceVirtualEnvService
   + WorkspaceVirtualEnvironmentsSearchPathProvider
src/client/interpreter/locators/services/workspaceVirtualEnvWatcherService.ts
   - WorkspaceVirtualEnvWatcherService
      * constructor
        * create an event emitter
         * registers disposables
      * .register()
         * resolve workspace
         * add fs.onDidCreate handlers
src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts
   + CondaInheritEnvPrompt
      * .activate()
         * prompt-and-update, if necessary
src/client/interpreter/virtualEnvs/index.ts
   + VirtualEnvironmentManager
src/client/interpreter/virtualEnvs/virtualEnvPrompt.ts
   + VirtualEnvironmentPrompt
      * .activate()
         * add on-new-env handler
         * registers disposables


#################################################

src/client/testing/common/argumentsHelper.ts
   + ArgumentsHelper
src/client/testing/common/debugLauncher.ts
   + DebugLauncher
src/client/testing/common/enablementTracker.ts
   + EnablementTracker
      * .activate()
         * register onDidChangeConfiguration handler
         * registers disposables
src/client/testing/common/runner.ts
   + TestRunner
src/client/testing/common/services/configSettingService.ts
   + TestConfigSettingsService
src/client/testing/common/services/contextService.ts
   + TestContextService
      * .register()
         * register onDidTestStatusChange handler
src/client/testing/common/services/discoveredTestParser.ts
   + TestDiscoveredTestParser
src/client/testing/common/services/discovery.ts
   + TestsDiscoveryService
src/client/testing/common/services/storageService.ts
   - TestCollectionStorageService
      * constructor
         * registers disposables
src/client/testing/common/services/testResultsService.ts
   + TestResultsService
src/client/testing/common/services/testsStatusService.ts
   + TestsStatusUpdaterService
src/client/testing/common/services/unitTestDiagnosticService.ts
   + UnitTestDiagnosticService
src/client/testing/common/services/workspaceTestManagerService.ts
   - WorkspaceTestManagerService
      * constructor
         * registers disposables
src/client/testing/common/testUtils.ts
   + TestsHelper
src/client/testing/common/testVisitors/flatteningVisitor.ts
   + TestFlatteningVisitor
src/client/testing/common/testVisitors/resultResetVisitor.ts
   + TestResultResetVisitor
src/client/testing/common/updateTestSettings.ts
   + UpdateTestSettingService
      * .activate()
         * update settings
src/client/testing/common/xUnitParser.ts
   + XUnitParser
src/client/testing/configurationFactory.ts
   + TestConfigurationManagerFactory
src/client/testing/configuration.ts
   + UnitTestConfigurationService
src/client/testing/display/main.ts
   - TestResultDisplay
      * constructor
         * create status bar item
src/client/testing/display/picker.ts
   + TestDisplay
src/client/testing/explorer/commandHandlers.ts
   + TestExplorerCommandHandler
      * .register()
         * register run-test-node command
         * register debug-test-node command
         * register open-test-node-in-editor command
         * registers disposables
src/client/testing/explorer/failedTestHandler.ts
   - FailedTestHandler
      * constructor
         * registers disposables
      * .activate()
         * register onDidChangeTestData handler
src/client/testing/explorer/testTreeViewProvider.ts
   - TestTreeViewProvider
      * constructor
         * register onDidTestStatusChanged handler
         * register onDidTestsChanged handler
         * register onDidChangeWorkspaceFolders handler
         * maybe refresh
         * registers disposables
src/client/testing/explorer/treeView.ts
   - TreeViewService
      * constructor
         * registers disposables
      * .activate()
         * create tree view
         * register reveal-test-item command
         * registers disposables
src/client/testing/main.ts
   - UnitTestManagementService
      * constructor
         * registers disposables
      * .activate()
         * register handlers
         * register commands
         * check experiments
         * auto-discover tests
         * register symbol provider
src/client/testing/navigation/commandHandler.ts
   - TestCodeNavigatorCommandHandler
      * constructor
         * registers disposables
      * .register()
         * register navigate-to-test-file command
         * register navigate-to-test-function command
         * register navigate-to-test-suite command
         * registers disposables
src/client/testing/navigation/fileNavigator.ts
   + TestFileCodeNavigator
src/client/testing/navigation/functionNavigator.ts
   + TestFunctionCodeNavigator
src/client/testing/navigation/helper.ts
   + TestNavigatorHelper
src/client/testing/navigation/suiteNavigator.ts
   + TestSuiteCodeNavigator
src/client/testing/navigation/symbolProvider.ts
   + TestFileSymbolProvider
src/client/testing/nosetest/main.ts
   + TestManager
src/client/testing/nosetest/runner.ts
   + TestManagerRunner
src/client/testing/nosetest/services/argsService.ts
   + ArgumentsService
src/client/testing/nosetest/services/discoveryService.ts
   + TestDiscoveryService
src/client/testing/nosetest/services/parserService.ts
   + TestsParser
src/client/testing/pytest/runner.ts
   + TestManagerRunner
src/client/testing/pytest/services/argsService.ts
   + ArgumentsService
src/client/testing/pytest/services/discoveryService.ts
   + TestDiscoveryService
src/client/testing/pytest/services/testMessageService.ts
   + TestMessageService
src/client/testing/unittest/helper.ts
   + UnitTestHelper
src/client/testing/unittest/runner.ts
   - TestManagerRunner
      * constructor
         * registers disposables
src/client/testing/unittest/services/argsService.ts
   + ArgumentsService
src/client/testing/unittest/services/discoveryService.ts
   + TestDiscoveryService
src/client/testing/unittest/services/parserService.ts
   + TestsParser
src/client/testing/unittest/socketServer.ts
   + UnitTestSocketServer
      * .start()
         * create deferred
         * create socket server
         * start listening


#################################################

src/client/common/application/activeResource.ts
   + ActiveResourceService
src/client/common/application/applicationEnvironment.ts
   + ApplicationEnvironment
src/client/common/application/applicationShell.ts
   + ApplicationShell
src/client/common/application/clipboard.ts
   + ClipboardService
src/client/common/application/commandManager.ts
   + CommandManager
src/client/common/application/commands/reloadCommand.ts
   + ReloadVSCodeCommandHandler
      * .activate()
         * register reload command
src/client/common/application/customEditorService.ts
   + CustomEditorService
src/client/common/application/debugService.ts
   + DebugService
src/client/common/application/debugSessionTelemetry.ts
   - DebugSessionTelemetry
      * constructor
         * register DebugAdapterTrackerFactory
         * registers disposables
      * .activate()
         * <nothing>
src/client/common/application/documentManager.ts
   + DocumentManager
src/client/common/application/extensions.ts
   + Extensions
src/client/common/application/languageService.ts
   + LanguageService
src/client/common/application/terminalManager.ts
   + TerminalManager
src/client/common/application/webPanels/webPanelProvider.ts
   + WebPanelProvider
src/client/common/application/workspace.ts
   + WorkspaceService
src/client/common/asyncDisposableRegistry.ts
   + AsyncDisposableRegistry
src/client/common/configuration/service.ts
   + ConfigurationService
src/client/common/crypto.ts
   + CryptoUtils
src/client/common/dotnet/compatibilityService.ts
   + DotNetCompatibilityService
src/client/common/dotnet/services/linuxCompatibilityService.ts
   + LinuxDotNetCompatibilityService
src/client/common/dotnet/services/macCompatibilityService.ts
   + MacDotNetCompatibilityService
src/client/common/dotnet/services/unknownOsCompatibilityService.ts
   + UnknownOSDotNetCompatibilityService
src/client/common/dotnet/services/windowsCompatibilityService.ts
   + WindowsDotNetCompatibilityService
src/client/common/editor.ts
   + EditorUtils
src/client/common/experiments.ts
   + ExperimentsManager
      * .activate()
         * send telemetry
         * update storage
         * initialize
src/client/common/featureDeprecationManager.ts
   + FeatureDeprecationManager
      * .initialize()
         * register deprecations
src/client/common/insidersBuild/downloadChannelRules.ts
   + ExtensionInsidersOffChannelRule
   + ExtensionInsidersDailyChannelRule
   + ExtensionInsidersWeeklyChannelRule
src/client/common/insidersBuild/downloadChannelService.ts
   - ExtensionChannelService
      * constructor
         * register onDidChangeConfiguration handler
         * registers disposables
src/client/common/insidersBuild/insidersExtensionPrompt.ts
   - InsidersExtensionPrompt
      * constructor
         * create persistent state
src/client/common/insidersBuild/insidersExtensionService.ts
   + InsidersExtensionService
src/client/common/installer/channelManager.ts
   + InstallationChannelManager
src/client/common/installer/condaInstaller.ts
   + CondaInstaller
src/client/common/installer/extensionBuildInstaller.ts
   + StableBuildInstaller
   + InsidersBuildInstaller
src/client/common/installer/moduleInstaller.ts
   + ModuleInstaller
src/client/common/installer/pipEnvInstaller.ts
   + PipEnvInstaller
src/client/common/installer/pipInstaller.ts
   + PipInstaller
src/client/common/installer/poetryInstaller.ts
   + PoetryInstaller
src/client/common/installer/productInstaller.ts
   + ProduceInstaller
src/client/common/installer/productPath.ts
   + BaseProductPathsService
   + CTagsProductPathService
   + FormatterProductPathService
   + LinterProductPathService
   + TestFrameworkProductPathService
   + RefactoringLibraryProductPathService
   + DataScienceProductPathService
src/client/common/installer/productService.ts
   + ProductService
src/client/common/net/browser.ts
   + BrowserService
src/client/common/net/fileDownloader.ts
   + FileDownloader
src/client/common/net/httpClient.ts
   - HttpClient
      * constructor
         * gets config
src/client/common/net/socket/socketServer.ts
   - SocketServer
      * constructor
         * create deferred
src/client/common/nuget/azureBlobStoreNugetRepository.ts
   + AzureBlobStoreNugetRepository
src/client/common/nuget/nugetRepository.ts
   + NugetRepository
src/client/common/nuget/nugetService.ts
   + NugetService
src/client/common/persistentState.ts
   + PersistentStateFactory
src/client/common/platform/fileSystem.ts
   - FileSystem
      * constuctor
         * gets platform info
src/client/common/platform/pathUtils.ts
   + PathUtils
src/client/common/platform/platformService.ts
   - PlatformService
      * constructor
         * send telemetry
src/client/common/platform/registry.ts
   + RegistryImplementation
src/client/common/process/condaExecutionService.ts
   + CondaExecutionService
src/client/common/process/currentProcess.ts
   + CurrentProcess
src/client/common/process/decoder.ts
   + BufferDecoder
src/client/common/process/logger.ts
   + ProcessLogger
src/client/common/process/processFactory.ts
   + ProcessServiceFactory
src/client/common/process/pythonExecutionFactory.ts
   + PythonExecutionFactory
src/client/common/process/pythonProcess.ts
   + PythonExecutionService
src/client/common/process/pythonToolService.ts
   + PythonToolExecutionService
src/client/common/terminal/activator/index.ts
   + TerminalActivator
      * .initialize()
         * creates base activator
src/client/common/terminal/activator/powershellFailedHandler.ts
   + PowershellTerminalActivationFailedHandler
src/client/common/terminal/environmentActivationProviders/baseActivationProvider.ts
   + BaseActivationCommandProvider
src/client/common/terminal/environmentActivationProviders/bash.ts
   + Bash
src/client/common/terminal/environmentActivationProviders/commandPrompt.ts
   + CommandPromptAndPowerShell
src/client/common/terminal/environmentActivationProviders/condaActivationProvider.ts
   + CondaActivationCommandProvider
src/client/common/terminal/environmentActivationProviders/pipEnvActivationProvider.ts
   + PipEnvActivationCommandProvider
src/client/common/terminal/environmentActivationProviders/pyenvActivationProvider.ts
   + PyEnvActivationCommandProvider
src/client/common/terminal/factory.ts
   + TerminalServiceFactory
src/client/common/terminal/helper.ts
   - TerminalHelper
      * constructor
         * creates shell detector
src/client/common/terminal/service.ts
   - TerminalService
      * constructor
         * registers disposables
src/client/common/terminal/shellDetectors/baseShellDetector.ts
   + BaseShellDetector
src/client/common/terminal/shellDetectors/settingsShellDetector.ts
   + SettingsShellDetector
src/client/common/terminal/shellDetectors/terminalNameShellDetector.ts
   + TerminalNameShellDetector
src/client/common/terminal/shellDetectors/userEnvironmentShellDetector.ts
   + UserEnvironmentShellDetector
src/client/common/terminal/shellDetector.ts
   + ShellDetector
src/client/common/utils/multiStepInput.ts
   + MultiStepInputFactory
src/client/common/utils/random.ts
   + Random
src/client/common/variables/environment.ts
   + EnvironmentVariablesService
src/client/common/variables/environmentVariablesProvider.ts
   + EnvironmentVariablesProvider
      * constructor
         * register onDidChangeConfiguration handler
         * registers disposables

@karrtikr
Copy link

@karthiknadig Is this issue now outdated? If we expect this to naturally happen as we separate out the components, we might as well close this.

@karrtikr karrtikr added this to the October 2021 milestone Oct 20, 2021
@karrtikr karrtikr added the verified Verification succeeded label Oct 25, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-internal Label for non-user facing issues debt Covers everything internal: CI, testing, refactoring of the codebase, etc. verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants