Version 2.3.0-dev.0.4
* Cherry-pick d03323783a5a5a571916457fcf084d103fce86b3 to dev
* Cherry-pick 14d09498b7830fba62816ec8db3ed9b58601b841 to dev
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 802eb46..6338a5f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 2.3.0-dev.0.4
+
+* Cherry-pick d03323783a5a5a571916457fcf084d103fce86b3 to dev
+* Cherry-pick 14d09498b7830fba62816ec8db3ed9b58601b841 to dev
+
## 2.3.0-dev.0.3
* Cherry-pick 04e1b0d976151cc6aa5dcc80667d568c95495c80 to dev
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index c4dc5b8..5066368 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -1141,6 +1141,11 @@
}
void checkManifestFilesIn(Folder folder) {
+ // Don't traverse into dot directories.
+ if (folder.shortName.startsWith('.')) {
+ return;
+ }
+
for (var child in folder.getChildren()) {
if (child is File) {
if (child.shortName == MANIFEST_NAME &&
diff --git a/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart b/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
index 59c4686..2df986e 100644
--- a/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
+++ b/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
@@ -202,10 +202,25 @@
} else if (isWidgetListArgument) {
if (childrenExpression is ListLiteral) {
for (var element in childrenExpression.elements) {
- var child = _createOutline(element, true);
- if (child != null) {
- children.add(child);
+ void addChildrenFrom(CollectionElement element) {
+ if (element is Expression) {
+ var child = _createOutline(element, true);
+ if (child != null) {
+ children.add(child);
+ }
+ } else if (element is IfElement) {
+ addChildrenFrom(element.thenElement);
+ addChildrenFrom(element.elseElement);
+ } else if (element is ForElement) {
+ addChildrenFrom(element.body);
+ } else if (element is SpreadElement) {
+ // Ignored. It's possible that we might be able to extract
+ // some information from some spread expressions, but it seems
+ // unlikely enough that we're not handling it at the moment.
+ }
}
+
+ addChildrenFrom(element);
}
}
} else {
diff --git a/pkg/analysis_server/test/analysis/notification_errors_test.dart b/pkg/analysis_server/test/analysis/notification_errors_test.dart
index 29da5e8..ffec72b 100644
--- a/pkg/analysis_server/test/analysis/notification_errors_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_errors_test.dart
@@ -97,6 +97,34 @@
expect(error.type, AnalysisErrorType.STATIC_WARNING);
}
+ test_androidManifestFile_dotDirectoryIgnored() async {
+ String filePath =
+ join(projectPath, 'ios', '.symlinks', 'AndroidManifest.xml');
+ String manifestFile = newFile(filePath, content: '''
+<manifest
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
+ <uses-feature android:name="android.software.home_screen" />
+</manifest>
+''').path;
+ newFile(join(projectPath, 'analysis_options.yaml'), content: '''
+analyzer:
+ optional-checks:
+ chrome-os-manifest-checks: true
+''');
+
+ Request request =
+ new AnalysisSetAnalysisRootsParams([projectPath], []).toRequest('0');
+ handleSuccessfulRequest(request);
+ await waitForTasksFinished();
+ await pumpEventQueue();
+ //
+ // Verify that the file wasn't analyzed.
+ //
+ List<AnalysisError> errors = filesErrors[manifestFile];
+ expect(errors, isNull);
+ }
+
test_importError() async {
createProject();
diff --git a/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart b/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart
index 0109174..fe6ebd6 100644
--- a/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart
+++ b/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart
@@ -205,6 +205,33 @@
}
}
+ test_children_withCollectionElements() async {
+ FlutterOutline unitOutline = await _computeOutline('''
+import 'package:flutter/widgets.dart';
+
+class MyWidget extends StatelessWidget {
+ @override
+ Widget build(BuildContext context) {
+ bool includeB = true;
+ return new Column(children: [
+ const Text('aaa'),
+ if (includeB) const Text('bbb'),
+ for (int s in ['ccc', 'ddd'] const Text(s),
+ ]);
+ }
+}
+''');
+
+ expect(_toText(unitOutline), r'''
+(D) MyWidget
+ (D) build
+ Column
+ Text
+ Text
+ Text
+''');
+ }
+
test_codeOffsetLength() async {
FlutterOutline unitOutline = await _computeOutline('''
import 'package:flutter/widgets.dart';
diff --git a/tools/VERSION b/tools/VERSION
index 21d9222..8802673 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -34,6 +34,6 @@
MINOR 3
PATCH 0
PRERELEASE 0
-PRERELEASE_PATCH 3
+PRERELEASE_PATCH 4
ABI_VERSION 4
OLDEST_SUPPORTED_ABI_VERSION 1