Skip to content

Retain the version information of script infos when they are deleted #25249

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

Merged
merged 3 commits into from
Jul 2, 2018

Conversation

sheetalkamat
Copy link
Member

This helps in having to not restart the versioning,
which could potentially have same version but different contents and project could confuse with it

This helps in having to not restart the versioning,
which could potentially have same version but different contents and project could confuse with it
@@ -345,7 +350,7 @@ namespace ts.server {
/**
* Container of all known scripts
*/
private readonly filenameToScriptInfo = createMap<ScriptInfo>();
private readonly filenameToScriptInfo = createMap<ScriptInfoOrVersion>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be simpler to have a different map of deleted scripts with their versions instead of a union type? we only need to touch that on add and delete.

@sheetalkamat sheetalkamat merged commit aa92568 into master Jul 2, 2018
@sheetalkamat sheetalkamat deleted the openSameFileWithDifferentText branch July 2, 2018 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants