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

All types are stale while origin is not explicitly saved #636

Closed
pushkine opened this issue Oct 26, 2020 · 2 comments
Closed

All types are stale while origin is not explicitly saved #636

pushkine opened this issue Oct 26, 2020 · 2 comments
Labels
feature request New feature or request Fixed Fixed in master branch. Pending production release.

Comments

@pushkine
Copy link
Contributor

pushkine commented Oct 26, 2020

A type coming from any other file will be stale until that other file is saved
Code_2020-10-26_17-52-26
Code_2020-10-26_17-52-56

My main concern is about the place where the extension gets the stale types from, I hope that those types being stale does not mean that the extension is running a whole duplicate typescript language server concurrent to the one vscode runs for standard .ts files

That would certainly explain why svelte types are only available within .svelte files... Is it a misconfiguration on my part ?

@pushkine pushkine added the bug Something isn't working label Oct 26, 2020
@dummdidumm
Copy link
Member

dummdidumm commented Oct 26, 2020

Your guess is right, it's a separate TS language server instance running. It's because it's not possible to my knowledge to add additional behavior on top of the existing TS server. There are TS plugins but those only run in the IDE, not when executing ts from the command line , so something like svelte-check would not be possible. That's also why the language server only runs on Svelte files, updates from outside are not known to it unless saved to disk.

If you know ways to improve it, I'm eager to hear your suggestions.

Related: #580

@dummdidumm dummdidumm added feature request New feature or request and removed bug Something isn't working labels Nov 3, 2020
@dummdidumm
Copy link
Member

Maybe we can solve this in a way specific to the vscode extension by listening to other documentchange-events in the client and forward ts/js changes (denounced, 1 second) through a specific event to the language server. Diagnostics could be triggered afterwards, too.

dummdidumm pushed a commit to dummdidumm/language-tools that referenced this issue Jan 17, 2021
sveltejs#636
Listen to document text changes and manually update TS/JS files in the language server through a dedicated notification message
dummdidumm added a commit that referenced this issue Jan 17, 2021
#636
Listen to document text changes and manually update TS/JS files in the language server through a dedicated notification message
@dummdidumm dummdidumm added the Fixed Fixed in master branch. Pending production release. label Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request Fixed Fixed in master branch. Pending production release.
Projects
None yet
Development

No branches or pull requests

2 participants