OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library analyzer_cli.src.build_mode; | 5 library analyzer_cli.src.build_mode; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io' as io; | 8 import 'dart:io' as io; |
9 | 9 |
10 import 'package:analyzer/error/error.dart'; | 10 import 'package:analyzer/error/error.dart'; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 logger: logger, packageBundleProvider: packageBundleProvider); | 74 logger: logger, packageBundleProvider: packageBundleProvider); |
75 await buildMode.analyze(); | 75 await buildMode.analyze(); |
76 AnalysisEngine.instance.clearCaches(); | 76 AnalysisEngine.instance.clearCaches(); |
77 } | 77 } |
78 | 78 |
79 /** | 79 /** |
80 * Perform a single loop step. | 80 * Perform a single loop step. |
81 */ | 81 */ |
82 @override | 82 @override |
83 Future<WorkResponse> performRequest(WorkRequest request) async { | 83 Future<WorkResponse> performRequest(WorkRequest request) async { |
84 return logger.run('Perform request', () async { | 84 return logger.runAsync('Perform request', () async { |
85 errorBuffer.clear(); | 85 errorBuffer.clear(); |
86 outBuffer.clear(); | 86 outBuffer.clear(); |
87 try { | 87 try { |
88 // Prepare inputs with their digests. | 88 // Prepare inputs with their digests. |
89 Map<String, WorkerInput> inputs = {}; | 89 Map<String, WorkerInput> inputs = {}; |
90 for (var input in request.inputs) { | 90 for (var input in request.inputs) { |
91 inputs[input.path] = new WorkerInput(input.path, input.digest); | 91 inputs[input.path] = new WorkerInput(input.path, input.digest); |
92 } | 92 } |
93 | 93 |
94 // Add in the dart-sdk argument if `dartSdkPath` is not null, | 94 // Add in the dart-sdk argument if `dartSdkPath` is not null, |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 final WorkerPackageBundleCache cache; | 644 final WorkerPackageBundleCache cache; |
645 final Map<String, WorkerInput> inputs; | 645 final Map<String, WorkerInput> inputs; |
646 | 646 |
647 WorkerPackageBundleProvider(this.cache, this.inputs); | 647 WorkerPackageBundleProvider(this.cache, this.inputs); |
648 | 648 |
649 @override | 649 @override |
650 PackageBundle get(String path) { | 650 PackageBundle get(String path) { |
651 return cache.get(inputs, path); | 651 return cache.get(inputs, path); |
652 } | 652 } |
653 } | 653 } |
OLD | NEW |