@@ -111,25 +111,30 @@ Future<int> starter(
111111 final Directory temp =
112112 Directory .systemTemp.createTempSync ('train_frontend_server' );
113113 try {
114- final String outputTrainingDill = path.join (temp.path, 'app.dill' );
115- options = frontend.argParser.parse (< String > [
116- '--incremental' ,
117- '--sdk-root=$sdkRoot ' ,
118- '--output-dill=$outputTrainingDill ' ,
119- '--target=flutter' ,
120- '--track-widget-creation' ,
121- ]);
122- compiler ?? = _FlutterFrontendCompiler (output);
123-
124- await compiler.compile (input, options);
125- compiler.acceptLastDelta ();
126- await compiler.recompileDelta ();
127- compiler.acceptLastDelta ();
128- compiler.resetIncrementalCompiler ();
129- await compiler.recompileDelta ();
130- compiler.acceptLastDelta ();
131- await compiler.recompileDelta ();
132- compiler.acceptLastDelta ();
114+ for (int i = 0 ; i < 3 ; i++ ) {
115+ final String outputTrainingDill = path.join (temp.path, 'app.dill' );
116+ options = frontend.argParser.parse (< String > [
117+ '--incremental' ,
118+ '--sdk-root=$sdkRoot ' ,
119+ '--output-dill=$outputTrainingDill ' ,
120+ '--target=flutter' ,
121+ '--track-widget-creation' ,
122+ '--enable-asserts' ,
123+ '--gen-bytecode' ,
124+ '--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions' ,
125+ ]);
126+ compiler ?? = _FlutterFrontendCompiler (output);
127+
128+ await compiler.compile (input, options);
129+ compiler.acceptLastDelta ();
130+ await compiler.recompileDelta ();
131+ compiler.acceptLastDelta ();
132+ compiler.resetIncrementalCompiler ();
133+ await compiler.recompileDelta ();
134+ compiler.acceptLastDelta ();
135+ await compiler.recompileDelta ();
136+ compiler.acceptLastDelta ();
137+ }
133138 return 0 ;
134139 } finally {
135140 temp.deleteSync (recursive: true );
0 commit comments