watch: track worker thread entry files in --watch mode#62368
watch: track worker thread entry files in --watch mode#62368nodejs-github-bot merged 8 commits intonodejs:mainfrom
Conversation
|
This solves the issue for the worker module itself, but not its dependencies. I.e. if a worker module imports/requires another module, modifying the latter still does not trigger re-run. |
|
I have updated changes to watch dependencies for worker as well, so changes in imported/required modules will now trigger a re-run. |
|
This is the wrong way to solve this, for a myriad of reasons: (based on a cursory glance of the code. Did not bother to actual test it)
Any solution must be integrated into Node's loading pipeline |
|
I will revert back these updates and work on the suggestions |
d26b727 to
ba11d26
Compare
franciscoarturorivera371-cyber
left a comment
There was a problem hiding this comment.
Submit the change.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
@clemyan |
|
The added test already passes on |
|
Sure!! @aduh95 I will update the tests for this. Thanks for your feedback!! |
d4e5305 to
634a756
Compare
|
@aduh95 Please do review the updated tests for the proposed changes based on behaviour of worker file and it's dependencies in --watch mode for both cjs and esm modules. |
|
Can you not put the tests in |
634a756 to
5486d3f
Compare
|
@aduh95 As suggested I have removed tests from |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62368 +/- ##
==========================================
- Coverage 91.47% 89.66% -1.82%
==========================================
Files 357 707 +350
Lines 150883 219563 +68680
Branches 23778 42096 +18318
==========================================
+ Hits 138026 196875 +58849
- Misses 12582 14585 +2003
- Partials 275 8103 +7828
🚀 New features to boost your workflow:
|
9a661cd to
f7a05a3
Compare
|
/cc @nodejs/fs |
f7a05a3 to
e56a31c
Compare
|
@SudhansuBandha ci failures might be related and allwys fail the same tests, can you kindly investigate? |
a48176d to
26adcce
Compare
|
@MoLow I have rebased this PR with main. Will this resolve those CI failures on re run? |
Currently, --watch mode only tracks dependencies from the main module graph (require/import). Worker thread entry points created via new Worker() are not included, so changes to worker files do not trigger restarts. This change hooks into Worker initialization and registers the worker entry file with watch mode, ensuring restarts when worker files change. Fixes: nodejs#62275 Signed-off-by: SudhansuBandha <sudhansu9.vssut@gmail.com>
… and nested dependencies
02e6c2c to
4cba959
Compare
4cba959 to
8fa637a
Compare
|
@MoLow I have updated the event relays in worker to handle RACE conditions for specific scenarios. Kindly review it and provide any feedback. |
|
@MoLow can we proceed with next round of CI run since preliminary checks are successful? |
|
Is it good to be merged with main branch? @MoLow |
|
Landed in 7466249 |
Currently, --watch mode only tracks dependencies from the main module graph (require/import). Worker thread entry points created via new Worker() are not included, so changes to worker files do not trigger restarts.
This change hooks into Worker initialization and registers the worker entry file with the watch mode, ensuring restarts when worker files change.
Fixes: #62275