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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid double compilation when for context dependencies #16908

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexander-akait
Copy link
Member

@alexander-akait alexander-akait commented Apr 4, 2023

fixes #16886

Summary

馃 Generated by Copilot at f634635

Fix a bug in FileSystemInfo that could cause an error when checking snapshot validity. Add a condition to checkSnapshotValid to handle undefined timestamp hashes in file system snapshots.

Details

馃 Generated by Copilot at f634635

  • Fix a bug where the timestamp hash of a file system snapshot could be undefined, causing an error when comparing it to the current timestamp hash (link)

@webpack-bot
Copy link
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

Copy link
Member

@TheLarkInn TheLarkInn left a comment

Choose a reason for hiding this comment

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

LGTM!

@alexander-akait
Copy link
Member Author

@TheLarkInn I think we can add test case for such case, I will look how we can test it

@@ -2565,6 +2565,7 @@ class FileSystemInfo {
}
if (
snap.timestampHash !== undefined &&
current.timestampHash !== undefined &&
Copy link
Member

Choose a reason for hiding this comment

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

I think this should never be undefined, since it should be computed when its missing.

I think there is some bug somewhere else..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: On Hold
Development

Successfully merging this pull request may close these issues.

Webpack 5 LoaderContext: addContextDependency causes loader to rerun once after any change in watch mode
4 participants