Open gskinner opened 3 years ago
Chatting with Dan, it sounds like the best solution will be deferring file writes, at least for now. This will take some restructuring, and might make sense to combine with work on #62 (NOTE: images should probably be written first if we auto export them)
Flutter's automatic hot reload has a 50ms debounce, but because we parse and write widgets sequentially sometimes the delay between writes exceeds this. In some cases, that can lead to errors in Flutter's debug console because it attempts a build while subsequent files are still being written.
It should be possible to defer all file writes to the end of a parse, which should mostly resolve the issue (barring any massive files that take >50ms to write, or any file system delays).
I'm chatting with Dan, who devs the Flutter plugin for VS Code about more reliable solutions.