-
Notifications
You must be signed in to change notification settings - Fork 109
Issues listening for file changes #264
Comments
@NRKO I bumped into the same issue when trying to use dinghy with go framework like buffalo. However, I workaround it by using gin reload utility. Here is the solution gobuffalo/buffalo#620, hope that helps. |
The I'm not familiar with CompileDaemon but it looks like it uses inotify underneath to watch to file changes, so I'm a little surprised it doesn't "just work". Just to make sure, is the code you're editing in your HOME folder somewhere? Dinghy only syncs and watches the user's home dir. If you install |
@cayter Thanks for that! Altho I would prefer not to do something so "hacky".:) I confirm that the code I am editing is in my HOME folder. I just installed
That's all I have unfortunately. I also ran the and now I only get this:
|
Hm then inotify events aren't even getting triggered, this may be difficult to debug remotely. Are you able to share your docker container config, either the How about this minimal test from the fsevents_to_vm readme? You don't need to run fsevents_to_vm manually for this: docker run --rm -it -v $HOME:/fstest ubuntu:trusty
# inside the container
apt-get update && apt-get install -y inotify-tools
inotifywait /fstest Then |
Oh also let's make sure the daemon is still running and didn't die due to #262 -- do you see a |
I know it's really hard to debug like this remotely and I really appreciate the help! So I did the My Dockerfile config is as follows:
I tried to edit the file with vim inside my host computer while in the container I had I'm not sure if it helps but my |
Oh OK that's good info thanks. With that extra debug info, my best guess is that this is the same issue covered in codekitchen/fsevents_to_vm#7 , which I had honestly forgotten about until I just started looking through the project again, I wish I'd made that connection sooner. Basically, right now I still think this is probably fixable, I just haven't had a chance to dig into it yet. It sounds like it is a fairly widespread issue though, so I'll try to schedule some time for that soon. |
That's great news if it can be fixed! I really appreciate you taking the time to look into this! Altho I'm not very familiar with the |
I've got a WIP branch that simulates WRITE_CLOSE events, which appears to be enough to fix that original filed issue. However, it doesn't look like that's good enough for the inotify.go library (and thus CompileDaemon), which doesn't watch for WRITE_CLOSE and requires an actual MODIFY event. The only way to get a modify event is to actually modify the file in the docker VM, which is of course a lot more problematic... I'll have to think about it for a while. I'm not sure what the solution could be yet. |
Hi there,
First of all wanted to really give my thanks to you for this amazing tool! It really made my life easier using docker under macOs.
Sadly though I'm opening this issue because I am looking for a fix for the following scenario.
I am developing in Go and I'm using this https://github.com/githubnemo/CompileDaemon in order to listen to file changes and automatically rebuild my go binary.
However when I boot up dinghy and sequently my Go container every change I make in my IDE will not get picked up by the daemon. But when I don't use dinghy and just use native docker for mac without any magic the daemon works correctly.
Any idea what kind of fix I can apply to solve this annoying issue? Cuz as of now it kind of forces me to always skip on using dinghy for my Go projects.
I really appreciate any help you could provide!
Some additional info:
Dinghy
Version 4.6.1
Virtualbox
Version 5.1.30 r118389 (Qt5.6.3)
Boot2Docker
version 17.09.1-ce, build HEAD : e7de9ae - Fri Dec 8 19:41:36 UTC 2017
Docker version
17.09.1-ce, build 19e2cf6
Firewall
deactivated
dinghy-FsEvents.output is empty
PS.
I should probably mention as well that the file actually does update correctly inside the container if I modify it in my IDE, it just doesn't trigger a rebuild event for the daemon.
Running
fsevents_to_vm start ./
manually I get this output:The text was updated successfully, but these errors were encountered: