Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: pkg/dev_compiler/lib/src/compiler/compiler.dart

Issue 2781483007: Report error if the same uri appears in multiple summaries. (Closed)
Patch Set: Refactor and check in analyzer cli Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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, recordDependencyInfo: true);
92
92 var sdkSummaryBundle = sdk.getLinkedBundle(); 93 var sdkSummaryBundle = sdk.getLinkedBundle();
93 if (sdkSummaryBundle != null) { 94 if (sdkSummaryBundle != null) {
94 summaryData.addBundle(null, sdkSummaryBundle); 95 summaryData.addBundle(null, sdkSummaryBundle);
95 } 96 }
96 97
97 var srcFactory = createSourceFactory(options, 98 var srcFactory = createSourceFactory(options,
98 sdkResolver: sdkResolver, 99 sdkResolver: sdkResolver,
99 fileResolvers: fileResolvers, 100 fileResolvers: fileResolvers,
100 summaryData: summaryData, 101 summaryData: summaryData,
101 resourceProvider: resourceProvider); 102 resourceProvider: resourceProvider);
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 /// Strip out files that should not be included in the sdk sourcemap as they 606 /// Strip out files that should not be included in the sdk sourcemap as they
606 /// are implementation details that would just confuse users. 607 /// are implementation details that would just confuse users.
607 /// Normalize sdk urls to use "dart:" for more understandable stack traces. 608 /// Normalize sdk urls to use "dart:" for more understandable stack traces.
608 Map cleanupSdkSourcemap(Map sourceMap) { 609 Map cleanupSdkSourcemap(Map sourceMap) {
609 var map = new Map.from(sourceMap); 610 var map = new Map.from(sourceMap);
610 map['sources'] = map['sources'] 611 map['sources'] = map['sources']
611 .map((url) => url.contains('/_internal/') ? null : url) 612 .map((url) => url.contains('/_internal/') ? null : url)
612 .toList(); 613 .toList();
613 return map; 614 return map;
614 } 615 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/command.dart ('k') | pkg/dev_compiler/test/worker/worker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698