-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Typescript 2.6 service (tsserver): cannot reload files without open projects #19336
Comments
@sheetalkamat can you take a look. |
@anstarovoyt Before we propose and make change in the API, I would like to know the real issue here. We do watch all the files and depend on it to have correct state and set the correct text as watch callbacks are invoked so I am not sure what you mean by
Having said that we can easily make command |
There are several cases:
|
…d file already containing its own text Fixes #19336
@anstarovoyt Is it possible for you to check if #19479 fulfills what you asked for? |
yes, definitely |
…d file already containing its own text Fixes #19336
Starting from typescript 2.6 the tsserver caches ScriptInfo-s even if there is no open projects (or files under InferredProject) with the infos.
It is a problem for us because now we cannot properly handle changed files for compilation.
Our compilation implementation (if there is no open projects / files):
In previous versions the action (1) refreshed all files so all the files always were up-to-date.
After the changes in 2.6 the action (1) doesn't load actual contents for the files if the project was open before. Of course there are file watchers that will handle the content updates but they have a gap in couple seconds.
On the other side IDE has the necessary information but we cannot reload file content without open project (see src/server/session.ts:1346).
The best solution for us is to allow to run "reload" action without open project if the script info is loaded in the service.
The text was updated successfully, but these errors were encountered: