Skip to content

Commit efa1c49

Browse files
srawlinsCommit Queue
authored andcommitted
DAS plugins: Fix "interesting files" glob
In testing, I saw that _added_ files were not being analyzed at all by plugins. It turned out that `PluginManager.broadcastWatchEvent` uses that glob to decide if watch events should be broadcast to a given plugin isolate. It uses this Glob to determine that answer: ```dart Glob( _resourceProvider.pathContext.separator, pattern, ).matches(filePath) ``` and using `'*.dart'` for that pattern, always answers "no, this file does not match '*.dart'"; I believe `**.dart` is the correct glob pattern we should use. Change-Id: Id99d758151629c485884ba20e4d1f49f574f5889 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/452160 Commit-Queue: Samuel Rawlins <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 2585dee commit efa1c49

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

pkg/analysis_server_plugin/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.3.2-dev
2+
3+
- Fix support for automatic re-analysis of '*.dart' files _added_, both on-disk
4+
and for files added in the IDE.
5+
16
## 0.3.1
27

38
- Write more of a README.

pkg/analysis_server_plugin/lib/src/plugin_server.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ class PluginServer {
252252
// the SDK path is configured...
253253
_sdkPath = parameters.sdkPath;
254254
return protocol.PluginVersionCheckResult(true, 'Plugin Server', '0.0.1', [
255-
'*.dart',
255+
'**.dart',
256256
]);
257257
}
258258

pkg/analysis_server_plugin/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: analysis_server_plugin
22
description: A framework and support code for building plugins for the analysis server.
3-
version: 0.3.1
3+
version: 0.3.2-dev
44
repository: https://github.com/dart-lang/sdk/tree/main/pkg/analysis_server_plugin
55

66
environment:

0 commit comments

Comments
 (0)