rerun icon indicating copy to clipboard operation
rerun copied to clipboard

Support tcp connect as an alternative to local filesystem watching

Open lox opened this issue 9 years ago • 0 comments

A common development environment (at least under OSX) is to use a virtual machine to run a development environment and use NFS or another network filesystem to mount your code locally for editing.

The issue with this and reloaders like rerun is that notifications don't pass over NFS. This is a common problem documented in the ruby listen gem, which provides a basic protocol for forwarding generic filesystem change events over TCP.

What this pull request implements is a -connect option that connects to a TCP event stream, and uses these events instead of watching for local events.

Consider this scenario:

host1> listen --forward :4000 -d .  
host2> rerun -connect host1:4000 github.com/lox/exampleapp

Rerun connects to the server that listen starts, and when files change on host1, they are passed to host2 to trigger a reload. Because the filesystems are shared over NFS between the hosts, the changed code is there.

lox avatar May 22 '15 06:05 lox