Skip to content

Make sure the script is only attached to project during createProgram execution - #59354

Closed
Johnson Chu (johnsoncodehk) wants to merge 4 commits into
microsoft:mainfrom
johnsoncodehk:attachToProjectValidity
Closed

Johnson Chu (johnsoncodehk) wants to merge 4 commits into
microsoft:mainfrom
johnsoncodehk:attachToProjectValidity

Conversation

@johnsoncodehk

Copy link
Copy Markdown

Fixes #59349

Refer to #59349 (comment).

This should not be called anytime except when creating program and attaching files into the program as this one ensures project and LS are in sync with respect to files and scriptinfos in the program.

This PR adds conditions to attachToProject to cover this assumption.

@typescript-bot TypeScript Bot (typescript-bot) added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jul 19, 2024
@johnsoncodehk Johnson Chu (johnsoncodehk) changed the title Make sure the script is only attached to project during createProgram… Make sure the script is only attached to project during createProgram execution Jul 19, 2024
@johnsoncodehk
Johnson Chu (johnsoncodehk) marked this pull request as draft July 19, 2024 10:26
@johnsoncodehk
Johnson Chu (johnsoncodehk) marked this pull request as ready for review July 19, 2024 11:38
@sheetalkamat

Copy link
Copy Markdown
Member

Not the right approach for the fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'Could not find source file' with Vue plugin when creating new files and using VS Code's file watcher

3 participants