Open timotheecour opened 4 years ago
Seems like the 1st fswatch nim port that works out of the box for me!
here is some early feedback:
quit(QuitFailure) => use doAssert false, msg or raise an exception instead, see https://forum.nim-lang.org/t/4042
quit(QuitFailure)
doAssert false, msg
is it safe to discard (eg can it silently ignore errors) in discard monitor.handle.fsw_start_monitor() ?
discard monitor.handle.fsw_start_monitor()
doesn't your code leak? i see no destroy in fswatch.nim to release fsw resource
destroy
fswatch.nim
https://github.com/FedericoCeratto/nim-fswatch allows a latency param: var monitor = newMonitor(latency=0.01), it'd be nice to add to the high level API
latency
var monitor = newMonitor(latency=0.01)
the high level API in fswatch.nim is not high-level enough (too C-ish); this seems better (from README in https://github.com/FedericoCeratto/nim-fswatch):
proc callback(eg: EventGroup) = for e in eg: echo e.path, " ", $e.kind, " ", e.time.utc()
Hello friend, Thanks a lot for feedback! I am currently busy but when I have time I'll take in account your wishes.
P.S. I will be happy to accept PRs... :)
Seems like the 1st fswatch nim port that works out of the box for me!
here is some early feedback:
quit(QuitFailure)
=> usedoAssert false, msg
or raise an exception instead, see https://forum.nim-lang.org/t/4042is it safe to discard (eg can it silently ignore errors) in
discard monitor.handle.fsw_start_monitor()
?doesn't your code leak? i see no
destroy
infswatch.nim
to release fsw resourcehttps://github.com/FedericoCeratto/nim-fswatch allows a
latency
param:var monitor = newMonitor(latency=0.01)
, it'd be nice to add to the high level APIthe high level API in fswatch.nim is not high-level enough (too C-ish); this seems better (from README in https://github.com/FedericoCeratto/nim-fswatch):