Open simulot opened 3 years ago
Interesting. I'm surprised I didn't run into this issue earlier. Definitely looks like debouncing is needed.
Actually - it looks like I did run into this before: https://github.com/vugu/vgrun/blob/master/vgrun-main.go#L202 but it didn't cause the same problems.
Probably this line https://github.com/vugu/vgrun/blob/master/vgrun-main.go#L229 can be changed to some sort of call that will wait, e.g. 100ms and then push to the channel, and if another one comes in within that 100ms it should cancel the first and start the wait over. I'll leave it open to be addressed when I have time, or otherwise I'd be happy to review a PR to fix this. The debounce timeout should have a sensible default and be configurable with a command line flag.
I forgot to mention that I'm running under linux.
Thanks @simulot . If you're able to help with a fix for this, that would be amazing. Otherwise I'll leave this open and get to it when I can.
Potential fix in #9?
As learning project, I try to make a TODO application with vugu. My intention is to break components into packages. I run
vgrun -v main.go
to watch changes and the generate.go contains:My component isn't generated when I save the front/pages/Page1.vugu file The verbose option gives:
Touching the file doesn't help to
Therefore, runing vugugen from shell
vugugen -s -r front/pages/page1
generate the go component. I need to refresh the application path.Editing the root.vugu file works as expected.