Skip to content

Commit e3be1b3

Browse files
authored
Revert "Train frontend_server snapshot (flutter#4512)" (flutter#4556)
This reverts commit 86430be as it breaks Windows engine buildbot.
1 parent 86430be commit e3be1b3

3 files changed

Lines changed: 3 additions & 17 deletions

File tree

‎frontend_server/BUILD.gn‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import("//third_party/dart/utils/application_snapshot.gni")
77
application_snapshot("frontend_server") {
88
main_dart = "bin/starter.dart"
99
dot_packages = rebase_path(".packages")
10-
flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk")
11-
training_args = [ "--train", "--sdk-root=$flutter_patched_sdk" ]
10+
training_args = [ "--train" ]
1211

1312
frontend_server_files = exec_script("//third_party/dart/tools/list_dart_files.py",
1413
[ "absolute", rebase_path("."), ], "list lines")

‎frontend_server/lib/server.dart‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -261,17 +261,6 @@ Future<int> starter(
261261
}
262262

263263
if (options['train']) {
264-
final String sdkRoot = options['sdk-root'];
265-
options = _argParser.parse(<String>['--incremental', '--sdk-root=$sdkRoot']);
266-
compiler ??= new _FrontendCompiler(output, printerFactory: binaryPrinterFactory);
267-
await compiler.compile(Platform.script.toFilePath(), options, generator: generator);
268-
compiler.acceptLastDelta();
269-
await compiler.recompileDelta();
270-
compiler.acceptLastDelta();
271-
await compiler.recompileDelta();
272-
compiler.acceptLastDelta();
273-
await compiler.recompileDelta();
274-
compiler.acceptLastDelta();
275264
return 0;
276265
}
277266

‎frontend_server/test/server_test.dart‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ class _MockedBinaryPrinter extends Mock implements BinaryPrinter {}
2626

2727
Future<int> main() async {
2828
group('basic', () {
29-
final CompilerInterface compiler = new _MockedCompiler();
30-
31-
test('train with mocked compiler completes', () async {
32-
expect(await starter(<String>['--train'], compiler: compiler), equals(0));
29+
test('train completes', () async {
30+
expect(await starter(<String>['--train']), equals(0));
3331
});
3432
});
3533

0 commit comments

Comments
 (0)