mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Use unsafePackageSerialization when running tests (#22407)
This commit is contained in:
parent
85a4591aa3
commit
4bd6ad7395
@ -250,7 +250,7 @@ class ResidentCompiler {
|
||||
ResidentCompiler(this._sdkRoot, {bool trackWidgetCreation = false,
|
||||
String packagesPath, List<String> fileSystemRoots, String fileSystemScheme,
|
||||
CompilerMessageConsumer compilerMessageConsumer = printError,
|
||||
String initializeFromDill})
|
||||
String initializeFromDill, bool unsafePackageSerialization})
|
||||
: assert(_sdkRoot != null),
|
||||
_trackWidgetCreation = trackWidgetCreation,
|
||||
_packagesPath = packagesPath,
|
||||
@ -258,7 +258,8 @@ class ResidentCompiler {
|
||||
_fileSystemScheme = fileSystemScheme,
|
||||
_stdoutHandler = _StdoutHandler(consumer: compilerMessageConsumer),
|
||||
_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.
|
||||
if (!_sdkRoot.endsWith('/'))
|
||||
_sdkRoot = '$_sdkRoot/';
|
||||
@ -272,6 +273,7 @@ class ResidentCompiler {
|
||||
Process _server;
|
||||
final _StdoutHandler _stdoutHandler;
|
||||
String _initializeFromDill;
|
||||
bool _unsafePackageSerialization;
|
||||
|
||||
final StreamController<_CompilationRequest> _controller;
|
||||
|
||||
@ -369,6 +371,9 @@ class ResidentCompiler {
|
||||
if (_initializeFromDill != null) {
|
||||
command.addAll(<String>['--initialize-from-dill', _initializeFromDill]);
|
||||
}
|
||||
if (_unsafePackageSerialization == true) {
|
||||
command.add('--unsafe-package-serialization');
|
||||
}
|
||||
printTrace(command.join(' '));
|
||||
_server = await processManager.start(command);
|
||||
_server.stdout
|
||||
|
||||
@ -238,7 +238,8 @@ class _Compiler {
|
||||
packagesPath: PackageMap.globalPackagesPath,
|
||||
trackWidgetCreation: trackWidgetCreation,
|
||||
compilerMessageConsumer: reportCompilerMessage,
|
||||
initializeFromDill: testFilePath
|
||||
initializeFromDill: testFilePath,
|
||||
unsafePackageSerialization: true,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user