Skip to content

Commit 59905c4

Browse files
nshahanCommit Queue
authored andcommitted
[ddc] Avoid passing previous dill for standalone hot restart tests
A hot restart should create a fresh compile and reset the chain of history for hot reload changes. In the "standalone" test suite (without the use of the frontend server) this should be achieved by not passing the previous .dill file when compiling with DDC. Change-Id: If729e62d3f65fd263d5b40d5dad9a5d4ed0d5839 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/450184 Reviewed-by: Nate Biggs <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]>
1 parent b4e0dc2 commit 59905c4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

pkg/dev_compiler/test/hot_reload_suite.dart

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,10 @@ abstract class DdcStandaloneSuiteRunner
12511251
.path;
12521252
}
12531253

1254-
List<String> _getDdcArguments(String deltaKernelPath, bool recompile) {
1254+
List<String> _getDdcArguments(
1255+
String deltaKernelPath,
1256+
bool recompileForHotReload,
1257+
) {
12551258
return [
12561259
'--modules=ddc',
12571260
'--canary',
@@ -1262,7 +1265,7 @@ abstract class DdcStandaloneSuiteRunner
12621265
'--multi-root-scheme=$filesystemScheme',
12631266
'--experimental-output-compiled-kernel',
12641267
'--experimental-emit-debug-metadata',
1265-
if (recompile && acceptedDill != null)
1268+
if (recompileForHotReload && acceptedDill != null)
12661269
'--reload-last-accepted-kernel=$acceptedDill',
12671270
'-o',
12681271
emittedFilesDir.uri.resolve('out.js').path,
@@ -1295,7 +1298,10 @@ abstract class DdcStandaloneSuiteRunner
12951298
final deltaKernelPath = _createDeltaKernelPath(generation);
12961299
final response = await controller.doWork(
12971300
WorkRequest(
1298-
arguments: _getDdcArguments(deltaKernelPath, true),
1301+
arguments: _getDdcArguments(
1302+
deltaKernelPath,
1303+
!test.isHotRestart[generation]!,
1304+
),
12991305
inputs: [Input(path: deltaKernelPath)],
13001306
),
13011307
);

0 commit comments

Comments
 (0)