-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Does not work/tests fail on OpenBSD #221
Comments
@marvinthepa Is |
@alexander-akait I did not find a 2.3.6 Version, did you mean 2.3.1?. Tests in Version 2.3.1 fail as well. I also tried v2.0.0 and v2.0.0-beta.0 and 805b665 (which removed the chokidar dependency). Tests work with the previous commit a1f8f3f. I do not assume that there was a working commit since then 😿 |
I checked the first test more closely. It seems that when watching a directory, the change events
I guess this worked with chokidar because it does the normalization as described in https://github.com/paulmillr/chokidar#how (to get the file name from the rename event of the directory) and registers new watchers for files that appear, so they generate events, too. You would not consider re-introducing chokidar version 3 as a dependency, would you? webpack-dev-server still has a dependency on chokidar anyway, so it would not even introduce new dependencies for people who use it.. |
@marvinthepa In long term dev server will not use chokidar too, maybe you want to backport the solution from chokidar? |
I could give it a try if I find the time, but it seems to me the problem is a complicated one in which I lack expertise. So I probably would end up copying and pasting a lot of code from chokidar into watchpack, and I do not quite see how this would be an improvement over using chokidar directly.. |
@marvinthepa chokidar has many perf problems and required a compilation after instalattion (this is not a problem, but happens for wsl and other exotic systems/subsystems) |
I had a look through the solutions, and if my (very limited) understanding is correct, fixing this in watchpack would require significant changes. For example, using a watcher per directory is not sufficient, as changes to files do not trigger a change event on the containing directory - you need an extra DirectoryWatcher per file (making it a misnomer), and you have to manage them as well. I will not close this issue though, I still find some hope that somebody else wants to tackle this. Would be interesting if this is an issue on other BSDs as well.. It seems to me the whole "watching files" thing is very frustrating on node. Mainly because node itself does not really provide a platform-agnostic API.. |
On OpenBSD, with both node v16.14.2 and v12.22.6, webpack does not recompile when files are changed.
It used to work when chokidar was used for file watching, i.e. before watchpack 2.
watchpack version: 2.4.0
webpack version: 5.73.0
The tests fail as well (on main branch, dc690bb/2.4.0):
The tests pass for the last watchpack 1 release..
I realize that this is probably an issue with the underlying fs.watch implementation, but do you have any hints on how I could get webpack working properly? Relying on polling is not an option, as it utilizes 100% CPU when used with any reasonable polling interval.
Other solutions that rely on kqueue (e.g. https://github.com/guard/guard) do work, so it cannot be impossible. I would like to use one of those, is it possible to notify webpack of changed files e.g. via a notification on a port or domain socket? Could this be achieved in a plugin?
The text was updated successfully, but these errors were encountered: