Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Add notes about what happens during "initialization".
  • Loading branch information
ericsnowcurrently committed Mar 9, 2020
commit 0f75f6366d311b0d61a8328922d1170f6c9b1a27
11 changes: 8 additions & 3 deletions src/client/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ function displayProgress(promise: Promise<any>) {
window.withProgress(progressOptions, () => promise);
}

/////////////////////////////
// intialization (globals & components)

// The code in this section should do nothing more complex than register
// objects to DI and simple init (e.g. no side effects). That implies
// that constructors are likewise simple and do no work. It also means
// that it is inherently synchronous.

function initializeGlobals(context: ExtensionContext): [IServiceManager, IServiceContainer] {
const cont = new Container();
const serviceManager = new ServiceManager(cont);
Expand All @@ -186,9 +194,6 @@ function initializeGlobals(context: ExtensionContext): [IServiceManager, IServic
return [serviceManager, serviceContainer];
}

/////////////////////////////
// component init

function initializeComponents(
_context: ExtensionContext,
_serviceManager: IServiceManager,
Expand Down