You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discovered while working on #152358. In this PR, I tried to change DefaultResidentCompiler to call flush on the stdin sink of the compiler frontend process after every writeln call.
However, this caused tests within hot_reload_web_test.dart to flake (or even fail fairly consistently depending on the host machine).
After instrumenting DefaultResidentCompiler with tracking and logging code, I was able to determine that the flakes occur due to a DefaultResidentCompiler::accept call being concurrent with a DefaultResidentCompiler::compileExpressionToJs call. (Unfortunately, I've lost this logging code, but you can at least see the failure in this old PR check).
While this issue was discovered in the hot reload for web tests, I don't believe this issue is specific to them.
#18618 modified DefaultResidentCompiler to force compilations to happen serially. However, nothing enforces that an accept or reject is sent to the compiler before the next compilation is sent off. I am not sure if this currently causing any bugs, but it seems like a pitfall that easily could.
I plan to workaround this issue in #152358 since troubleshooting and fixing it would block troubleshooting the top crasher of the flutter tool.