-
Notifications
You must be signed in to change notification settings - Fork 650
Unconditionally set dirtyFilePath in markAsDirty #886
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
if !project.deferredClose { | ||
project.pendingReload = PendingReloadFull | ||
project.markAsDirty() | ||
} | ||
project.updateIfDirty() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to me this shouldnt be called here and should either send notification to client that things have changed and/or update on next request ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we’ll need this because we’ll have to do push diagnostics for config file errors, which aren’t hooked up yet, but I think we could do that for now. I think I’d like to do that in a separate PR though, as this one is just trying to prove that there was a bug and fix it. We’re trying to get things stable for an npm release.
project.markAsDirty() | ||
if project.kind == KindAutoImportProvider || project.kind == KindAuxiliary { | ||
return | ||
project.updateGraph() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same?
Fixes a bug caught by @gabritto in https://github.com/microsoft/typescript-go/pull/879/files/a30a84c490a5d49555a8f46b1516836b75c560e8#r2098483287.
I had to make the other changes in order to make the test fail; there was an unnecessary double update on config file changes that was clearing out the dirty state on the second update.