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

Automatic hot reload can generate Flutter debug console errors in some cases #101

Open
gskinner opened this issue Feb 4, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@gskinner
Copy link
Collaborator

gskinner commented Feb 4, 2021

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.

@gskinner gskinner added the bug Something isn't working label Feb 4, 2021
@gskinner gskinner added this to the v2.0.0 milestone Feb 8, 2021
@gskinner
Copy link
Collaborator Author

gskinner commented Feb 8, 2021

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)

@gskinner gskinner removed this from the v2.0.0 milestone May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant