Unverified Commit 64538f4d authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] disable dartdev when calling snapshots directly (#58830)

parent 9dad2d98
...@@ -119,6 +119,7 @@ class BuildRunner extends CodeGenerator { ...@@ -119,6 +119,7 @@ class BuildRunner extends CodeGenerator {
final File buildScript = globals.fs.file(generateResult.stdout.trim()); final File buildScript = globals.fs.file(generateResult.stdout.trim());
final ProcessResult result = await globals.processManager.run(<String>[ final ProcessResult result = await globals.processManager.run(<String>[
globals.artifacts.getArtifactPath(Artifact.engineDartBinary), globals.artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
'--snapshot=${buildSnapshot.path}', '--snapshot=${buildSnapshot.path}',
'--snapshot-kind=app-jit', '--snapshot-kind=app-jit',
'--packages=${globals.fs.path.join(generatedDirectory.path, '.packages')}', '--packages=${globals.fs.path.join(generatedDirectory.path, '.packages')}',
......
...@@ -220,6 +220,7 @@ class BuildDaemonCreator { ...@@ -220,6 +220,7 @@ class BuildDaemonCreator {
// STDIO. // STDIO.
final List<String> args = <String>[ final List<String> args = <String>[
globals.artifacts.getArtifactPath(Artifact.engineDartBinary), globals.artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
'--packages=$buildScriptPackages', '--packages=$buildScriptPackages',
buildScript, buildScript,
'daemon', 'daemon',
......
...@@ -38,6 +38,7 @@ Future<void> generateLocalizations({ ...@@ -38,6 +38,7 @@ Future<void> generateLocalizations({
); );
final ProcessResult result = await processManager.run(<String>[ final ProcessResult result = await processManager.run(<String>[
dartBinaryPath, dartBinaryPath,
'--disable-dart-dev',
genL10nPath, genL10nPath,
'--gen-inputs-and-outputs-list=${dependenciesDir.path}', '--gen-inputs-and-outputs-list=${dependenciesDir.path}',
if (options.arbDirectory != null) if (options.arbDirectory != null)
......
...@@ -166,6 +166,7 @@ class Dart2JSTarget extends Target { ...@@ -166,6 +166,7 @@ class Dart2JSTarget extends Target {
// parse the kernel file for web builds. // parse the kernel file for web builds.
final ProcessResult kernelResult = await globals.processManager.run(<String>[ final ProcessResult kernelResult = await globals.processManager.run(<String>[
globals.artifacts.getArtifactPath(Artifact.engineDartBinary), globals.artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
globals.artifacts.getArtifactPath(Artifact.dart2jsSnapshot), globals.artifacts.getArtifactPath(Artifact.dart2jsSnapshot),
'--libraries-spec=$specPath', '--libraries-spec=$specPath',
...?extraFrontEndOptions, ...?extraFrontEndOptions,
...@@ -186,6 +187,7 @@ class Dart2JSTarget extends Target { ...@@ -186,6 +187,7 @@ class Dart2JSTarget extends Target {
} }
final ProcessResult javaScriptResult = await globals.processManager.run(<String>[ final ProcessResult javaScriptResult = await globals.processManager.run(<String>[
globals.artifacts.getArtifactPath(Artifact.engineDartBinary), globals.artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
globals.artifacts.getArtifactPath(Artifact.dart2jsSnapshot), globals.artifacts.getArtifactPath(Artifact.dart2jsSnapshot),
'--libraries-spec=$specPath', '--libraries-spec=$specPath',
...?extraFrontEndOptions, ...?extraFrontEndOptions,
......
...@@ -226,6 +226,7 @@ class KernelCompiler { ...@@ -226,6 +226,7 @@ class KernelCompiler {
} }
final List<String> command = <String>[ final List<String> command = <String>[
engineDartPath, engineDartPath,
'--disable-dart-dev',
frontendServer, frontendServer,
'--sdk-root', '--sdk-root',
sdkRoot, sdkRoot,
...@@ -627,6 +628,7 @@ class DefaultResidentCompiler implements ResidentCompiler { ...@@ -627,6 +628,7 @@ class DefaultResidentCompiler implements ResidentCompiler {
); );
final List<String> command = <String>[ final List<String> command = <String>[
globals.artifacts.getArtifactPath(Artifact.engineDartBinary), globals.artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
frontendServer, frontendServer,
'--sdk-root', '--sdk-root',
sdkRoot, sdkRoot,
......
...@@ -60,6 +60,7 @@ class AnalysisServer { ...@@ -60,6 +60,7 @@ class AnalysisServer {
); );
final List<String> command = <String>[ final List<String> command = <String>[
_fileSystem.path.join(sdkPath, 'bin', 'dart'), _fileSystem.path.join(sdkPath, 'bin', 'dart'),
'--disable-dart-dev',
snapshot, snapshot,
for (String experiment in _experiments) for (String experiment in _experiments)
...<String>[ ...<String>[
......
...@@ -65,6 +65,7 @@ class FuchsiaKernelCompiler { ...@@ -65,6 +65,7 @@ class FuchsiaKernelCompiler {
final List<String> command = <String>[ final List<String> command = <String>[
globals.artifacts.getArtifactPath(Artifact.engineDartBinary), globals.artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
kernelCompiler, kernelCompiler,
...flags, ...flags,
]; ];
......
...@@ -159,6 +159,7 @@ void main() { ...@@ -159,6 +159,7 @@ void main() {
final FakeCommand fakeCommand = FakeCommand( final FakeCommand fakeCommand = FakeCommand(
command: const <String>[ command: const <String>[
'dart-sdk/bin/dart', 'dart-sdk/bin/dart',
'--disable-dart-dev',
'dart-sdk/bin/snapshots/analysis_server.dart.snapshot', 'dart-sdk/bin/snapshots/analysis_server.dart.snapshot',
'--enable-experiment', '--enable-experiment',
'non-nullable', 'non-nullable',
......
...@@ -86,6 +86,7 @@ void main() { ...@@ -86,6 +86,7 @@ void main() {
processManager = FakeProcessManager.list(<FakeCommand>[ processManager = FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: <String>[ FakeCommand(command: <String>[
artifacts.getArtifactPath(Artifact.engineDartBinary), artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk), artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk),
'--sdk-root', '--sdk-root',
artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath) + '/', artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath) + '/',
...@@ -115,6 +116,7 @@ void main() { ...@@ -115,6 +116,7 @@ void main() {
processManager = FakeProcessManager.list(<FakeCommand>[ processManager = FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: <String>[ FakeCommand(command: <String>[
artifacts.getArtifactPath(Artifact.engineDartBinary), artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk), artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk),
'--sdk-root', '--sdk-root',
artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath) + '/', artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath) + '/',
...@@ -144,6 +146,7 @@ void main() { ...@@ -144,6 +146,7 @@ void main() {
processManager = FakeProcessManager.list(<FakeCommand>[ processManager = FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: <String>[ FakeCommand(command: <String>[
artifacts.getArtifactPath(Artifact.engineDartBinary), artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk), artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk),
'--sdk-root', '--sdk-root',
artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath) + '/', artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath) + '/',
...@@ -174,6 +177,7 @@ void main() { ...@@ -174,6 +177,7 @@ void main() {
processManager = FakeProcessManager.list(<FakeCommand>[ processManager = FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: <String>[ FakeCommand(command: <String>[
artifacts.getArtifactPath(Artifact.engineDartBinary), artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk), artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk),
'--sdk-root', '--sdk-root',
artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath) + '/', artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath) + '/',
...@@ -206,6 +210,7 @@ void main() { ...@@ -206,6 +210,7 @@ void main() {
processManager = FakeProcessManager.list(<FakeCommand>[ processManager = FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: <String>[ FakeCommand(command: <String>[
artifacts.getArtifactPath(Artifact.engineDartBinary), artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk), artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk),
'--sdk-root', '--sdk-root',
artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath) + '/', artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath) + '/',
...@@ -236,6 +241,7 @@ void main() { ...@@ -236,6 +241,7 @@ void main() {
processManager = FakeProcessManager.list(<FakeCommand>[ processManager = FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: <String>[ FakeCommand(command: <String>[
artifacts.getArtifactPath(Artifact.engineDartBinary), artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk), artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk),
'--sdk-root', '--sdk-root',
artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath) + '/', artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath) + '/',
...@@ -278,6 +284,7 @@ void main() { ...@@ -278,6 +284,7 @@ void main() {
processManager = FakeProcessManager.list(<FakeCommand>[ processManager = FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: <String>[ FakeCommand(command: <String>[
artifacts.getArtifactPath(Artifact.engineDartBinary), artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk), artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk),
'--sdk-root', '--sdk-root',
artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath) + '/', artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath) + '/',
......
...@@ -21,6 +21,7 @@ void main() { ...@@ -21,6 +21,7 @@ void main() {
const FakeCommand( const FakeCommand(
command: <String>[ command: <String>[
'dart', 'dart',
'--disable-dart-dev',
'dev/tools/localization/bin/gen_l10n.dart', 'dev/tools/localization/bin/gen_l10n.dart',
'--gen-inputs-and-outputs-list=/', '--gen-inputs-and-outputs-list=/',
'--arb-dir=arb', '--arb-dir=arb',
......
...@@ -23,6 +23,7 @@ import '../../../src/testbed.dart'; ...@@ -23,6 +23,7 @@ import '../../../src/testbed.dart';
const List<String> kDart2jsLinuxArgs = <String>[ const List<String> kDart2jsLinuxArgs = <String>[
'bin/cache/dart-sdk/bin/dart', 'bin/cache/dart-sdk/bin/dart',
'--disable-dart-dev',
'bin/cache/dart-sdk/bin/snapshots/dart2js.dart.snapshot', 'bin/cache/dart-sdk/bin/snapshots/dart2js.dart.snapshot',
'--libraries-spec=bin/cache/flutter_web_sdk/libraries.json', '--libraries-spec=bin/cache/flutter_web_sdk/libraries.json',
]; ];
......
...@@ -623,6 +623,7 @@ void main() { ...@@ -623,6 +623,7 @@ void main() {
processManager.addCommand(FakeCommand( processManager.addCommand(FakeCommand(
command: <String>[ command: <String>[
globals.artifacts.getArtifactPath(Artifact.engineDartBinary), globals.artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
globals.fs.path.join(Cache.flutterRoot, 'dev', 'tools', 'localization', 'bin', 'gen_l10n.dart'), globals.fs.path.join(Cache.flutterRoot, 'dev', 'tools', 'localization', 'bin', 'gen_l10n.dart'),
'--gen-inputs-and-outputs-list=${dependencies.absolute.path}', '--gen-inputs-and-outputs-list=${dependencies.absolute.path}',
], ],
...@@ -651,6 +652,7 @@ void main() { ...@@ -651,6 +652,7 @@ void main() {
processManager.addCommand(FakeCommand( processManager.addCommand(FakeCommand(
command: <String>[ command: <String>[
globals.artifacts.getArtifactPath(Artifact.engineDartBinary), globals.artifacts.getArtifactPath(Artifact.engineDartBinary),
'--disable-dart-dev',
globals.fs.path.join(Cache.flutterRoot, 'dev', 'tools', 'localization', 'bin', 'gen_l10n.dart'), globals.fs.path.join(Cache.flutterRoot, 'dev', 'tools', 'localization', 'bin', 'gen_l10n.dart'),
'--gen-inputs-and-outputs-list=${dependencies.absolute.path}', '--gen-inputs-and-outputs-list=${dependencies.absolute.path}',
], ],
......
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