Adding interfaces for datascience work (#1)#2688
Adding interfaces for datascience work (#1)#2688rchiodo merged 1 commit intomicrosoft:datasciencefrom
Conversation
* working without inversify * Working command with service manager * Initial interfaces
|
This is just a skeleton of the work we're starting. I imagine we'll be make a ton more changes like this and then we'll take all of them together into master at a later date. |
brettcannon
left a comment
There was a problem hiding this comment.
Nothing jumpus out at me, but Don or anyone else on the team may know better. ;)
|
|
||
| @injectable() | ||
| export class DataScience implements IDataScience { | ||
| constructor(@inject(ICommandManager) private commandManager: ICommandManager, |
There was a problem hiding this comment.
Note: I've already changed this in my upcoming checkin to instead just inject the service manager and then get the various services that we need off of that.
|
|
||
| // Activate the data science features | ||
| const dataScience = serviceManager.get<IDataScience>(IDataScience); | ||
| await dataScience.activate(context); |
There was a problem hiding this comment.
Is there a reason why this needs to be awaited.
We need to be careful what happens with the extension activation. At the end of the day, this impacts the time taken for the extension to load, i.e. the time the user has to wait before one can use the extension (intellisense, etc).
Suggestion:
- In the extension activate method (in
extensions.tsfile), do not await instead do as follows (i.e. invokeactivatebut do not wait for it to complete:dataScience.activate(context).ignoreErrors()` - If you need you can add your error logging in the
DataScience.activtemethod as follows:
@log('Starting Data Science')
public async activate(context: ExtensionContext): Promise<void> {
this.registerCommands();
}This will add the necessary logging (trace and exceptions).
Please update your branch with latest master to get the log decorator.
|
For some reason, the Try installing using We need to ensure Suggestion:
|
|
Apologies for the late review. |
Working command with service manager
Initial interfaces
Has a news entry file (remember to thank yourself!)Has unit tests & system/integration testspackage.jsonare pinned (e.g."1.2.3", not"^1.2.3"for the specified version)package-lock.jsonhas been regenerated by runningnpm install(if dependencies have changed)