Skip to content

fix(typescript-plugin): fault tolerance for named pipe servers json file - #4075

Merged
johnsoncodehk merged 3 commits into
vuejs:masterfrom
Simon-He95:master
Mar 20, 2024
Merged

johnsoncodehk merged 3 commits into
vuejs:masterfrom
Simon-He95:master

Conversation

@Simon-He95

Copy link
Copy Markdown
Contributor

After the upgrade, I suddenly found that the syntax in the template was invalid, and then tracked the problem and found that there was a problem reading the file in searchNamedPipeServerForFile. The format may have been broken when writing a certain version, resulting in JSON here. When JSON.parse, an error is reported directly, but no interception is done, and then there is no code prompt. I don’t know if I should delete the temp file directly when there is a problem with parse. At present, I have added try {} catch (e) {} to solve the problem.

The following is the format of the file that I found during troubleshooting.
image

@johnsoncodehk johnsoncodehk changed the title fix(searchNamedPipeServerForFile): parse temp file error fix(typescript-plugin): fault tolerance for named pipe servers json file Mar 20, 2024
@johnsoncodehk

Copy link
Copy Markdown
Member

Thanks! This may be caused by multiple tsserver processes overwriting json files at the same time.

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