cbt icon indicating copy to clipboard operation
cbt copied to clipboard

turn file change monitoring into plugin

Open cvogt opened this issue 9 years ago • 5 comments

if possible. would free CBT from barbary watchservice dependency. CBT would probably still have to provide support for exposing what files to watch, but how that is implemented would be pluggable

cvogt avatar Jun 28 '16 05:06 cvogt

alternatively we might be able to make this a completely independent tool not related to cbt, which just receives a list of files to watch and an executable to run as arguments and let cbt provide them.

cvogt avatar Sep 10 '16 22:09 cvogt

this actually might be such a tool already: https://facebook.github.io/watchman/docs/install.html as linked in #129

cvogt avatar Sep 10 '16 22:09 cvogt

barbary watch service (https://github.com/cvogt/cbt/pull/420) seemed like it was buggy. crashed the jvm frequently. Now switched to fswatch (https://github.com/emcrisostomo/fswatch): https://github.com/cvogt/cbt/pull/429 . Not sure how it would have compared to watchman, but fswatch is cross platform and works great under osx where I tried it.

Seems to work for now. We can revisit splitting this from CBT's core some time in the future. But I am not sure if this is possible. Right now builds need to report what should be watched (and do so as a side-effect). And logic in the shell script inspects the cmd args to see if a user intends to look and then does it. So it is effectively implemented in the shell script.

cvogt avatar Mar 31 '17 13:03 cvogt

If this feature was in a plugin, would a version of it still be available by default? Up until my experience with SBT this feature always required additional setup so I only used it on bigger projects. One of my favorite things moving to Scala initially was that I could always use ~test without any additional configuration.

ShaneDelmore avatar Mar 31 '17 14:03 ShaneDelmore

Yeah, I totally agree this should be an out of the box experience! This ticket is only about potentially modularizing the internal implementation more so CBT's code gets slimmer.

cvogt avatar Mar 31 '17 15:03 cvogt