mfikes / ambly

ClojureScript REPL into embedded JavaScriptCore
http://ambly.fikesfarm.com
Eclipse Public License 1.0
540 stars 21 forks source link

Remote compilation race/glitch on Ubuntu #90

Closed mfikes closed 9 years ago

mfikes commented 9 years ago

I'm running Ubuntu in a VM, and have mounted an iOS simulator running on my Mac.

If I create a new namespace on the Linux filesystem in the VM, and then in the REPL load it, I encounter an error:

cljs.user=> (require 'foo.bar)
nil
cljs.user=> (foo.bar/square 3)
ReferenceError: Can't find variable: foo
    global code (NO_SOURCE_FILE)

Between the require and the subsequent symbol use, I can see the compiler output if I go into the mount point.

If I reload the namespace, it then works.

mfikes commented 9 years ago

The root cause of this is that the default configuration of mount.davfs2 includes this:

delay_upload
       When a file that has been changed is closed, mount.davfs will wait that many seconds before it will upload
       it to the server. This will avoid uploading of temporary files that  will  be  removed  immediately  after
       closing.  If you need the files to appear on the server immediately after closing, set this option to 0.
       Default: 10

This delay means that compiler output written to the device is not seen on the device itself until 10 seconds later. Changing the option to 0 fixes the issue.