OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'dart:collection' show HashSet, Queue; | 5 import 'dart:collection' show HashSet, Queue; |
6 import 'dart:convert' show JSON; | 6 import 'dart:convert' show JSON; |
7 import 'dart:io' show File; | 7 import 'dart:io' show File; |
8 | 8 |
9 import 'package:analyzer/analyzer.dart' | 9 import 'package:analyzer/analyzer.dart' |
10 show AnalysisError, CompilationUnit, ErrorSeverity; | 10 show AnalysisError, CompilationUnit, ErrorSeverity; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 options: options.contextBuilderOptions); | 82 options: options.contextBuilderOptions); |
83 | 83 |
84 var analysisOptions = contextBuilder.getAnalysisOptions(analysisRoot); | 84 var analysisOptions = contextBuilder.getAnalysisOptions(analysisRoot); |
85 var sdk = contextBuilder.findSdk(null, analysisOptions); | 85 var sdk = contextBuilder.findSdk(null, analysisOptions); |
86 | 86 |
87 var sdkResolver = new DartUriResolver(sdk); | 87 var sdkResolver = new DartUriResolver(sdk); |
88 | 88 |
89 // Read the summaries. | 89 // Read the summaries. |
90 summaryData ??= new SummaryDataStore(options.summaryPaths, | 90 summaryData ??= new SummaryDataStore(options.summaryPaths, |
91 resourceProvider: resourceProvider, | 91 resourceProvider: resourceProvider, |
92 recordDependencyInfo: true, | |
93 // TODO(vsm): Reset this to true once we cleanup internal build rules. | 92 // TODO(vsm): Reset this to true once we cleanup internal build rules. |
94 disallowOverlappingSummaries: false); | 93 disallowOverlappingSummaries: false); |
95 | 94 |
96 var sdkSummaryBundle = sdk.getLinkedBundle(); | 95 var sdkSummaryBundle = sdk.getLinkedBundle(); |
97 if (sdkSummaryBundle != null) { | 96 if (sdkSummaryBundle != null) { |
98 summaryData.addBundle(null, sdkSummaryBundle); | 97 summaryData.addBundle(null, sdkSummaryBundle); |
99 } | 98 } |
100 | 99 |
101 var srcFactory = createSourceFactory(options, | 100 var srcFactory = createSourceFactory(options, |
102 sdkResolver: sdkResolver, | 101 sdkResolver: sdkResolver, |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 case "package": | 595 case "package": |
597 case "file": | 596 case "file": |
598 // A valid URI. | 597 // A valid URI. |
599 return uri; | 598 return uri; |
600 default: | 599 default: |
601 // Assume a file path. | 600 // Assume a file path. |
602 // TODO(jmesserly): shouldn't this be `path.toUri(path.absolute)`? | 601 // TODO(jmesserly): shouldn't this be `path.toUri(path.absolute)`? |
603 return new Uri.file(path.absolute(source)); | 602 return new Uri.file(path.absolute(source)); |
604 } | 603 } |
605 } | 604 } |
OLD | NEW |