-
Notifications
You must be signed in to change notification settings - Fork 12.8k
TSServer errors for in-memory only resource #21204
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
Comments
@mjbvz currently we have notion called dynamic files and that uses file names that start with |
Yes, that would be a fairly easy change on the vscode side. Was this added in 2.7? Should we also do this for untitled files? |
#17791 added this as we need files to represent debugger created memory only files. |
Tried making suggested change to send untitled documents as
|
I think thats because the projectRootPath is set? Can you please try not setting projectRootPath in the request. Thanks. |
Ok, gave that a try and it fixed untitled files but not the interactive playground files for some reason. Here's the ts server log: tsserver.log Main error:
|
@mjbvz can you please try tsserver.js built from branch https://github.com/Microsoft/TypeScript/tree/detailDebugFail to get more detailed information. I see assert in the log but cant tell from it whats going on. The mock test i created seems to be running ok.
|
Hey, I don't see that branch on Microsoft/TypeScript. Did you just push it today? |
I am sorry, i merged that PR and deleted the branch without realizing that i shared it with you here. Is it possible to use latest build. That should contain the detailed debug failure to investigate further.. |
Here's the updated log with the latest ts build from master: tsserver.log |
Ok thats because the files are called dynamic if their baseName starts with "^" And the name of the file is |
Also while looking at this i realised that that even after changing this you would run into more issues. The reason being the scenario for dynamic file always uses external project.. So you should be creating external project with name ^vs_code_editor_walkthrough.md#1.js and have it contain a file ^vs_code_editor_walkthrough.md#1.js. Eg. look at the test: https://github.com/Microsoft/TypeScript/blob/master/src/harness/unittests/tsserverProjectSystem.ts#L1189 |
I do not think we should require that. why can not we just make the inferred project scenario work for them? |
Yes, that would be a non-trivial change on our side. Could we perhaps add a flag on the TSServer |
@mhegazy we could make it non required and project with dynamic file as root to have current directory to be tsserver current directory |
@mjbvz taking the flag means we need to store the info .. currently we are in good spot of detecting the in memory based on file name .. I think we could make file as dynamic if the name irrespective of base starts with ^ |
That sounds better than requiring VSCode to create an external project. |
…starting with ^ as dynamic file Fixes #21204
@sheetalkamat Just tested that branch and the interactive playground seems to be working now. Here's the change on our side: microsoft/vscode#42001 |
…starting with ^ as dynamic file Fixes #21204
TypeScript Version: 2.7.0-dev.20180108
From microsoft/vscode#40915 (comment)
Repo
These files are implemented using a custom uri scheme
walkThroughSnippet
that only exists in-memoryExpected behavior:
Works as expected.
Actual behavior:
Errors on these files
Here's the complete tsserver log: tsserver.log
tsserver.log
The text was updated successfully, but these errors were encountered: