fava icon indicating copy to clipboard operation
fava copied to clipboard

File watcher is not work perfectly with symlink

Open invzhi opened this issue 11 months ago • 1 comments

I'm using git-sync and fava with docker-compose to share the ledger with my partner.

git-sync "publishes" each sync through a worktree and a named symlink to ensure an atomic update. image

The problem is that when I update and push the ledger for the first time after the fava docker runs, fava can catch changes. But when I update and push the ledger again, fava cannot catch changes. This means in my situation, fava can only catch changes for the first time.

I checked the code. Maybe the cause is fava only watches the absolute path of files. https://github.com/beancount/fava/blob/e71d724a118d848c8136da521798d397b3c214f2/src/fava/core/watcher.py#L147-L148

BTW, I tried --poll-watcher option. It works.

invzhi avatar Jan 09 '25 06:01 invzhi

See also #1849 which sounds similar in that it might not work for some more complicated setups. If you want to add some logic to automatically switch to the polling watcher for this sort of setup, a PR would be welcome, otherwise I'd close this as "not planned".

yagebu avatar May 26 '25 18:05 yagebu