When I change a file under a directory passed to --restart, ghcid should restart but instead only reloads. Some details below.
56 allows --restart to accept directories, by expanding any directories "just in time" during the check. Note how files is locally redefined by expanding any directory names in it.
However, the logic in the main loop only restarts if the original argument to --restart has a newer modification time. Otherwise it just reloads. On my OS, changing a file's mtime does not change all of its ancestory directories' mtime -- that's why the logic currently on master is misbehaving in this case.
My OS: Debian 9.
When I change a file under a directory passed to
--restart
,ghcid
should restart but instead only reloads. Some details below.56 allows
--restart
to accept directories, by expanding any directories "just in time" during the check. Note howfiles
is locally redefined by expanding any directory names in it.https://github.com/ndmitchell/ghcid/blob/17775959407125814f782ba39751112e8c956ed9/src/Wait.hs#L63-L64
However, the logic in the main loop only restarts if the original argument to
--restart
has a newer modification time. Otherwise it just reloads. On my OS, changing a file's mtime does not change all of its ancestory directories' mtime -- that's why the logic currently onmaster
is misbehaving in this case.https://github.com/ndmitchell/ghcid/blob/17775959407125814f782ba39751112e8c956ed9/src/Ghcid.hs#L372-L375