Skip to content
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

fix(compiler): handle file rename in watch mode #5968

Closed
wants to merge 2 commits into from

Conversation

tanner-reits
Copy link
Member

What is the current behavior?

Fixes: #3443

When renaming a file in watch mode, it is possible to run into two errors:

  1. A build error resulting from the compiler believing that two components exist with the same tag name (one from the old file name, and one from the new)
  2. An HMR issue where the new file name is not correctly registered with the file watcher. So, changes to the renamed file did not trigger an HMR reload

What is the new behavior?

Addresses both of the issues mentioned above by updating the watched files and compiler context whenever a change is detected that triggers the watch callback

Documentation

N/A

Does this introduce a breaking change?

  • Yes
  • No

Testing

This is a difficult issue to test (especially the HMR since that was not always consistent), so I was only able to perform manual tests

Other information

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

👍

@tanner-reits tanner-reits added this pull request to the merge queue Sep 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Sep 5, 2024
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.

bug: renaming a a component file whilst being watched causes an error
2 participants