We see an error when running fable watch (nagareyama RC2).
dotnet fable watch --outDir build --run webpack-dev-server --config webpack.config.js --port 8083
...
watch : The file watcher observing 'C:\code\eCarApp\src\eCarCloud\' encountered an error: Too many changes at once in directory:C:\code\eCarApp\src\eCarCloud\.

Given that this is the initial run - we did not change any file at that point
Hmm, looking at the logs it seems you're running two fable process with the same options, the only difference is the port passed to webpack-dev-server. Is there a reason for that? It may be the watchers of the two processes are conflicting.
Those are two projects that share some files. But distinct projects on different ports and different fsproj in different folders
This is very strange, the watcher is not activated until the compilation. And in your logs I cannot see the "compilation finished" message: https://github.com/fable-compiler/Fable/blob/5ef69ef62cc6eb2a3c03dbc65f0e78f9b7698d78/src/Fable.Cli/Main.fs#L503-L510
Not sure if related, but I'm creating and disposing a new FileSystemWatcher instance for every watch compilation cycle, maybe that's not a good practice? https://github.com/fable-compiler/Fable/blob/5ef69ef62cc6eb2a3c03dbc65f0e78f9b7698d78/src/Fable.Cli/Main.fs#L233-L243
Also, does the error happen every time and in multiple machines?
No it's not happening all the time. But often enough
Did you find something?
The issue closed automatically when merging #2258. Can you try with latest RC 4 and see if the error is gone?
Yes I did not see it anymore. Thanks a lot
scratch that. it's back
Damn! Would it be possible to have a repro? What's your environment? Does the error happen less often at least now?
I think it only happens when there are files from previous builds. never saw it after git clean
What happens after you see the message? The compiler stops working immediately or first compilation at least finishes? Are the logs always the same? I'm surprised the error happens before seeing "Watching ." which means the watcher has started. Does the error happen if you only run one instance of Fable at once? Can you share the folder structure of your project?
ok I think this is not a fable issue. eCarCloud is actually a .NET Core issue. So I blame dotnet watch.
Sorry for all the confusion. I'm confused as fuck
No worries, this made me realize I wasn't attaching the Error event in the watcher. Hopefully now it will be more robust.
Most helpful comment
ok I think this is not a fable issue. eCarCloud is actually a .NET Core issue. So I blame dotnet watch.
Sorry for all the confusion. I'm confused as fuck