-
Notifications
You must be signed in to change notification settings - Fork 46
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
Change event is not emitted on Windows when continuously appending to an initially existing file #164
Comments
I have reproduction steps, finally.
@echo off
pushd "%~dp0"
set PATH=%PATH%;C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VisualStudio\NodeJs
echo. > watcher.log
call npm i @parcel/watcher
start cmd /k node watcher.js
(for /l %%f in () do @echo %time%) >> watcher.log
@REM (for /l %%f in () do @echo %time% && timeout /t 1) >> watcher.log
@REM for /l %%f in () do (@echo %time% >> watcher.log)
@REM for /l %%f in () do ((@echo %time% >> watcher.log) && @echo %time%)
@REM for /l %%f in () do ((@echo %time% >> watcher.log) && @echo %time% && timeout /t 0)
@REM for /l %%f in () do ((@echo %time% >> watcher.log) && @echo %time% && timeout /t 1)
const watcher = require('@parcel/watcher');
watcher.subscribe(".", (err, events) => {
console.log(events);
}); Interestingly, all those variants with |
And even more interestingly, events start coming in as soon as I read the file in another process. E.g., it can be enough to run |
It seems this module is using |
Current workaround: a background process doing something like
|
Originally posted in microsoft/vscode#202446
I rarely use
node
, so I did not test reproduction using this code. However, bpasero wrote in microsoft/vscode#202446 (comment):This is what I am doing here.
The text was updated successfully, but these errors were encountered: