-
Notifications
You must be signed in to change notification settings - Fork 132
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
Spago run --watch runs(/compiles) twice with vim #346
Comments
My neovim does this too. But not |
Thanks @klntsky! Setting |
I literally copypasted the implementation from Stack's one, so I'm not sure. I'll take a look |
@googleson78 which OS are you on? (I'm asking because I'm trying to tweak the debounce logic but it doesn't seem to have any effect on macOS) |
Linux (Debian testing) |
@googleson78 could you try the branch from #362? If that doesn't work you could try tweaking the debounce time here |
May it be so that debounce settings do not apply if a file was deleted and re-created, just like Vim does? |
I tried building from #362 and I still get all |
Oh right, now it makes sense, thanks. Then I cannot figure out why it's different from Stack's behaviour |
Because the code is different (it diverged) |
Yeah, though the changes from the original are limited:
And this last thing might be the reason for this happening, but I still don't understand why |
Update: I tried to apply the last fix I mentioned above, from here, and it didn't help :( |
I think I can give it a try. |
I see no way other than re-implementing debouncing. |
The reason why this didn't happen with Stack but it happened with Spago just dawned on me: Stack watches single files, but we match file modification events against globs instead |
So what exactly causes doubled event triggering? |
@klntsky I did not verify this but I suspect that if you watch the single file you might get less events |
Nice to see this fixed! Could we get it released soon? |
@helinko yup, I'm going to cut a release in the next days! |
I'm not sure if this is a bug with
spago
or something stemming from my setup (I don't have the same issue withstack --file-watch
though), so sorry in advance if this is a mistake on my part!Repro steps:
spago init
spago run --watch
src/Main.purs
(even without modifying it). I usevim
to do this step.Expected behaviour:
Files are compiled and run once.
Observed behaviour:
Files are run (and possibly compiled?) twice.
Sample output after a save:
spago
version is0.8.5.0
The text was updated successfully, but these errors were encountered: