Skip to content

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

Merged
merged 1 commit into from
May 20, 2025

Conversation

andrewbranch
Copy link
Member

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.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
andrewbranch Andrew Branch
@Copilot Copilot AI review requested due to automatic review settings May 20, 2025 18:34
Copy link
Contributor

@Copilot Copilot AI left a 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()
Copy link
Member

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 ?

Copy link
Member Author

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()
Copy link
Member

Choose a reason for hiding this comment

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

same?

@andrewbranch andrewbranch added this pull request to the merge queue May 20, 2025
Merged via the queue into microsoft:main with commit f750ca2 May 20, 2025
23 checks passed
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.

None yet

4 participants