Skip to content
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

Feedback to improve compileOnSave with tsserver. #17630

Open
angelozerr opened this issue Aug 5, 2017 · 2 comments
Open

Feedback to improve compileOnSave with tsserver. #17630

angelozerr opened this issue Aug 5, 2017 · 2 comments
Labels
API Relates to the public API for TypeScript Help Wanted You can do this Suggestion An idea for TypeScript VS Code Tracked There is a VS Code equivalent to this issue
Milestone

Comments

@angelozerr
Copy link

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/ ts.TypeScriptNoContentAvailableException on compile angelozerr/typescript.java#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.
@angelozerr angelozerr changed the title Feedback to improve compile on save with tsserver. Feedback to improve compileOnSave with tsserver. Aug 6, 2017
@mjbvz mjbvz added the VS Code Tracked There is a VS Code equivalent to this issue label Aug 8, 2017
@mhegazy
Copy link
Contributor

mhegazy commented Aug 29, 2017

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

do not you have this already from projectInfo?

in some case, tsserver compileOnSaveAffectedFileList returns *.d.ts files (see angelozerr/typescript.java#190 (comment)) those *.d.ts files must be ignored for compilation.

I would say this is a bug.

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"

I would disassociate errors from compile-on-save.

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.

seems like a reasonable request. PRs welcomed.

@mhegazy mhegazy added the Needs More Info The issue still hasn't been fully clarified label Aug 29, 2017
@mhegazy mhegazy added API Relates to the public API for TypeScript Help Wanted You can do this and removed Needs More Info The issue still hasn't been fully clarified labels Oct 27, 2017
@mhegazy
Copy link
Contributor

mhegazy commented Oct 27, 2017

PRs welcomed for changing compileOnSaveEmitFile to return a list of generated files.

@mhegazy mhegazy added this to the Community milestone Jan 4, 2018
@mhegazy mhegazy added the Suggestion An idea for TypeScript label Jul 12, 2018
@RyanCavanaugh RyanCavanaugh modified the milestones: Community, Backlog Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Relates to the public API for TypeScript Help Wanted You can do this Suggestion An idea for TypeScript VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

4 participants