Microsoft/TypeScript

Feedback to improve compileOnSave with tsserver.

Open

#17.630 geöffnet am 5. Aug. 2017

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (6.726 Forks)batch import
Domain: APIHelp WantedSuggestionVS Code Tracked

Repository-Metriken

Stars
 (48.455 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (9 gemergte PRs in 30 T)

Beschreibung

I have implemented inside Eclipse compile on save with tsserver by consuming compileOnSaveAffectedFileList and compileOnSaveEmitFile commands. It works great but I think we could again improved it

For compileOnSaveAffectedFileList:

  • compileOnSaveAffectedFileList should throw error when the given file is excluded of tsconfig.json. It will give the capability to display an error dialog when user wishes to compile a ts file which is excluded by tsconfig.json
  • in some case, tsserver compileOnSaveAffectedFileList returns *.d.ts files (see ttps://github.com/angelozerr/typescript.java/issues/190#issuecomment-317876026) those *.d.ts files must be ignored for compilation.

For compileOnSaveEmitFile:

  • the reponse compileOnSaveEmitFile should return diagnostics errors. I had to call the two tsserver commands syntacticDiagnosticsSync and semantacticDiagnosticsSync after the call of compileOnSaveEmitFile to display errors in the Eclipse "Problem View"
  • the reponse compileOnSaveEmitFile should return the emited files path (js and *.js.map). In Eclipse case it's very helpful because I could refresh the files.

Contributor Guide