@@ -79,8 +79,6 @@ class AnalyzerWorkerLoop extends AsyncWorkerLoop {
7979 */
8080 Future <void > analyze (
8181 CommandLineOptions options, Map <String , WorkerInput > inputs) async {
82- // TODO(brianwilkerson) Determine whether this await is necessary.
83- await null ;
8482 var packageBundleProvider =
8583 new WorkerPackageBundleProvider (packageBundleCache, inputs);
8684 var buildMode = new BuildMode (
@@ -99,11 +97,7 @@ class AnalyzerWorkerLoop extends AsyncWorkerLoop {
9997 */
10098 @override
10199 Future <WorkResponse > performRequest (WorkRequest request) async {
102- // TODO(brianwilkerson) Determine whether this await is necessary.
103- await null ;
104100 return logger.runAsync ('Perform request' , () async {
105- // TODO(brianwilkerson) Determine whether this await is necessary.
106- await null ;
107101 errorBuffer.clear ();
108102 outBuffer.clear ();
109103 try {
@@ -148,8 +142,6 @@ class AnalyzerWorkerLoop extends AsyncWorkerLoop {
148142 */
149143 @override
150144 Future <void > run () async {
151- // TODO(brianwilkerson) Determine whether this await is necessary.
152- await null ;
153145 errorSink = errorBuffer;
154146 outSink = outBuffer;
155147 exitHandler = (int exitCode) {
@@ -213,11 +205,7 @@ class BuildMode with HasContextMixin {
213205 * Perform package analysis according to the given [options] .
214206 */
215207 Future <ErrorSeverity > analyze () async {
216- // TODO(brianwilkerson) Determine whether this await is necessary.
217- await null ;
218208 return await logger.runAsync ('Analyze' , () async {
219- // TODO(brianwilkerson) Determine whether this await is necessary.
220- await null ;
221209 // Write initial progress message.
222210 if (! options.machineFormat) {
223211 outSink.writeln ("Analyzing ${options .sourceFiles .join (', ' )}..." );
@@ -266,12 +254,8 @@ class BuildMode with HasContextMixin {
266254 assembler = new PackageBundleAssembler ();
267255 if (_shouldOutputSummary) {
268256 await logger.runAsync ('Build and write output summary' , () async {
269- // TODO(brianwilkerson) Determine whether this await is necessary.
270- await null ;
271257 // Prepare all unlinked units.
272258 await logger.runAsync ('Prepare unlinked units' , () async {
273- // TODO(brianwilkerson) Determine whether this await is necessary.
274- await null ;
275259 for (var src in explicitSources) {
276260 await _prepareUnlinkedUnit ('${src .uri }' );
277261 }
@@ -368,8 +352,6 @@ class BuildMode with HasContextMixin {
368352 }
369353
370354 Future <ErrorSeverity > _computeMaxSeverity () async {
371- // TODO(brianwilkerson) Determine whether this await is necessary.
372- await null ;
373355 ErrorSeverity maxSeverity = ErrorSeverity .NONE ;
374356 if (! options.buildSuppressExitCode) {
375357 for (Source source in explicitSources) {
@@ -507,8 +489,6 @@ class BuildMode with HasContextMixin {
507489 * Otherwise compute it and store into the [uriToUnit] and [assembler] .
508490 */
509491 Future <void > _prepareUnlinkedUnit (String absoluteUri) async {
510- // TODO(brianwilkerson) Determine whether this await is necessary.
511- await null ;
512492 // Maybe an input package contains the source.
513493 if (summaryDataStore.unlinkedMap[absoluteUri] != null ) {
514494 return ;
@@ -532,11 +512,7 @@ class BuildMode with HasContextMixin {
532512 * is sent to a new file at that path.
533513 */
534514 Future <void > _printErrors ({String outputPath}) async {
535- // TODO(brianwilkerson) Determine whether this await is necessary.
536- await null ;
537515 await logger.runAsync ('Compute and print analysis errors' , () async {
538- // TODO(brianwilkerson) Determine whether this await is necessary.
539- await null ;
540516 StringBuffer buffer = new StringBuffer ();
541517 var severityProcessor = (AnalysisError error) =>
542518 determineProcessedSeverity (error, options, analysisOptions);
@@ -649,6 +625,29 @@ abstract class PackageBundleProvider {
649625 PackageBundle get (String path);
650626}
651627
628+ /**
629+ * Wrapper for [InSummaryUriResolver] that tracks accesses to summaries.
630+ */
631+ class TrackingInSummaryUriResolver extends UriResolver {
632+ // May be null.
633+ final DependencyTracker dependencyTracker;
634+ final InSummaryUriResolver inSummaryUriResolver;
635+
636+ TrackingInSummaryUriResolver (
637+ this .inSummaryUriResolver, this .dependencyTracker);
638+
639+ @override
640+ Source resolveAbsolute (Uri uri, [Uri actualUri]) {
641+ var source = inSummaryUriResolver.resolveAbsolute (uri, actualUri);
642+ if (dependencyTracker != null &&
643+ source != null &&
644+ source is InSummarySource ) {
645+ dependencyTracker.record (source.summaryPath);
646+ }
647+ return source;
648+ }
649+ }
650+
652651/**
653652 * Worker input.
654653 *
@@ -744,26 +743,3 @@ class WorkerPackageBundleProvider implements PackageBundleProvider {
744743 return cache.get (inputs, path);
745744 }
746745}
747-
748- /**
749- * Wrapper for [InSummaryUriResolver] that tracks accesses to summaries.
750- */
751- class TrackingInSummaryUriResolver extends UriResolver {
752- // May be null.
753- final DependencyTracker dependencyTracker;
754- final InSummaryUriResolver inSummaryUriResolver;
755-
756- TrackingInSummaryUriResolver (
757- this .inSummaryUriResolver, this .dependencyTracker);
758-
759- @override
760- Source resolveAbsolute (Uri uri, [Uri actualUri]) {
761- var source = inSummaryUriResolver.resolveAbsolute (uri, actualUri);
762- if (dependencyTracker != null &&
763- source != null &&
764- source is InSummarySource ) {
765- dependencyTracker.record (source.summaryPath);
766- }
767- return source;
768- }
769- }
0 commit comments