You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
watch with test not picking up new test files #53077
How often does it reproduce? Is there a required condition?
Can reproduce consistently locally
What is the expected behavior? Why is that the expected behavior?
expected to pick up new files during watch
What do you see instead?
watch doesn't rerun or pick up new file
Additional information
Not sure if this comes under bug or feature request. Assumption I'm making here is intended behaviour is to watch directory for changes. Happy to give this some effort myself if it is a bug, not a c++ dev though.
changed the title [-]watch with test not picking up new test files when watch triggers[/-][+]watch with test not picking up new test files [/+]on May 20, 2024
This is caused by FileWatcher being in the filter mode when you run node --watch --test, which means it finds all the test files at the start and store it in a SafeMap and then it only listens to the changes to the stored files.
Maybe when a new file (with the glob match pattern) add or rename, delete event occur, the runner should re-create the list of files. @MoLow maybe can shine some lights here.
Maybe when a new file (with the glob match pattern) add or rename, delete event occur, the runner should re-create the list of files. @MoLow maybe can shine some lights here.
Awesome, will dig in. @jakecastelli would you like me to jump on that one at the same time? Assuming they will both be based on that safe map. Thanks for helping me out
Activity
[-]watch with test not picking up new test files when watch triggers[/-][+]watch with test not picking up new test files [/+]jakecastelli commentedon May 21, 2024
This is caused by
FileWatcherbeing in thefiltermode when you runnode --watch --test, which means it finds all the test files at the start and store it in aSafeMapand then it only listens to the changes to the stored files.Maybe when a new file (with the glob match pattern) add or rename, delete event occur, the runner should re-create the list of files. @MoLow maybe can shine some lights here.
brettearle commentedon May 21, 2024
Thanks for clarifying Jake, this sounds good. Will wait for MoLow to clarify before digging into it.
jakecastelli commentedon May 23, 2024
Cheers mate, I've also found that rename, delete a watched test file would cause to throw an error #53113.
MoLow commentedon May 24, 2024
that sounds like a good approach
brettearle commentedon May 24, 2024
Awesome, will dig in. @jakecastelli would you like me to jump on that one at the same time? Assuming they will both be based on that safe map. Thanks for helping me out
jakecastelli commentedon May 28, 2024
Sure! Let me know if you need a hand or something
brettearle commentedon Jun 4, 2024
hey @jakecastelli are you in one of the communities so I can ask some basic questions and not bloat this thread?
jakecastelli commentedon Jun 4, 2024
@brettearle sure, I have reached you out.
pmarchini commentedon Aug 6, 2024
Hey Guys, I've noticed the issue has been inactive for a while, so I attempted to resolve it by following the provided suggestions.
brettearle commentedon Aug 7, 2024
Glad you got to this mate, I've been trying to find time and just haven't been able to.
pmarchini commentedon Aug 8, 2024
Hey @brettearle, I tried, but I'm not totally satisfied with the result. It would be great if you could review the PR 😁
Also @jakecastelli, any feedback would be greatly appreciated 🚀
jakecastelli commentedon Aug 8, 2024
I will take a look at your PR asap
jakecastelli commentedon Aug 29, 2024
Fixed by #54225, thanks for the hard work @pmarchini 🚀