You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an annoying issue when working over fuse/sshfs where (I think) sync sees that a file has changed but the contents have not yet been written to the file; a race condition of sorts. Specifically I see this error:
13:23:33.230 [info] /path/to/module.erl:1: Error: no module definition
Usually re-saving the file will trigger a successful compile. I can see one of two paths for remediation:
add a configurable delay between noticing the file has changed and attempting the compilation; or,
when this particular error is emitted, retry the compilation.
I realize that the issue is probably particular to my setup and absolutely understand if you don't want to clutter up code dealing with this; however, if one of these approaches is acceptable, I'd be happy to submit a pull request.
Thanks! And thanks a ton for sync, it's a great utility.
The text was updated successfully, but these errors were encountered:
I'd be open to seeing the fix for this. A combination of the two would be ideal. When the error occurs, set a timeout of X miliseconds before sync should attempt to recompile the file, that way you at least won't cause erlang to spin rapidly trying to recompile the same file. I'd also only try to recompile it once, otherwise someone entering a typo (say forgetting to put -module at the top of their file) won't end up causing an infinite loop trying to recompile a busted file constantly.
If you did want to do a pull request for this, I'd be happy to merge it.
I have an annoying issue when working over fuse/sshfs where (I think) sync sees that a file has changed but the contents have not yet been written to the file; a race condition of sorts. Specifically I see this error:
13:23:33.230 [info] /path/to/module.erl:1: Error: no module definition
Usually re-saving the file will trigger a successful compile. I can see one of two paths for remediation:
I realize that the issue is probably particular to my setup and absolutely understand if you don't want to clutter up code dealing with this; however, if one of these approaches is acceptable, I'd be happy to submit a pull request.
Thanks! And thanks a ton for sync, it's a great utility.
The text was updated successfully, but these errors were encountered: