Closed jstepien closed 9 years ago
Have you tested on OS X, last time I looked the JVM used a poll with a long timeout making the watch very unresponsive.
I've just tested it on OS X and yes, it takes unbearably long time to react to changes! In such case I'll close this PR. Instead, I'll leave here a couple of links explaining why this approach won't work until WatchService is properly implemented on Mac.
This patch replaces the 300ms loop with a file watcher. juxt.dirwatch is a wrapper around java.nio.file.WatchService, which provides file watching functionality implemented natively for platforms JVM is built for.
juxt.dirwatch brings no extra dependencies.
Now rebuilds should be instantaneous.