- 
                Notifications
    You must be signed in to change notification settings 
- Fork 86
          During hot-restart, wait to run main when pause_isolates_on_start is true
          #2378
        
          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
Conversation
main
      mainmain when pause_isolates_on_start is true
      main when pause_isolates_on_start is truemain when pause_isolates_on_start is true (webdev, g3)
      main when pause_isolates_on_start is true (webdev, g3)main when pause_isolates_on_start is true
      main when pause_isolates_on_start is truemain when pause_isolates_on_start is true
      main when pause_isolates_on_start is truemain when pause_isolates_on_start is true
      | 
 Currently it is used by the expression compiler tests on the ddc test configurations in the SDK and it is also used by the benchmarking infra when running code with DDC. There is a very minor test in the SDK that runs on the  We will be adding more configs and tests in the near future though. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again work walking me through these changes. LGTM but we will need to revisit in the future to reduce the size of the window between clearing breakpoints and resetting them when were ready to support a stateful hot reload.
During a hot-restart, if
pause_isolates_on_startistrue, DWDS waits for a call toresumebefore running the app's main method. This gives the debugging client time to re-set any breakpoints before the app is run.When using
RequireStrategy(flutter, webdev):dwds/web/reloader/require_restarter.dartwaits for thereadyToRunMainfuture before calling themainmethodWhen using
DdcStrategy(g3):readyToRunMainfuture is converted to a promise and passed topkg/dev_compiler/lib/js/ddc/ddc_module_loader.js(externally, different script internally), which then waits for it to resolve before calling themainmethodWork towards flutter/devtools#7231