-
Notifications
You must be signed in to change notification settings - Fork 29
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
"update" doesn't work as expected #4
Comments
That looks like a bug in the handling of line endings. If you
you'll probably see everything on one line. This was masked because my test-system had double line endings, but I can reproduce the issue by using copy/paste into the commandline. You could try changing line 272 in this.typescriptLS.updateScript(file,lines.join('\n')); and rebuild |
Thanks, that worked. Oh, and I also tried the following:
|
Good to know that this partial fix helps - haven't decided yet how to fix this for good. Some of the errors are related to a problem in node's readline implementation (nodejs/node-v0.x-archive#3305, just fixed), in combination with windows-style line-endings ( |
Hello I'm currently making a small plugin (for me) for SublimeText 3 using TSS testing_v09 branch (really great work !). For ref i'm using node 0.10.15 on a windows 64bit machine I've got So i tried in the windows Shell and i've got the same errors/problems The content of the file (test2.ts) : var x = {a:1,b:2};
var y = {c:1,d:2};
x.a;
y.d; I then update in the shell by copy&paste and by typing line by line to: var x = {a:1,b:2};
var y = {c:1,d:2};
var z = {e:1,f:2};
x.a;
y.d; The shell log :
I made a dump like you suggested to Zlumer and the result of the dump file is what it should be: var x = {a:1,b:2};
var y = {c:1,d:2};
var z = {e:1,f:2};
x.a;
y.d; If i reload everything works fine. So I'm not sure what i'm making wrong or is it still a problem with readline ? |
It is not quite the same issue - we're still using a fixed readline (though recent node releases should have the fix anyway). Though the symptons are familiar. I can reproduce the issue with your example, though strangely not with my test script. Will have to think about what is going on here (the file is as expected, but tss still thinks everything is on a single line, as you can verify by indexing beyond the end of line 1; and that in spite of initial file load and update using the same code path for storing the source..). |
Ok, so I got one more problem. I'm trying to get
update
to work - unfortunately, without success.Everything works as expected, but then I do
update
and get an empty completion list. After Ireload
the project, everything works fine again.The code is unchanged, I just
update
it with the same lines.Source code:
Log (I've shortened entry lists):
The text was updated successfully, but these errors were encountered: