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

TypeScriptBuilder vs TS Server Watch mode #214

Open
PhaserEditor2D opened this issue Sep 22, 2017 · 12 comments
Open

TypeScriptBuilder vs TS Server Watch mode #214

PhaserEditor2D opened this issue Sep 22, 2017 · 12 comments

Comments

@PhaserEditor2D
Copy link

What features are provided by TypeScriptBuilder that are not provided by the TS Server Watch mode?

Probably to use tsserver -w could be a simpler solution to issues like for allowJs parameter .

@angelozerr
Copy link
Owner

TS Server Watch mode seems beeing a new feature and perhaps VScode uses that? We must study that https://github.com/Microsoft/vscode/tree/master/extensions/typescript/src

Any PR are welcome!

@PhaserEditor2D
Copy link
Author

PhaserEditor2D commented Sep 22, 2017

Yes, we should look at that because I think the Watch mode could simplify a lot TypeScript IDE, probably an Eclipse project builder is not going to be needed anymore. I think the idea behind this kind of language services (like tsserver and lsp) is that clients don't need to do any heavy stuff, all the state and computation should be on the server side.

@angelozerr
Copy link
Owner

angelozerr commented Sep 22, 2017

Yes, we should look at that because I think the Watch mode could simplify a lot TypeScript IDE, probably an Eclipse project builder is not going to be needed anymore.

The main problem with that is that you cannot see progress monitor and stop as soon as possible the compile process.

is that clients don't need to do any heavy stuff, all the state and computation should be on the server side.

It looks like that today, I don't compute dependencies or other complex things, I'm using tsserevr commands for that.

@PhaserEditor2D
Copy link
Author

But it think it is a problem of tsserver, not a problem of the IDE. The tsserver should provide a protocol for monitoring (compilation progress and cancelation).

@angelozerr
Copy link
Owner

The tsserver should provide a protocol for monitoring (compilation progress and cancelation).

Not sure that TypeScript teams will implement that.

@PhaserEditor2D
Copy link
Author

I guess they should if they want to be IDE independent. In the meantime, to stop the compilation we can kill the process, and print the output messages to show the progress.

@angelozerr
Copy link
Owner

angelozerr commented Sep 22, 2017

In the meantime, to stop the compilation we can kill the process

No we cannot do that, because tsserver is used too for completion, hover, etc

and print the output messages to show the progress.

Perhaps tsserver watch supports that. The best mean is to study this feature, but I have no time to study that for the moment.

Any help are welcome:)

@PhaserEditor2D
Copy link
Author

Yes, the tsserver emits the files are being compiled.

I was looking into the VSCode TypeScript extension you pointed to me above and I did not find any related to the watch mode, however in the official tutorial about TypeScript development with VSCode they say the compiling is made via Tasks, traduced to the Eclipse world, via Run Configurations:

https://code.visualstudio.com/docs/languages/typescript#_transpiling-typescript-into-javascript

It means that the user is the one who executes the compiler, in watch mode or not. I think this is could be valid for TypeScript IDE, instead of implement a builder it can provides simpler ways of running the typescript compiler, for example, with Run Configurations or a TypeScript Compiler console.

A TypeScript Compiler console could be a kind of terminal that adds tsc to the exec path.

@angelozerr
Copy link
Owner

with Run Configurations or a TypeScript Compiler console.

This launch already exists https://github.com/angelozerr/typescript.java/wiki/TypeScript-Compiler

You must not to use compileOnSave in this case.

@PhaserEditor2D
Copy link
Author

I have to test it :), actually, I see you mention there the watch mode.

@angelozerr
Copy link
Owner

@boniatillo-com I think when you say tsserver watch mode, it's tsc watch mode. It's not the same thing.

The benefit with tsserver compile on save is that you avoid double parsing of ts files (one by tsserver and one by tsc). More with tsserver you can manage progress monitor.

@PhaserEditor2D
Copy link
Author

Hi @angelozerr, sorry, I am not collaborating more, I am preparing the papers myself for two conventions and my time is zero. As soon as I back from the travel I will return on this. I want to deliver the new major Phaser Editor version with typescript ide.

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