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

Compile on save #176

Closed
ghivert opened this issue Nov 14, 2022 · 2 comments
Closed

Compile on save #176

ghivert opened this issue Nov 14, 2022 · 2 comments

Comments

@ghivert
Copy link

ghivert commented Nov 14, 2022

Hi and thanks for the hard work!

I'm wondering on one point, in tsconfig.json, we have a field name compileOnSave which should automatically compile all TS files which are just saved.
Is there any plan for the LSP to support this out-of-the-box (respecting the user choice in tsconfig.json) ?

Thanks!

@rchl
Copy link
Member

rchl commented Nov 14, 2022

What would you expect the effect of this setting be?

Is it about getting project-wide diagnostics? In that case we have #73 for that.

compileOnSave seems to require some extra code to support it and it's not very clear what its purpose. Also it seems to be only supported by a handful of IDEs (and not even VSCode).

@ghivert
Copy link
Author

ghivert commented Dec 2, 2022

Sorry, didn't see your answer!

Effectively, compileOnSave flag seems like an artifact of the past. I think it would be too much work for nothing really in the end.
To answer your question, once the flag is set, the editor triggers a tsc command on the specific file which just have been saved. The idea is to potentially emit a specific file after each save, just like a tsc -w would do, by emitting only a specific file after a save, and not triggering a compilation of the whole project.

I close the issue, because I think it's not an issue anymore (and I ended up with a tsc -w in a concurrently script to get it working, so not much an issue for me).

Thanks again for the hard work!

@ghivert ghivert closed this as completed Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants