| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 new DartSdkManager(options.dartSdkPath, true), new ContentCache(), | 81 new DartSdkManager(options.dartSdkPath, true), new ContentCache(), |
| 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, recordDependencyInfo: true); | 91 resourceProvider: resourceProvider, |
| 92 recordDependencyInfo: true, |
| 93 disallowOverlappingSummaries: true); |
| 92 | 94 |
| 93 var sdkSummaryBundle = sdk.getLinkedBundle(); | 95 var sdkSummaryBundle = sdk.getLinkedBundle(); |
| 94 if (sdkSummaryBundle != null) { | 96 if (sdkSummaryBundle != null) { |
| 95 summaryData.addBundle(null, sdkSummaryBundle); | 97 summaryData.addBundle(null, sdkSummaryBundle); |
| 96 } | 98 } |
| 97 | 99 |
| 98 var srcFactory = createSourceFactory(options, | 100 var srcFactory = createSourceFactory(options, |
| 99 sdkResolver: sdkResolver, | 101 sdkResolver: sdkResolver, |
| 100 fileResolvers: fileResolvers, | 102 fileResolvers: fileResolvers, |
| 101 summaryData: summaryData, | 103 summaryData: summaryData, |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 // Fall back to a relative path. | 593 // Fall back to a relative path. |
| 592 return path.toUri(path.relative(path.fromUri(uri), from: dir)).toString(); | 594 return path.toUri(path.relative(path.fromUri(uri), from: dir)).toString(); |
| 593 } | 595 } |
| 594 | 596 |
| 595 for (int i = 0; i < list.length; i++) { | 597 for (int i = 0; i < list.length; i++) { |
| 596 list[i] = transformUri(list[i]); | 598 list[i] = transformUri(list[i]); |
| 597 } | 599 } |
| 598 map['file'] = transformUri(map['file']); | 600 map['file'] = transformUri(map['file']); |
| 599 return map; | 601 return map; |
| 600 } | 602 } |
| OLD | NEW |