-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Add TSC Task Provider #27093
Add TSC Task Provider #27093
Conversation
extensions/typescript/package.json
Outdated
@@ -7,6 +7,7 @@ | |||
"license": "MIT", | |||
"publisher": "vscode", | |||
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", | |||
"enableProposedApi": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to use proposed API here anymore. I moved the API to vscode.d.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My fault. I moved the API but I need to remove a wrapper function. Will do an push.
@@ -0,0 +1,110 @@ | |||
/*--------------------------------------------------------------------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of inferring the tsconfig.json to use from the open active TS file. However if no file is open I think we should still provide a reasonable command and not just look into the workspace root. We should search for all tsconfig.json and return all of them. If a build is trigger the task runner will run all of them
Regarding activation: I have a similar problem in ESLint where I need to active the plugin to simply being able to listen to config changes. This is all I do in activate. In addition I listen to open event and if a JS files opens I start the ESLint server by hand. So basically I have an activate and a realActivate. We could do the same for TS and start the tsserver when we get a open event for a TS file in the listener registered in activate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I've updated the activation as you described and it seems to work well. Will take a look at scanning for tsconfig.json
outside of the root in a follow up PR
Fixes microsoft#26079 Adds a task provider for building typescript projects.
* extract standardLanguageDescriptions to constant * Remove client variable * Move VersionStatus into a class * Add TSC Task Provider Fixes #26079 Adds a task provider for building typescript projects. * Make ts loading lazy
Fixes #26079
Adds a task provider for building typescript projects.