Introduce a --syntaxOnly server mode#23128
Conversation
|
@sheetalkamat @mhegazy Better? One switch throughout, loading config files, not creating programs. I've tested manually, but I'm not going to add automated tests until people express satisfaction with the general approach. |
|
I'm not thrilled about opening the config files because it creates some extra file watchers (for the config files themselves) and makes it harder for the editor to set flags, esp Edit: I've restored the config file change, but it's a separate commit so it's easy to revert. |
| this.documentRegistry, | ||
| compilerOptions, | ||
| /*lastFileExceededProgramSize*/ this.getFilenameForExceededTotalSizeLimitForNonTsFiles(projectFileName, compilerOptions, files, externalFilePropertyReader), | ||
| /*languageServicePermanentlyDisabled*/this.syntaxOnly, |
There was a problem hiding this comment.
why do you need to pass this to each project, that should be checked by each project by just checking this.projectService.syntaxOnly?
| projectRootPath?: NormalizedPath) { | ||
|
|
||
| if (this.syntaxOnly) { | ||
| return undefined; |
There was a problem hiding this comment.
I thought the idea was to create program but not bind it. Are we not going to do that. This means if file opened is from configured project, it wont pick its compiler options?
There was a problem hiding this comment.
What does the program provide if we are not binding it?
Yes, I think we want to disregard the compiler options of configured projects - we specifically don't want to (e.g.) emit, load lib files, resolve, download types, etc.
| @@ -1,114 +0,0 @@ | |||
| // @module: commonjs | |||
There was a problem hiding this comment.
Do not think it is intentional to remove this file.
1. Disable the LS in all projects 2. Don't create Program objects 3. Ignore config files
c03ea06 to
855171b
Compare
Replaces #23037 & #23033