Skip to content

Clone watcher compiler configurations before comparison to prevent unintended recompilation #1197

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 4 commits into from
Jun 16, 2025

Conversation

ephemer
Copy link
Contributor

@ephemer ephemer commented Jun 16, 2025

Similar to the issue reported in #778, #1156 appears to have introduced an issue such that --watch mode continuously rebuilds a project due to configuration changes, even if no config changes have occurred.

This PR aims to address that issue by only comparing the relevant parts of the configuration, while ignoring differences in other parts.


With this change:

image

Before this change (current main branch):

image

@ephemer
Copy link
Contributor Author

ephemer commented Jun 16, 2025

Tagging @jakebailey because of his involvement in both #778 and #1156

Also tagging @sheetalkamat because of her involvement in #1078, which appears to be tangentially related to this issue: the difference in configuration appears to come from the cache not being included in one of the configuration objects being compared, while it is included in another.

@ephemer ephemer changed the title Only compare source-file affecting changes in watcher configuration Clone watcher compiler configurations before comparison to prevent unintended recompilation Jun 16, 2025
@ephemer
Copy link
Contributor Author

ephemer commented Jun 16, 2025

Hi @DanielRosenwasser thanks for your review. I just updated the PR with an additional comment. Could you approve again?

@jakebailey jakebailey enabled auto-merge June 16, 2025 17:27
@jakebailey jakebailey added this pull request to the merge queue Jun 16, 2025
Merged via the queue into microsoft:main with commit 276ff5f Jun 16, 2025
22 checks passed
@ephemer ephemer deleted the patch-1 branch June 16, 2025 21:38
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.

3 participants