microsoft / microsoft/TypeScript
Feedback to improve compileOnSave with tsserver.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
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:
compileOnSaveAffectedFileListshould 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
compileOnSaveAffectedFileListreturns *.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
compileOnSaveEmitFileshould return diagnostics errors. I had to call the two tsserver commandssyntacticDiagnosticsSyncandsemantacticDiagnosticsSyncafter the call ofcompileOnSaveEmitFileto display errors in the Eclipse "Problem View" - the reponse
compileOnSaveEmitFileshould return the emited files path (js and *.js.map). In Eclipse case it's very helpful because I could refresh the files.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the tsserver entry points for compileOnSaveAffectedFileList and compileOnSaveEmitFile, then inspect the related syntacticDiagnosticsSync and semantacticDiagnosticsSync commands. Done means excluded files produce an error, declaration files are ignored, and compileOnSaveEmitFile reports diagnostics plus emitted JavaScript and source-map paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100