Skip to content

Commit

Permalink
fix pubspec analysis for multi-options contexts
Browse files Browse the repository at this point in the history
Fixes: #55580


Change-Id: I34ef0c9bca50d333ed2b058ddeb2ffdc1a4eaba9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365542
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
  • Loading branch information
pq authored and Commit Queue committed May 6, 2024
1 parent 7a21933 commit 126ca0f
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 123 deletions.
9 changes: 2 additions & 7 deletions pkg/analysis_server/lib/src/context_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,8 @@ class ContextManagerImpl implements ContextManager {
_analyzeAndroidManifestXml(driver, file);
} else if (file_paths.isDart(pathContext, file)) {
driver.addFile(file);
} else if (file_paths.isPubspecYaml(pathContext, file)) {
_analyzePubspecYaml(driver, file);
}
}

Expand All @@ -619,13 +621,6 @@ class ContextManagerImpl implements ContextManager {
if (fixDataFolder.exists) {
_analyzeFixDataFolder(driver, fixDataFolder, packageName);
}

var pubspecFile =
rootFolder.getChildAssumingFile(file_paths.pubspecYaml);
if (pubspecFile.exists &&
analysisContext.contextRoot.isAnalyzed(pubspecFile.path)) {
_analyzePubspecYaml(driver, pubspecFile.path);
}
}

// Finally, wait for the new contexts watchers to all become ready so we
Expand Down

0 comments on commit 126ca0f

Please sign in to comment.