Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sshfs related problem #24

Open
bunnylushington opened this issue Oct 10, 2013 · 2 comments
Open

sshfs related problem #24

bunnylushington opened this issue Oct 10, 2013 · 2 comments

Comments

@bunnylushington
Copy link

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.

@choptastic
Copy link
Collaborator

Hi Kevin,

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.

Thoughts?

@choptastic
Copy link
Collaborator

Hi Kevin, did you ever solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants