Invoke analyzeFiles() from handleAffectedFiles() only for analyzed files.

Bug: https://github.com/dart-lang/sdk/issues/49404
Change-Id: I6e80394d28a51182b622ab113a5a6376dbde13ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251442
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Konstantin Shcheglov
2022-07-14 14:54:14 +00:00
committed by Commit Bot
parent 57a3598b2b
commit 9391343387
3 changed files with 12 additions and 3 deletions
+4
View File
@@ -1,3 +1,7 @@
## 0.11.1
- Call `analyzeFiles` from `handleAffectedFiles` only for files that are
analyzed in this analysis context.
## 0.11.0
- Using `AnalysisContextCollection` and `AnalysisContext` for analysis.
+7 -2
View File
@@ -198,14 +198,19 @@ abstract class ServerPlugin {
/// one or more files. The implementation may check if these files should
/// be analyzed, do such analysis, and send diagnostics.
///
/// By default invokes [analyzeFiles].
/// By default invokes [analyzeFiles] only for files that are analyzed in
/// this [analysisContext].
Future<void> handleAffectedFiles({
required AnalysisContext analysisContext,
required List<String> paths,
}) async {
final analyzedPaths = paths
.where(analysisContext.contextRoot.isAnalyzed)
.toList(growable: false);
await analyzeFiles(
analysisContext: analysisContext,
paths: paths,
paths: analyzedPaths,
);
}
+1 -1
View File
@@ -1,6 +1,6 @@
name: analyzer_plugin
description: A framework and support code for building plugins for the analysis server.
version: 0.11.0
version: 0.11.1
repository: https://github.com/dart-lang/sdk/tree/main/pkg/analyzer_plugin
environment: