Handle getScriptVersion correctly to ensure program structure is checked correctly (#36808)

* Fix tests when there are project references but has disableSourceOfProjectReferenceRedirect

* Handle getScriptVersion correctly to ensure program structure is checked correctly
Fixes #36748

* Harness's language service host doesnt have getProjectVersion.
This means earlier we were creating fresh program everytime we did LS operation
Now we reuse same program, so quick info depends on order of quickinfo demands

* Because same program is used, it unvails a bug that if `export=` is evaluated before finding references, it cant find all definitions from the merge

* Update src/server/project.ts

Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* Make clearSourceMapperCache required

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
Sheetal NandiandNathan Shively-Sanders authored and GitHub committed 2020-02-25 16:11:21 -08:00
1 parent e99173a6f9
commit e89df5ce6f
13 files changed
+171 -39

No files matched your search

+2
View File
@@ -557,6 +557,8 @@ namespace ts.server {
}
getLatestVersion() {
// Ensure we have updated snapshot to give back latest version
this.textStorage.getSnapshot();
return this.textStorage.getVersion();
}