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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2571373002: Workaround for accessing part sources while resolving a library. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/src/dart/analysis/driver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/analysis/driver.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index a362771debb68339b52b03623ac369d82b827ddd..d900475ad09919c4d1e0f2152959f00b4ea1f5d9 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -653,6 +653,16 @@ class AnalysisDriver {
AnalysisContext analysisContext = _createAnalysisContext(libraryContext);
try {
analysisContext.setContents(file.source, file.content);
+
+ // TODO(scheglov) Remove this.
+ // https://github.com/dart-lang/sdk/issues/28110
+ analysisContext.setContents(libraryFile.source, libraryFile.content);
+ for (FileState part in libraryFile.partedFiles) {
+ if (part.exists) {
+ analysisContext.setContents(part.source, part.content);
+ }
+ }
+
CompilationUnit resolvedUnit = analysisContext.resolveCompilationUnit2(
file.source, libraryFile.source);
List<AnalysisError> errors = analysisContext.computeErrors(file.source);
« no previous file with comments | « no previous file | pkg/analyzer/test/src/dart/analysis/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698