Unverified Commit 4bd6ad73 authored by jensjoha's avatar jensjoha Committed by GitHub

Use unsafePackageSerialization when running tests (#22407)

parent 85a4591a
...@@ -250,7 +250,7 @@ class ResidentCompiler { ...@@ -250,7 +250,7 @@ class ResidentCompiler {
ResidentCompiler(this._sdkRoot, {bool trackWidgetCreation = false, ResidentCompiler(this._sdkRoot, {bool trackWidgetCreation = false,
String packagesPath, List<String> fileSystemRoots, String fileSystemScheme, String packagesPath, List<String> fileSystemRoots, String fileSystemScheme,
CompilerMessageConsumer compilerMessageConsumer = printError, CompilerMessageConsumer compilerMessageConsumer = printError,
String initializeFromDill}) String initializeFromDill, bool unsafePackageSerialization})
: assert(_sdkRoot != null), : assert(_sdkRoot != null),
_trackWidgetCreation = trackWidgetCreation, _trackWidgetCreation = trackWidgetCreation,
_packagesPath = packagesPath, _packagesPath = packagesPath,
...@@ -258,7 +258,8 @@ class ResidentCompiler { ...@@ -258,7 +258,8 @@ class ResidentCompiler {
_fileSystemScheme = fileSystemScheme, _fileSystemScheme = fileSystemScheme,
_stdoutHandler = _StdoutHandler(consumer: compilerMessageConsumer), _stdoutHandler = _StdoutHandler(consumer: compilerMessageConsumer),
_controller = StreamController<_CompilationRequest>(), _controller = StreamController<_CompilationRequest>(),
_initializeFromDill = initializeFromDill { _initializeFromDill = initializeFromDill,
_unsafePackageSerialization = unsafePackageSerialization {
// This is a URI, not a file path, so the forward slash is correct even on Windows. // This is a URI, not a file path, so the forward slash is correct even on Windows.
if (!_sdkRoot.endsWith('/')) if (!_sdkRoot.endsWith('/'))
_sdkRoot = '$_sdkRoot/'; _sdkRoot = '$_sdkRoot/';
...@@ -272,6 +273,7 @@ class ResidentCompiler { ...@@ -272,6 +273,7 @@ class ResidentCompiler {
Process _server; Process _server;
final _StdoutHandler _stdoutHandler; final _StdoutHandler _stdoutHandler;
String _initializeFromDill; String _initializeFromDill;
bool _unsafePackageSerialization;
final StreamController<_CompilationRequest> _controller; final StreamController<_CompilationRequest> _controller;
...@@ -369,6 +371,9 @@ class ResidentCompiler { ...@@ -369,6 +371,9 @@ class ResidentCompiler {
if (_initializeFromDill != null) { if (_initializeFromDill != null) {
command.addAll(<String>['--initialize-from-dill', _initializeFromDill]); command.addAll(<String>['--initialize-from-dill', _initializeFromDill]);
} }
if (_unsafePackageSerialization == true) {
command.add('--unsafe-package-serialization');
}
printTrace(command.join(' ')); printTrace(command.join(' '));
_server = await processManager.start(command); _server = await processManager.start(command);
_server.stdout _server.stdout
......
...@@ -238,7 +238,8 @@ class _Compiler { ...@@ -238,7 +238,8 @@ class _Compiler {
packagesPath: PackageMap.globalPackagesPath, packagesPath: PackageMap.globalPackagesPath,
trackWidgetCreation: trackWidgetCreation, trackWidgetCreation: trackWidgetCreation,
compilerMessageConsumer: reportCompilerMessage, compilerMessageConsumer: reportCompilerMessage,
initializeFromDill: testFilePath initializeFromDill: testFilePath,
unsafePackageSerialization: true,
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment