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
NONE of the code features work in ES6 projects for language type: Javascript #2054
It's not related but i'm just curious to know how do you capture your gifs? I capture the screen with Quicktime and then convert that to gif. Is there any better solution (direct / 1 phase) for that?
delvarworld I've tried to reproduce it with a minimal setup and things work fine (see gif below). Since ES6 is now the default you no longer need to define it as the target in the jsconfig.json.
Since you do not even get a hover over angle hints at that Code's JavaScript worker has crashed. In this case you should see an exception in the console. Can you open the developer tools Help>Toggle Developer Tools and switch to the Console tab. Does an error show up?
Can you reproduce the above problems after a fresh restart?
Did you get into this situation after #1991? In this case the the JS worker will have crashed. The work around is to restart Code cmd+p, Reload Window.
Do you have any extensions installed (e.g. eg2.js-is-jsx)? Can you try to reproduce the problem when you start code with the --disable-extensions option.
Yes 0.10.6 is the latest and the version I've used (in addition to the latest).
Does visual studio code do any sort of caching of the project?
Code only caches the UI state (last opened file).
Running npm install is a good suggestion (I was assuming node_modules are excluded in jsconfig.json), but it is a difference. I currently run into npm timeouts I'll try again later.
npm was in better shape today and I could run npm install.
After the npm install I can reproduce the crash:
start code
open src/containers/Game/game.js.
Here is a work around. Move the jsconfig.json into the src folder. The jsconfig.json file defines the root of a JS project and you can have more than one project context inside a workspace. I don't understand your source structure well enough yet, whether there should be another jsconfig.json inside another folder.
There is still a bug. I speculate that a top-level JS file refers to as JS file in a node module which results in a loop in the import graph, that makes the ImportAndExportRewriter recurse. We will replace the entire JS infrastructure with Salsa (see microsoft/TypeScript#4789) (preview Jan, default Feb). We will investigate whether it is worthwhile to fix this issue in the soon to be deprecated code base.
I can make the ImportExportRewriter not use recursion anymore (while-loop ftw) but then the TypeScript compiler runs into the same issue during type binding. Once we have adopted project Salsa it will be good again because in recent version of TS this is fixed.
delvarworld A different workaround is to also exclude static/dist from jsconfig.json.
Because most of my files use the ES7 spread operator, it now thinks that my entire file is in error. Unfortunately, every time I find a workaround to a show-stopping bug in vscode (of which there have been many), I hit another. I can no longer afford time contributing to this project. Good luck!
delvarworld thanks for joining our journey up to now. We got some really good insights from your project and we will continue to use it as a test case.
Just FYI, the ES7 spread operator, it is on the Typescript roadmap for TS 2.0.
Activity
okian commentedon Jan 16, 2016
It's not related but i'm just curious to know how do you capture your gifs? I capture the screen with Quicktime and then convert that to gif. Is there any better solution (direct / 1 phase) for that?
AndrewRayCode commentedon Jan 16, 2016
I use LiceCap
felixfbecker commentedon Jan 17, 2016
@moostad I can recommend ScreenToGif :)
egamma commentedon Jan 18, 2016
Johannes Rieken (@jrieken) let me take this one. I'll try to come up with repro steps.
egamma commentedon Jan 18, 2016
delvarworld I've tried to reproduce it with a minimal setup and things work fine (see gif below). Since ES6 is now the default you no longer need to define it as the
targetin thejsconfig.json.Since you do not even get a hover over
anglehints at that Code's JavaScript worker has crashed. In this case you should see an exception in the console. Can you open the developer toolsHelp>Toggle Developer Toolsand switch to theConsoletab. Does an error show up?Can you reproduce the above problems after a fresh restart?
Did you get into this situation after #1991? In this case the the JS worker will have crashed. The work around is to restart Code
cmd+p,Reload Window.Do you have any extensions installed (e.g.
eg2.js-is-jsx)? Can you try to reproduce the problem when you start code with the--disable-extensionsoption.AndrewRayCode commentedon Jan 18, 2016
I checked the console, looks like vscode crashes on startup (before I type anything):
My project in question is open source and you can check it out. This file, Game.js is the only file I have open as you can see in the sidebar:
egamma commentedon Jan 18, 2016
delvarworld having access to the source code is great.
However, I wasn't yet able to reproduce your issues on OS X or Win see the gif below.
Johannes Rieken (@jrieken) any additional insights from the stack trace?
egamma commentedon Jan 18, 2016
This the refactoring scenario from #1991
AndrewRayCode commentedon Jan 18, 2016
It tells me I'm up to date...
Version 0.10.6 (0.10.6)
Does visual studio code do any sort of caching of the project?
I guess you could try an
npm installtoo in the project root?egamma commentedon Jan 18, 2016
Yes 0.10.6 is the latest and the version I've used (in addition to the latest).
Code only caches the UI state (last opened file).
Running npm install is a good suggestion (I was assuming node_modules are excluded in jsconfig.json), but it is a difference. I currently run into npm timeouts I'll try again later.
egamma commentedon Jan 19, 2016
npm was in better shape today and I could run
npm install.After the
npm installI can reproduce the crash:src/containers/Game/game.js.Here is a work around. Move the
jsconfig.jsoninto thesrcfolder. Thejsconfig.jsonfile defines the root of a JS project and you can have more than one project context inside a workspace. I don't understand your source structure well enough yet, whether there should be anotherjsconfig.jsoninside another folder.There is still a bug. I speculate that a top-level JS file refers to as JS file in a node module which results in a loop in the import graph, that makes the ImportAndExportRewriter recurse. We will replace the entire JS infrastructure with Salsa (see microsoft/TypeScript#4789) (preview Jan, default Feb). We will investigate whether it is worthwhile to fix this issue in the soon to be deprecated code base.
We will add more guidance on where to put the jsconfig.json to the doc (microsoft/vscode-docs#119).
On a topic unrelated to this issue. I notice, that you do not add any typings files
*.d.tsfiles to get Intellisense for libraries like React. This is documented here https://code.visualstudio.com/docs/languages/javascript#_intellisense-support.jrieken commentedon Jan 19, 2016
It seems to recurse forever here
/some-game/static/dist/main-9b9280d716fd487e103f.js@1096jrieken commentedon Jan 19, 2016
The expression at that offset is so long and complex (~450.000 characters) that we shouldn't use recursion.
jrieken commentedon Jan 19, 2016
I can make the
ImportExportRewriternot use recursion anymore (while-loop ftw) but then the TypeScript compiler runs into the same issue during type binding. Once we have adopted project Salsa it will be good again because in recent version of TS this is fixed.delvarworld A different workaround is to also exclude
static/distfromjsconfig.json.AndrewRayCode commentedon Jan 19, 2016
Thanks Johannes Rieken (@jrieken) and Erich Gamma (@egamma), adding
static/distto ignore looks like it gives me a little bit of intellisense, however...Because most of my files use the ES7 spread operator, it now thinks that my entire file is in error. Unfortunately, every time I find a workaround to a show-stopping bug in vscode (of which there have been many), I hit another. I can no longer afford time contributing to this project. Good luck!
egamma commentedon Jan 20, 2016
delvarworld thanks for joining our journey up to now. We got some really good insights from your project and we will continue to use it as a test case.
Just FYI, the ES7 spread operator, it is on the Typescript roadmap for TS 2.0.
Good luck to you as well.
jrieken commentedon Jul 13, 2016
closing as we track JS related issues in the TypeScript land