-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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(gatsby): don't ignore SOURCE_FILE_CHANGED event #30127
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.
It makes perfect sense to me.
I guess the only thing that confuses me a little bit - why did we ignore SOURCE_FILE_CHANGED
in the first place there? Maybe there was some edge case?
I ignored it because previously we weren't using it to decide whether to recompile, we were just using it to decide whether to extract queries. As we were about to extract queries anyway, we didn't need to add a flag to say to do it |
(cherry picked from commit f6d1c09)
(cherry picked from commit f6d1c09)
Published in |
Description
We are currently ignoring
SOURCE_FILE_CHANGED
event inreloadingData
state. This seems to cause problems:If we are in this state and we ignore that event, but
gatsby/packages/gatsby/src/services/start-webpack-server.ts
Lines 47 to 55 in a8f7101
will mark webpack recompilation to run but it won't (until something else potentially in the future trigger another recompilation).
This might result in at least some runs getting stuck -
GATSBY_DIAGNOSTIC_STUCK_STATUS_TIMEOUT
reporting things like:This might also be source of at least some of double save issues