@@ -435,7 +435,8 @@ Please provide a valid TCP port (an integer between 0 and 65535, inclusive).
435
435
final String targetPlatform = getNameForTargetPlatform (TargetPlatform .web_javascript);
436
436
final String sdkName = await device! .device! .sdkNameAndVersion;
437
437
438
- late UpdateFSReport report;
438
+ // Will be null if there is no report.
439
+ final UpdateFSReport ? report;
439
440
if (debuggingOptions.buildInfo.isDebug && ! debuggingOptions.webUseWasm) {
440
441
await runSourceGenerators ();
441
442
// Don't reset the resident compiler for web, since the extra recompile is
@@ -469,6 +470,7 @@ Please provide a valid TCP port (an integer between 0 and 65535, inclusive).
469
470
return OperationResult (1 , 'Failed to recompile application.' );
470
471
}
471
472
} else {
473
+ report = null ;
472
474
try {
473
475
final WebBuilder webBuilder = WebBuilder (
474
476
logger: _logger,
@@ -490,8 +492,9 @@ Please provide a valid TCP port (an integer between 0 and 65535, inclusive).
490
492
}
491
493
}
492
494
493
- late Duration reloadDuration;
494
- late Duration reassembleDuration;
495
+ // Both will be null when not assigned.
496
+ Duration ? reloadDuration;
497
+ Duration ? reassembleDuration;
495
498
try {
496
499
if (! deviceIsDebuggable) {
497
500
_logger.printStatus ('Recompile complete. Page requires refresh.' );
@@ -578,12 +581,12 @@ Please provide a valid TCP port (an integer between 0 and 65535, inclusive).
578
581
fullRestart: true ,
579
582
reason: reason,
580
583
overallTimeInMs: elapsed.inMilliseconds,
581
- syncedBytes: report.syncedBytes,
582
- invalidatedSourcesCount: report.invalidatedSourcesCount,
583
- transferTimeInMs: report.transferDuration.inMilliseconds,
584
- compileTimeInMs: report.compileDuration.inMilliseconds,
585
- findInvalidatedTimeInMs: report.findInvalidatedDuration.inMilliseconds,
586
- scannedSourcesCount: report.scannedSourcesCount,
584
+ syncedBytes: report? .syncedBytes,
585
+ invalidatedSourcesCount: report? .invalidatedSourcesCount,
586
+ transferTimeInMs: report? .transferDuration.inMilliseconds,
587
+ compileTimeInMs: report? .compileDuration.inMilliseconds,
588
+ findInvalidatedTimeInMs: report? .findInvalidatedDuration.inMilliseconds,
589
+ scannedSourcesCount: report? .scannedSourcesCount,
587
590
).send ();
588
591
_analytics.send (
589
592
Event .hotRunnerInfo (
@@ -594,12 +597,12 @@ Please provide a valid TCP port (an integer between 0 and 65535, inclusive).
594
597
fullRestart: true ,
595
598
reason: reason,
596
599
overallTimeInMs: elapsed.inMilliseconds,
597
- syncedBytes: report.syncedBytes,
598
- invalidatedSourcesCount: report.invalidatedSourcesCount,
599
- transferTimeInMs: report.transferDuration.inMilliseconds,
600
- compileTimeInMs: report.compileDuration.inMilliseconds,
601
- findInvalidatedTimeInMs: report.findInvalidatedDuration.inMilliseconds,
602
- scannedSourcesCount: report.scannedSourcesCount,
600
+ syncedBytes: report? .syncedBytes,
601
+ invalidatedSourcesCount: report? .invalidatedSourcesCount,
602
+ transferTimeInMs: report? .transferDuration.inMilliseconds,
603
+ compileTimeInMs: report? .compileDuration.inMilliseconds,
604
+ findInvalidatedTimeInMs: report? .findInvalidatedDuration.inMilliseconds,
605
+ scannedSourcesCount: report? .scannedSourcesCount,
603
606
),
604
607
);
605
608
} else {
@@ -618,14 +621,14 @@ Please provide a valid TCP port (an integer between 0 and 65535, inclusive).
618
621
fullRestart: false ,
619
622
reason: reason,
620
623
overallTimeInMs: elapsed.inMilliseconds,
621
- syncedBytes: report.syncedBytes,
622
- invalidatedSourcesCount: report.invalidatedSourcesCount,
623
- transferTimeInMs: report.transferDuration.inMilliseconds,
624
- compileTimeInMs: report.compileDuration.inMilliseconds,
625
- findInvalidatedTimeInMs: report.findInvalidatedDuration.inMilliseconds,
626
- scannedSourcesCount: report.scannedSourcesCount,
627
- reassembleTimeInMs: reassembleDuration.inMilliseconds,
628
- reloadVMTimeInMs: reloadDuration.inMilliseconds,
624
+ syncedBytes: report? .syncedBytes,
625
+ invalidatedSourcesCount: report? .invalidatedSourcesCount,
626
+ transferTimeInMs: report? .transferDuration.inMilliseconds,
627
+ compileTimeInMs: report? .compileDuration.inMilliseconds,
628
+ findInvalidatedTimeInMs: report? .findInvalidatedDuration.inMilliseconds,
629
+ scannedSourcesCount: report? .scannedSourcesCount,
630
+ reassembleTimeInMs: reassembleDuration? .inMilliseconds,
631
+ reloadVMTimeInMs: reloadDuration? .inMilliseconds,
629
632
).send ();
630
633
_analytics.send (
631
634
Event .hotRunnerInfo (
@@ -636,14 +639,14 @@ Please provide a valid TCP port (an integer between 0 and 65535, inclusive).
636
639
fullRestart: false ,
637
640
reason: reason,
638
641
overallTimeInMs: elapsed.inMilliseconds,
639
- syncedBytes: report.syncedBytes,
640
- invalidatedSourcesCount: report.invalidatedSourcesCount,
641
- transferTimeInMs: report.transferDuration.inMilliseconds,
642
- compileTimeInMs: report.compileDuration.inMilliseconds,
643
- findInvalidatedTimeInMs: report.findInvalidatedDuration.inMilliseconds,
644
- scannedSourcesCount: report.scannedSourcesCount,
645
- reassembleTimeInMs: reassembleDuration.inMilliseconds,
646
- reloadVMTimeInMs: reloadDuration.inMilliseconds,
642
+ syncedBytes: report? .syncedBytes,
643
+ invalidatedSourcesCount: report? .invalidatedSourcesCount,
644
+ transferTimeInMs: report? .transferDuration.inMilliseconds,
645
+ compileTimeInMs: report? .compileDuration.inMilliseconds,
646
+ findInvalidatedTimeInMs: report? .findInvalidatedDuration.inMilliseconds,
647
+ scannedSourcesCount: report? .scannedSourcesCount,
648
+ reassembleTimeInMs: reassembleDuration? .inMilliseconds,
649
+ reloadVMTimeInMs: reloadDuration? .inMilliseconds,
647
650
),
648
651
);
649
652
}
0 commit comments