You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add "allowJs" parameter to tsconfig.json editor #213
By the way, when I set allowJs=true in the tsconfig.json project, and I save a js file, it is not compiled. I will look into this too and create a new issue.
Well, actually, it is not compiling now on save, even if what I am saving is a TS file. I have to compile the whole project in the jsconfig.json editor.
I'm a little afraid to add *.js file in the filter. Perhaps the best mean is to check allowJs is declared in tsconfig.json (just fine a quick mean to do that).
TypeScriptResourceUtil.isAllowCompilation(resource) that check if it is a TS, TSX or JS file. In case of the JS file, it has to check if allowJs is set to true.
To be honnest with you I'm very busy with https://github.com/angelozerr/ec4e for the moment. I would like in the future migrate to lsp4e once features around GenericEditor will provide the same features than typescript.java
By the way, I think that to compute if a property is set in a jsconfig.json file could be something tricky, because you have to check inheritance. I think the best is to ask tsserver if a specific file is in the scope of compilation. I don't know if tsserver supports something like that.
To be honnest with you I'm very busy with https://github.com/angelozerr/ec4e for the moment. I would like in the future migrate to lsp4e once features around GenericEditor will provide the same features than typescript.java
What kind of features is missing in GenericEditor?
But my fear is to call compileOnSaveAffectedFileList for each js files and kill performance. That's why I filter before with ts files to try having the best performances.
What kind of features is missing in GenericEditor?
Not directly in GenericEditor but around generic editor like match brackets, etc, but with tm4e language configuration I hope I will fix that.
If you are going to migrate to lsp4e then do you plan to integrate everything into eclipse blue sky? Is Eclipse Blue Sky going to be the final solution to JS, TS, CSS, HTML editor in Eclipse? What do you think?
There are a lot of work I think before migrating typescript.java to lsp4e/bluesky. More tsserver doesn't support lsp, it exists 2 projects for that, but they don't provide the same features than tsserver like compile on save, etc
Yes I am testing it and I find a lot of issues but I guess it is a matter of time to get it ready. The oldy JSDT has features that I think will "never" be available on a lsp solution, because JSDT inherits a lot of concepts from the Java world and lsp inherits concepts from the text editors world. But it looks like all the efforts are going to lsp, it is cheaper and could be improved in the future (for example, maybe the fantastic Tern could get into the game and replace the Salsa).
For the moment I think I should wait again and keep on JSDT until blue sky gets ready. I was thinking on provide TypeScript IDE but I cannot attach to something is going to disappear. I hope lsp4e is going to stay for a long time.
Yes I am testing it and I find a lot of issues but I guess it is a matter of time to get it ready.
Yes, time is a big pb:)
I was thinking on provide TypeScript IDE but I cannot attach to something is going to disappear
My first thing that I would like to do is to remove JSDT in typescript.java and uses GenericEditor and tm4e language configuration once they will be ready to provide the same feature than typescript.java (like match brackets).
After that I could continue to use tsserver and migrate to lsp4e (or not if I don't see advantages).
I think it is a good plan. I will continue supporting TypeScript IDE as a third party component. Right now when you create a Phaser Editor project for TypeScript or JS6 it adds the TypeScript IDE builder so it is ready out of the box.
Activity
PhaserEditor2D commentedon Sep 22, 2017
By the way, when I set
allowJs=truein thetsconfig.jsonproject, and I save ajsfile, it is not compiled. I will look into this too and create a new issue.PhaserEditor2D commentedon Sep 22, 2017
If you run
tsc -wit is compiled, but in TypeScript IDE it is not, so I guess it is something related to the TypeScript IDE Builder.angelozerr commentedon Sep 22, 2017
Do you compile with tsserver (compileOnSave) or with Eclipse launch?
PhaserEditor2D commentedon Sep 22, 2017
I use
compileOnSave, but it does not work on JS files. With TS files it works.But I confirmed the
allowJScompiles JS files if I do it manually, in the Terminal, by doing:tsc -w -p tsconfig.jsonPhaserEditor2D commentedon Sep 22, 2017
Well, actually, it is not compiling now on save, even if what I am saving is a TS file. I have to compile the whole project in the jsconfig.json editor.
PhaserEditor2D commentedon Sep 22, 2017
If I execute in the terminal
tsc -w -p tsconfig.jsonit works like a charm.angelozerr commentedon Sep 22, 2017
To be honnest with you, I have never played with allowJS.
I think the problem comes from https://github.com/angelozerr/typescript.java/blob/master/eclipse/ts.eclipse.ide.core/src/ts/eclipse/ide/core/builder/TypeScriptBuilder.java#L136 where only ts files are compiled.
I'm a little afraid to add *.js file in the filter. Perhaps the best mean is to check allowJs is declared in tsconfig.json (just fine a quick mean to do that).
PhaserEditor2D commentedon Sep 22, 2017
Yes, probably we should add a new method:
TypeScriptResourceUtil.isAllowCompilation(resource)that check if it is a TS, TSX or JS file. In case of the JS file, it has to check ifallowJsis set to true.PhaserEditor2D commentedon Sep 22, 2017
Are you going to work on it? Or I do it myself?
angelozerr commentedon Sep 22, 2017
Not sure that its a good idea for performance.
To be honnest with you I'm very busy with https://github.com/angelozerr/ec4e for the moment. I would like in the future migrate to lsp4e once features around GenericEditor will provide the same features than typescript.java
PhaserEditor2D commentedon Sep 22, 2017
By the way, I think that to compute if a property is set in a
jsconfig.jsonfile could be something tricky, because you have to check inheritance. I think the best is to ask tsserver if a specific file is in the scope of compilation. I don't know if tsserver supports something like that.PhaserEditor2D commentedon Sep 22, 2017
What kind of features is missing in GenericEditor?
angelozerr commentedon Sep 22, 2017
I suggest you to see https://github.com/angelozerr/typescript.java/search?utf8=%E2%9C%93&q=compileOnSaveAffectedFileList&type=
But my fear is to call compileOnSaveAffectedFileList for each js files and kill performance. That's why I filter before with ts files to try having the best performances.
Not directly in GenericEditor but around generic editor like match brackets, etc, but with tm4e language configuration I hope I will fix that.
PhaserEditor2D commentedon Sep 25, 2017
Hi @angelozerr
If you are going to migrate to lsp4e then do you plan to integrate everything into eclipse blue sky? Is Eclipse Blue Sky going to be the final solution to JS, TS, CSS, HTML editor in Eclipse? What do you think?
angelozerr commentedon Sep 25, 2017
Yes it's my plan. I'm working to bluesky, tm4e, ec4e for the momeent to try to provide same features than WTP and even better like color (see eclipse-wildwebdeveloper/wildwebdeveloper#43 and eclipse-wildwebdeveloper/wildwebdeveloper#48)
PhaserEditor2D commentedon Sep 25, 2017
Ok then I think I will look into blue sky too.
angelozerr commentedon Sep 25, 2017
There are a lot of work I think before migrating typescript.java to lsp4e/bluesky. More tsserver doesn't support lsp, it exists 2 projects for that, but they don't provide the same features than tsserver like compile on save, etc
PhaserEditor2D commentedon Sep 25, 2017
Yes I am testing it and I find a lot of issues but I guess it is a matter of time to get it ready. The oldy JSDT has features that I think will "never" be available on a lsp solution, because JSDT inherits a lot of concepts from the Java world and lsp inherits concepts from the text editors world. But it looks like all the efforts are going to lsp, it is cheaper and could be improved in the future (for example, maybe the fantastic Tern could get into the game and replace the Salsa).
For the moment I think I should wait again and keep on JSDT until blue sky gets ready. I was thinking on provide TypeScript IDE but I cannot attach to something is going to disappear. I hope lsp4e is going to stay for a long time.
angelozerr commentedon Sep 25, 2017
Yes, time is a big pb:)
My first thing that I would like to do is to remove JSDT in typescript.java and uses GenericEditor and tm4e language configuration once they will be ready to provide the same feature than typescript.java (like match brackets).
After that I could continue to use tsserver and migrate to lsp4e (or not if I don't see advantages).
PhaserEditor2D commentedon Sep 25, 2017
I think it is a good plan. I will continue supporting TypeScript IDE as a third party component. Right now when you create a Phaser Editor project for TypeScript or JS6 it adds the TypeScript IDE builder so it is ready out of the box.