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
Follow symlinks outside of watched folder #232
base: main
Are you sure you want to change the base?
Conversation
Looks like tests are failed, can you fix it? |
Solves webpack#231 and updates the README to match.
Still got a lot of remote environments failing the tests, but the machines I've tested on have been passing 100% of the unit tests reliably. I'll see if I can reproduce the failures somehow, unless it's not necessary as the required ones are passing. |
It's always the polling servers failing and I don't know why. |
|
Will it help? |
Well, I've already seen the logs, I'm just wondering if you know whats different about the polling servers vs the normal ones, as only the polling servers are reliably failing these tests. |
I did some changes, please rebase |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #232 +/- ##
==========================================
+ Coverage 91.55% 92.88% +1.32%
==========================================
Files 6 6
Lines 1042 1054 +12
Branches 250 255 +5
==========================================
+ Hits 954 979 +25
+ Misses 88 75 -13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Weird... Need to to tests... |
Ok so the issue is with the WATCHPACK_POLLING env variable. I guess that's what was different about those "polling" servers. I'm guessing the initial parameter in doScan is probably what's screwing things up, I'll look into fixing it. |
Feel free to feedback |
fb9accd
to
fa835be
Compare
lib/DirectoryWatcher.js
Outdated
@@ -106,13 +106,14 @@ class DirectoryWatcher extends EventEmitter { | |||
} | |||
} | |||
}; | |||
this.watcher.on("change", this.onWatchEvent.bind(this)); |
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.
I am afraid about perf here...
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.
Didn't end up being necessary anyway, the new solution is simpler
Tests are stuck again, should work this time tho |
The only thing now is that Watchpack Errors will print for a moment when a followed symlink is invalid, which is the case for a few of the tests, however this seems like it should be the correct behavior anyway, unless we don't want to warn users at all when an invalid symlink is watched. |
Ok looks like Windows is still failing when polling actually |
lib/DirectoryWatcher.js
Outdated
this.watcherManager.options.followSymlinks | ||
) { | ||
try { | ||
symlinkStats = fs.statSync(itemPath); |
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.
Do we need to do it in the sync way?
Solves #231 and updates the README to match. Next.js depends on this package, and this would make development much nicer (vercel/next.js#53175).